結果
問題 |
No.2734 Addition and Multiplication in yukicoder (Hard)
|
ユーザー |
![]() |
提出日時 | 2024-04-22 03:00:26 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 369 bytes |
コンパイル時間 | 149 ms |
コンパイル使用メモリ | 81,972 KB |
実行使用メモリ | 797,792 KB |
最終ジャッジ日時 | 2024-10-14 01:50:05 |
合計ジャッジ時間 | 71,609 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 MLE * 12 |
ソースコード
import sys input = sys.stdin.readline mod=998244353 N=int(input()) A=list(map(int,input().split())) A=list(map(str,A)) B=[] for s in A: X=list(s) while len(X)<20: X+=list(s) B.append((X,list(s))) B.sort() X=[] for _,s in B: X+=s ANS=0 T=1 for i in range(len(X)): u=len(X)-1-i ANS=(ANS+int(X[u])*T)%mod T=T*10%mod print(ANS)