結果

問題 No.2734 Addition and Multiplication in yukicoder (Hard)
ユーザー titiatitia
提出日時 2024-04-22 03:04:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 419 bytes
コンパイル時間 841 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 383,156 KB
最終ジャッジ日時 2024-04-22 03:05:42
合計ジャッジ時間 28,716 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
52,224 KB
testcase_01 AC 37 ms
52,352 KB
testcase_02 AC 37 ms
52,224 KB
testcase_03 AC 36 ms
52,480 KB
testcase_04 AC 37 ms
52,224 KB
testcase_05 AC 38 ms
51,840 KB
testcase_06 AC 50 ms
52,096 KB
testcase_07 AC 38 ms
52,608 KB
testcase_08 AC 40 ms
52,352 KB
testcase_09 AC 37 ms
52,352 KB
testcase_10 AC 38 ms
52,224 KB
testcase_11 AC 38 ms
51,968 KB
testcase_12 AC 38 ms
51,840 KB
testcase_13 AC 37 ms
52,096 KB
testcase_14 AC 37 ms
51,840 KB
testcase_15 AC 36 ms
52,224 KB
testcase_16 AC 39 ms
52,096 KB
testcase_17 AC 1,285 ms
261,408 KB
testcase_18 AC 1,283 ms
256,516 KB
testcase_19 AC 45 ms
60,032 KB
testcase_20 AC 45 ms
59,904 KB
testcase_21 AC 45 ms
60,160 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 1,558 ms
312,140 KB
testcase_28 AC 1,580 ms
360,076 KB
testcase_29 AC 1,569 ms
364,012 KB
testcase_30 AC 1,649 ms
261,136 KB
testcase_31 AC 1,616 ms
362,524 KB
testcase_32 AC 1,447 ms
319,084 KB
testcase_33 AC 1,046 ms
260,400 KB
testcase_34 AC 1,237 ms
255,856 KB
testcase_35 AC 732 ms
201,892 KB
testcase_36 AC 806 ms
206,180 KB
testcase_37 AC 1,078 ms
251,380 KB
testcase_38 AC 1,046 ms
257,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

from operator import itemgetter

mod=998244353

N=int(input())
A=input().split()

for i in range(N):
    A[i]=list(map(int,list(A[i])))

B=[]
for s in A:
    X=s[:]
    while len(X)<18:
        X+=s
    B.append((X,s))

B.sort(key=itemgetter(0))

X=[]
for _,s in B:
    X+=s


ANS=0
T=1
for i in range(len(X)):
    u=len(X)-1-i
    ANS=(ANS+X[u]*T)%mod
    T=T*10%mod

print(ANS)
0