結果
問題 |
No.1529 Constant Lcm
|
ユーザー |
|
提出日時 | 2021-12-31 17:52:10 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 269 bytes |
コンパイル時間 | 308 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 81,280 KB |
最終ジャッジ日時 | 2024-10-08 18:00:35 |
合計ジャッジ時間 | 5,231 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 TLE * 1 -- * 15 |
ソースコード
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 ans = 1 i = 1 while i <= N - i: ans = lcm(ans,i * (N - i)) i += 1 print(ans % P)