結果
問題 | No.2734 Addition and Multiplication in yukicoder (Hard) |
ユーザー |
![]() |
提出日時 | 2024-04-19 23:09:47 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 296 bytes |
コンパイル時間 | 404 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 516,296 KB |
最終ジャッジ日時 | 2024-10-11 17:27:01 |
合計ジャッジ時間 | 58,116 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 31 WA * 3 MLE * 2 |
ソースコード
N=int(input())A=list(map(str,input().split()))A=[list(a) for a in A]A=[[a*(-(-18//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)