結果

問題 No.2734 Addition and Multiplication in yukicoder (Hard)
ユーザー hiro1729hiro1729
提出日時 2024-04-14 15:07:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 4,445 ms / 5,000 ms
コード長 242 bytes
コンパイル時間 338 ms
コンパイル使用メモリ 82,108 KB
実行使用メモリ 135,568 KB
最終ジャッジ日時 2024-04-14 15:08:40
合計ジャッジ時間 79,572 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
88,724 KB
testcase_01 AC 136 ms
88,560 KB
testcase_02 AC 137 ms
88,708 KB
testcase_03 AC 135 ms
88,300 KB
testcase_04 AC 134 ms
88,616 KB
testcase_05 AC 135 ms
88,540 KB
testcase_06 AC 135 ms
88,296 KB
testcase_07 AC 135 ms
88,500 KB
testcase_08 AC 137 ms
88,552 KB
testcase_09 AC 138 ms
88,360 KB
testcase_10 AC 137 ms
88,680 KB
testcase_11 AC 139 ms
88,292 KB
testcase_12 AC 138 ms
88,536 KB
testcase_13 AC 135 ms
88,560 KB
testcase_14 AC 136 ms
88,648 KB
testcase_15 AC 137 ms
88,568 KB
testcase_16 AC 135 ms
88,580 KB
testcase_17 AC 3,990 ms
126,068 KB
testcase_18 AC 3,910 ms
126,188 KB
testcase_19 AC 146 ms
89,276 KB
testcase_20 AC 144 ms
89,272 KB
testcase_21 AC 144 ms
89,224 KB
testcase_22 AC 4,385 ms
135,568 KB
testcase_23 AC 4,445 ms
135,012 KB
testcase_24 AC 4,420 ms
135,180 KB
testcase_25 AC 4,434 ms
135,076 KB
testcase_26 AC 4,423 ms
135,076 KB
testcase_27 AC 4,172 ms
125,096 KB
testcase_28 AC 4,393 ms
131,904 KB
testcase_29 AC 4,354 ms
131,464 KB
testcase_30 AC 4,111 ms
125,272 KB
testcase_31 AC 4,444 ms
131,448 KB
testcase_32 AC 4,032 ms
125,572 KB
testcase_33 AC 3,018 ms
119,848 KB
testcase_34 AC 3,551 ms
122,180 KB
testcase_35 AC 2,013 ms
114,204 KB
testcase_36 AC 2,215 ms
116,020 KB
testcase_37 AC 3,148 ms
119,724 KB
testcase_38 AC 3,030 ms
119,532 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 = (10 ** len(str(i)) * ans + i) % mod
print(ans)
0