#include <bits/stdc++.h>
using namespace std;
#define int long long
int n,x,ans,s;
const int mod = 998244353;
signed main()
{
while(cin >> n)
{
ans=0,s=0;
for(int i=0;i<n;i++)
{
cin >> x;
int weishu=1;
s=0;
while(x)
{
int a=x%10;
x/=10;
s+=(((((a*11)%mod)*n)%mod) *weishu)%mod;
weishu=(weishu*100)%mod;
}
ans=(ans+s)%mod;
}
cout << ans << endl;
}
return 0;
}
計算數列
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.