結果

問題 No.1529 Constant Lcm
ユーザー 👑 rin204rin204
提出日時 2022-01-27 00:18:04
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 479 bytes
コンパイル時間 1,093 ms
コンパイル使用メモリ 87,140 KB
実行使用メモリ 98,144 KB
最終ジャッジ日時 2023-08-25 13:32:38
合計ジャッジ時間 5,481 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
70,836 KB
testcase_01 AC 86 ms
75,988 KB
testcase_02 AC 62 ms
71,144 KB
testcase_03 AC 67 ms
70,864 KB
testcase_04 AC 63 ms
71,152 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 61 ms
71,092 KB
testcase_08 WA -
testcase_09 AC 64 ms
71,100 KB
testcase_10 AC 197 ms
96,728 KB
testcase_11 AC 113 ms
82,492 KB
testcase_12 AC 74 ms
76,312 KB
testcase_13 AC 167 ms
91,544 KB
testcase_14 AC 130 ms
85,480 KB
testcase_15 WA -
testcase_16 AC 120 ms
83,696 KB
testcase_17 AC 99 ms
80,220 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 202 ms
97,324 KB
testcase_21 AC 198 ms
97,328 KB
testcase_22 WA -
testcase_23 AC 198 ms
97,432 KB
testcase_24 WA -
testcase_25 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353

n = int(input())

isprime = [True] * n
div = {}
for i in range(2, n):
    if not isprime[i]:
        continue
    max_ = 1
    for j in range(i * i, n, i):
        isprime[j] = False
        cnt = 0
        while j % i == 0:
            j //= i
            cnt += 1
        max_ = max(max_, cnt)
    if n % i == 0:
        max_ += 1
    div[i] = max_

ans = 1
for k, v in div.items():
    for _ in range(v):
        ans *= k
        ans %= MOD
print(ans % MOD)

0