結果

問題 No.1396 Giri
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-04-22 17:34:49
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 334 bytes
コンパイル時間 578 ms
コンパイル使用メモリ 86,988 KB
実行使用メモリ 89,752 KB
最終ジャッジ日時 2023-09-17 10:12:21
合計ジャッジ時間 4,027 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,500 KB
testcase_01 AC 79 ms
71,296 KB
testcase_02 AC 120 ms
89,384 KB
testcase_03 AC 74 ms
71,148 KB
testcase_04 AC 74 ms
71,140 KB
testcase_05 AC 117 ms
89,564 KB
testcase_06 AC 75 ms
71,512 KB
testcase_07 AC 74 ms
71,268 KB
testcase_08 AC 75 ms
71,432 KB
testcase_09 AC 74 ms
71,156 KB
testcase_10 AC 74 ms
71,148 KB
testcase_11 AC 73 ms
71,388 KB
testcase_12 AC 73 ms
71,172 KB
testcase_13 AC 73 ms
71,276 KB
testcase_14 AC 74 ms
71,548 KB
testcase_15 AC 75 ms
71,552 KB
testcase_16 AC 79 ms
75,852 KB
testcase_17 AC 84 ms
76,708 KB
testcase_18 AC 86 ms
77,432 KB
testcase_19 AC 100 ms
83,232 KB
testcase_20 AC 107 ms
86,300 KB
testcase_21 AC 114 ms
88,240 KB
testcase_22 AC 115 ms
89,660 KB
testcase_23 AC 117 ms
89,556 KB
testcase_24 AC 116 ms
89,752 KB
testcase_25 AC 123 ms
89,660 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
mod = 998244353

count = [0]*(n+1)
primes = []
for i in range(2,n+1):
    if count[i]:
        continue
    primes.append(i)
    for j in range(i,n+1,i):
        count[j] = 1

ans = 1
for p in primes[:len(primes)-1]:
    now = p
    while now <= n:
        ans *= p
        ans %= mod
        now *= p
    
print(ans)
0