結果
問題 |
No.1529 Constant Lcm
|
ユーザー |
|
提出日時 | 2021-12-31 17:48:41 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 263 bytes |
コンパイル時間 | 788 ms |
コンパイル使用メモリ | 82,164 KB |
実行使用メモリ | 67,392 KB |
最終ジャッジ日時 | 2024-10-08 17:55:24 |
合計ジャッジ時間 | 3,298 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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)) i += 1 print(ans)