結果

問題 No.2734 Addition and Multiplication in yukicoder (Hard)
ユーザー titiatitia
提出日時 2024-04-22 03:00:26
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 369 bytes
コンパイル時間 193 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 797,428 KB
最終ジャッジ日時 2024-04-22 03:01:44
合計ジャッジ時間 17,322 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
51,968 KB
testcase_01 AC 41 ms
51,584 KB
testcase_02 AC 42 ms
51,968 KB
testcase_03 AC 41 ms
51,584 KB
testcase_04 AC 42 ms
51,712 KB
testcase_05 AC 42 ms
51,712 KB
testcase_06 AC 42 ms
51,968 KB
testcase_07 AC 46 ms
51,968 KB
testcase_08 AC 46 ms
51,584 KB
testcase_09 AC 41 ms
51,712 KB
testcase_10 AC 41 ms
51,840 KB
testcase_11 AC 42 ms
51,712 KB
testcase_12 AC 43 ms
51,968 KB
testcase_13 AC 41 ms
51,840 KB
testcase_14 AC 43 ms
52,224 KB
testcase_15 AC 42 ms
51,968 KB
testcase_16 AC 43 ms
51,712 KB
testcase_17 AC 3,332 ms
428,540 KB
testcase_18 AC 3,295 ms
433,504 KB
testcase_19 AC 45 ms
59,912 KB
testcase_20 AC 45 ms
60,032 KB
testcase_21 AC 45 ms
60,032 KB
testcase_22 MLE -
testcase_23 MLE -
testcase_24 MLE -
testcase_25 MLE -
testcase_26 MLE -
testcase_27 MLE -
testcase_28 MLE -
testcase_29 MLE -
testcase_30 MLE -
testcase_31 MLE -
testcase_32 MLE -
testcase_33 AC 2,944 ms
437,608 KB
testcase_34 MLE -
testcase_35 AC 2,693 ms
289,368 KB
testcase_36 AC 2,166 ms
311,876 KB
testcase_37 AC 3,096 ms
441,524 KB
testcase_38 AC 2,850 ms
456,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0