結果

問題 No.2729 Addition and Multiplication in yukicoder (Easy)
ユーザー playerplayer
提出日時 2024-04-22 18:00:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 578 ms / 2,000 ms
コード長 272 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 82,028 KB
実行使用メモリ 118,008 KB
最終ジャッジ日時 2024-04-22 18:00:38
合計ジャッジ時間 8,585 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,200 KB
testcase_01 AC 38 ms
52,460 KB
testcase_02 AC 162 ms
112,464 KB
testcase_03 AC 538 ms
110,872 KB
testcase_04 AC 543 ms
110,608 KB
testcase_05 AC 539 ms
109,352 KB
testcase_06 AC 568 ms
117,316 KB
testcase_07 AC 555 ms
105,688 KB
testcase_08 AC 264 ms
118,008 KB
testcase_09 AC 33 ms
52,392 KB
testcase_10 AC 35 ms
51,756 KB
testcase_11 AC 33 ms
51,944 KB
testcase_12 AC 568 ms
117,196 KB
testcase_13 AC 574 ms
117,328 KB
testcase_14 AC 557 ms
117,208 KB
testcase_15 AC 578 ms
117,072 KB
testcase_16 AC 397 ms
97,756 KB
testcase_17 AC 408 ms
97,832 KB
testcase_18 AC 488 ms
108,420 KB
testcase_19 AC 376 ms
97,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
mod = 998244353

"""aの数値を小さい順に取ってこれるようにするべき"""

x = 0
b = [(a[i],i) for i in range(n)]
b.sort()

for i in range(n):
    aj,j = b[i]
    x = 10*x+aj
    x %= mod
    
print(x) 
0