結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,880 KB
testcase_01 AC 27 ms
10,752 KB
testcase_02 AC 26 ms
10,752 KB
testcase_03 AC 26 ms
10,752 KB
testcase_04 AC 25 ms
10,752 KB
testcase_05 AC 25 ms
10,752 KB
testcase_06 AC 26 ms
10,880 KB
testcase_07 AC 28 ms
10,752 KB
testcase_08 AC 26 ms
10,752 KB
testcase_09 AC 25 ms
10,752 KB
testcase_10 AC 25 ms
10,752 KB
testcase_11 AC 25 ms
10,752 KB
testcase_12 AC 25 ms
10,880 KB
testcase_13 AC 25 ms
10,752 KB
testcase_14 AC 25 ms
10,752 KB
testcase_15 AC 26 ms
10,752 KB
testcase_16 AC 26 ms
10,752 KB
testcase_17 AC 3,034 ms
121,120 KB
testcase_18 AC 3,361 ms
125,012 KB
testcase_19 AC 30 ms
10,752 KB
testcase_20 AC 29 ms
10,880 KB
testcase_21 AC 28 ms
10,752 KB
testcase_22 TLE -
testcase_23 TLE -
testcase_24 TLE -
testcase_25 TLE -
testcase_26 TLE -
testcase_27 AC 4,485 ms
162,912 KB
testcase_28 AC 4,957 ms
174,672 KB
testcase_29 TLE -
testcase_30 AC 4,012 ms
151,200 KB
testcase_31 TLE -
testcase_32 AC 4,465 ms
162,740 KB
testcase_33 AC 2,907 ms
112,240 KB
testcase_34 AC 3,667 ms
138,696 KB
testcase_35 AC 1,657 ms
76,424 KB
testcase_36 AC 1,786 ms
82,104 KB
testcase_37 AC 3,131 ms
123,068 KB
testcase_38 AC 2,840 ms
115,996 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