結果
問題 |
No.1529 Constant Lcm
|
ユーザー |
|
提出日時 | 2021-12-31 17:47:38 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 252 bytes |
コンパイル時間 | 439 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 65,408 KB |
最終ジャッジ日時 | 2024-10-08 17:53:16 |
合計ジャッジ時間 | 2,859 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 2 |
other | RE * 24 |
ソースコード
N = int(input()) P = 998244353 def lcm(a,b): u,v = a,b while True: r = a % b a = b b = r if r == 0: break return u // a * v % P ans = 1 while i <= N - i: ans = lcm(ans,i * (N - i)) print(ans)