結果

問題 No.2729 Addition and Multiplication in yukicoder (Easy)
ユーザー prd_xxxprd_xxx
提出日時 2024-04-19 21:26:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 179 ms / 2,000 ms
コード長 183 bytes
コンパイル時間 265 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 112,520 KB
最終ジャッジ日時 2024-04-19 21:27:15
合計ジャッジ時間 3,512 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
51,456 KB
testcase_01 AC 36 ms
52,096 KB
testcase_02 AC 146 ms
111,916 KB
testcase_03 AC 114 ms
106,496 KB
testcase_04 AC 116 ms
107,136 KB
testcase_05 AC 120 ms
108,672 KB
testcase_06 AC 152 ms
112,284 KB
testcase_07 AC 139 ms
101,088 KB
testcase_08 AC 148 ms
111,832 KB
testcase_09 AC 37 ms
51,940 KB
testcase_10 AC 34 ms
51,840 KB
testcase_11 AC 34 ms
51,968 KB
testcase_12 AC 150 ms
112,028 KB
testcase_13 AC 179 ms
112,520 KB
testcase_14 AC 151 ms
112,156 KB
testcase_15 AC 154 ms
111,908 KB
testcase_16 AC 118 ms
97,792 KB
testcase_17 AC 119 ms
98,048 KB
testcase_18 AC 140 ms
103,892 KB
testcase_19 AC 119 ms
97,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int,input().split()))
MOD = 998244353

A.sort()

ans = 0
b = 1
while A:
    a = A.pop()
    ans += a*b
    ans %= MOD
    b *= 10
    b %= MOD
print(ans)
0