結果

問題 No.2734 Addition and Multiplication in yukicoder (Hard)
ユーザー hiro1729hiro1729
提出日時 2024-04-14 15:09:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 4,449 ms / 5,000 ms
コード長 250 bytes
コンパイル時間 473 ms
コンパイル使用メモリ 82,556 KB
実行使用メモリ 135,220 KB
最終ジャッジ日時 2024-04-14 15:11:17
合計ジャッジ時間 77,451 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
88,644 KB
testcase_01 AC 136 ms
88,576 KB
testcase_02 AC 133 ms
88,584 KB
testcase_03 AC 137 ms
88,744 KB
testcase_04 AC 133 ms
88,536 KB
testcase_05 AC 134 ms
88,552 KB
testcase_06 AC 133 ms
88,792 KB
testcase_07 AC 146 ms
88,304 KB
testcase_08 AC 135 ms
88,616 KB
testcase_09 AC 138 ms
88,576 KB
testcase_10 AC 138 ms
88,640 KB
testcase_11 AC 138 ms
88,548 KB
testcase_12 AC 135 ms
88,424 KB
testcase_13 AC 133 ms
88,636 KB
testcase_14 AC 136 ms
88,540 KB
testcase_15 AC 139 ms
88,632 KB
testcase_16 AC 171 ms
88,588 KB
testcase_17 AC 3,934 ms
126,060 KB
testcase_18 AC 3,938 ms
126,208 KB
testcase_19 AC 146 ms
89,328 KB
testcase_20 AC 142 ms
89,148 KB
testcase_21 AC 143 ms
89,348 KB
testcase_22 AC 4,405 ms
135,220 KB
testcase_23 AC 4,429 ms
134,940 KB
testcase_24 AC 4,449 ms
135,124 KB
testcase_25 AC 4,350 ms
135,084 KB
testcase_26 AC 4,420 ms
134,948 KB
testcase_27 AC 4,237 ms
125,052 KB
testcase_28 AC 4,349 ms
131,776 KB
testcase_29 AC 4,355 ms
131,596 KB
testcase_30 AC 4,055 ms
125,164 KB
testcase_31 AC 4,374 ms
131,436 KB
testcase_32 AC 3,976 ms
125,616 KB
testcase_33 AC 3,037 ms
119,944 KB
testcase_34 AC 3,603 ms
121,888 KB
testcase_35 AC 2,027 ms
114,048 KB
testcase_36 AC 2,108 ms
116,024 KB
testcase_37 AC 2,954 ms
119,684 KB
testcase_38 AC 3,012 ms
119,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from fractions import Fraction
N = int(input())
A = list(map(int, input().split()))
B = [(Fraction(i, 10 ** len(str(i)) - 1), i) for i in A]
B.sort()
ans = 0
mod = 998244353
for _, i in B:
	ans = (pow(10, len(str(i)), mod) * ans + i) % mod
print(ans)
0