結果
問題 |
No.316 もっと刺激的なFizzBuzzをください
|
ユーザー |
|
提出日時 | 2022-12-04 11:30:04 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 1,000 ms |
コード長 | 269 bytes |
コンパイル時間 | 91 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-10-11 10:53:42 |
合計ジャッジ時間 | 2,271 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 33 |
ソースコード
import math N = int(input()) a, b, c = [int(i) for i in input().split()] ans = ( int(N / a) + int(N / b) + int(N / c) - int(N / math.lcm(a, b)) - int(N / math.lcm(c, b)) - int(N / math.lcm(a, c)) + int(N / math.lcm(a, b, c)) ) print(ans)