結果

問題 No.2729 Addition and Multiplication in yukicoder (Easy)
ユーザー nikoro256nikoro256
提出日時 2024-04-19 21:32:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 155 ms / 2,000 ms
コード長 170 bytes
コンパイル時間 191 ms
コンパイル使用メモリ 82,524 KB
実行使用メモリ 112,640 KB
最終ジャッジ日時 2024-04-19 21:32:48
合計ジャッジ時間 3,394 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
52,068 KB
testcase_01 AC 38 ms
52,424 KB
testcase_02 AC 140 ms
112,640 KB
testcase_03 AC 107 ms
105,400 KB
testcase_04 AC 114 ms
105,792 KB
testcase_05 AC 120 ms
107,284 KB
testcase_06 AC 155 ms
112,368 KB
testcase_07 AC 138 ms
100,520 KB
testcase_08 AC 139 ms
112,424 KB
testcase_09 AC 33 ms
53,228 KB
testcase_10 AC 32 ms
52,508 KB
testcase_11 AC 38 ms
52,732 KB
testcase_12 AC 146 ms
112,616 KB
testcase_13 AC 150 ms
112,472 KB
testcase_14 AC 147 ms
112,104 KB
testcase_15 AC 147 ms
111,852 KB
testcase_16 AC 114 ms
98,304 KB
testcase_17 AC 115 ms
97,796 KB
testcase_18 AC 133 ms
104,224 KB
testcase_19 AC 112 ms
97,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
p=998244353
A.sort(reverse=True)
left=1
ans=0
for a in A:
    ans+=a*left
    ans%=p
    left*=10
    left%=p
print(ans%p)
0