結果

問題 No.2734 Addition and Multiplication in yukicoder (Hard)
ユーザー titiatitia
提出日時 2024-04-22 03:02:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 419 bytes
コンパイル時間 67 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 185,168 KB
最終ジャッジ日時 2024-04-22 03:03:31
合計ジャッジ時間 75,933 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,752 KB
testcase_01 AC 25 ms
10,752 KB
testcase_02 AC 25 ms
10,752 KB
testcase_03 AC 27 ms
10,752 KB
testcase_04 AC 27 ms
10,752 KB
testcase_05 AC 28 ms
10,752 KB
testcase_06 AC 28 ms
10,752 KB
testcase_07 AC 26 ms
10,880 KB
testcase_08 AC 26 ms
10,752 KB
testcase_09 AC 27 ms
10,752 KB
testcase_10 AC 25 ms
10,752 KB
testcase_11 AC 26 ms
10,752 KB
testcase_12 AC 25 ms
10,752 KB
testcase_13 AC 25 ms
10,880 KB
testcase_14 AC 27 ms
10,752 KB
testcase_15 AC 26 ms
10,752 KB
testcase_16 AC 25 ms
10,752 KB
testcase_17 AC 2,782 ms
121,188 KB
testcase_18 AC 2,919 ms
126,252 KB
testcase_19 AC 29 ms
10,752 KB
testcase_20 AC 28 ms
10,752 KB
testcase_21 AC 27 ms
10,752 KB
testcase_22 AC 4,934 ms
183,464 KB
testcase_23 TLE -
testcase_24 TLE -
testcase_25 TLE -
testcase_26 TLE -
testcase_27 AC 4,550 ms
161,756 KB
testcase_28 AC 4,843 ms
178,132 KB
testcase_29 AC 4,653 ms
173,192 KB
testcase_30 AC 3,840 ms
151,648 KB
testcase_31 TLE -
testcase_32 AC 4,381 ms
162,208 KB
testcase_33 AC 2,631 ms
112,216 KB
testcase_34 AC 3,551 ms
137,772 KB
testcase_35 AC 1,588 ms
76,944 KB
testcase_36 AC 1,704 ms
82,368 KB
testcase_37 AC 3,073 ms
122,832 KB
testcase_38 AC 2,802 ms
116,028 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

from operator import itemgetter

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(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+int(X[u])*T)%mod
    T=T*10%mod

print(ANS)
0