結果
問題 | No.2734 Addition and Multiplication in yukicoder (Hard) |
ユーザー |
![]() |
提出日時 | 2024-04-19 23:22:52 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 1,497 ms / 5,000 ms |
コード長 | 290 bytes |
コンパイル時間 | 175 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 342,524 KB |
最終ジャッジ日時 | 2024-10-11 17:58:33 |
合計ジャッジ時間 | 24,434 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 36 |
ソースコード
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+=afa=0left=1p=998244353for i in range(len(ans)-1,-1,-1):fa+=left*int(ans[i])left*=10left%=pfa%=pprint(fa%p)