結果

問題 No.2734 Addition and Multiplication in yukicoder (Hard)
ユーザー nikoro256nikoro256
提出日時 2024-04-19 23:22:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,351 ms / 5,000 ms
コード長 290 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 82,336 KB
実行使用メモリ 342,776 KB
最終ジャッジ日時 2024-04-19 23:23:16
合計ジャッジ時間 22,946 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
51,840 KB
testcase_01 AC 35 ms
52,096 KB
testcase_02 AC 34 ms
51,840 KB
testcase_03 AC 34 ms
51,968 KB
testcase_04 AC 34 ms
51,968 KB
testcase_05 AC 35 ms
52,096 KB
testcase_06 AC 34 ms
51,712 KB
testcase_07 AC 38 ms
52,096 KB
testcase_08 AC 35 ms
51,840 KB
testcase_09 AC 35 ms
51,968 KB
testcase_10 AC 35 ms
52,096 KB
testcase_11 AC 34 ms
52,096 KB
testcase_12 AC 34 ms
51,872 KB
testcase_13 AC 34 ms
51,840 KB
testcase_14 AC 34 ms
51,968 KB
testcase_15 AC 35 ms
51,712 KB
testcase_16 AC 35 ms
51,712 KB
testcase_17 AC 882 ms
182,520 KB
testcase_18 AC 887 ms
194,332 KB
testcase_19 AC 40 ms
59,392 KB
testcase_20 AC 40 ms
59,392 KB
testcase_21 AC 40 ms
59,392 KB
testcase_22 AC 1,314 ms
333,604 KB
testcase_23 AC 1,351 ms
332,696 KB
testcase_24 AC 1,250 ms
333,264 KB
testcase_25 AC 1,342 ms
333,432 KB
testcase_26 AC 1,315 ms
333,756 KB
testcase_27 AC 1,213 ms
319,420 KB
testcase_28 AC 1,250 ms
328,704 KB
testcase_29 AC 1,242 ms
342,776 KB
testcase_30 AC 1,123 ms
279,320 KB
testcase_31 AC 1,297 ms
333,052 KB
testcase_32 AC 1,188 ms
293,140 KB
testcase_33 AC 782 ms
202,516 KB
testcase_34 AC 928 ms
245,556 KB
testcase_35 AC 473 ms
147,064 KB
testcase_36 AC 554 ms
147,496 KB
testcase_37 AC 838 ms
237,916 KB
testcase_38 AC 766 ms
205,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(str,input().split()))
A=[a for a in A]
A=[(a*(-(-19//len(a))),len(a)) for a in A]
A.sort()
ans=[]
for a,c in A:
    a=a[:c]
    ans+=a
fa=0
left=1
p=998244353
for i in range(len(ans)-1,-1,-1):
    fa+=left*int(ans[i])
    left*=10
    left%=p
    fa%=p
print(fa%p)
0