結果
問題 | No.316 もっと刺激的なFizzBuzzをください |
ユーザー |
![]() |
提出日時 | 2020-11-17 13:14:36 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 39 ms / 1,000 ms |
コード長 | 228 bytes |
コンパイル時間 | 462 ms |
コンパイル使用メモリ | 82,132 KB |
実行使用メモリ | 53,756 KB |
最終ジャッジ日時 | 2024-07-23 08:13:46 |
合計ジャッジ時間 | 3,075 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 33 |
ソースコード
import math def lcm(x, y): return (x * y) // math.gcd(x, y) N = int(input()) A, B, C = map(int, input().split()) AB = lcm(A,B) BC = lcm(B,C) CA = lcm(C,A) ABC = lcm(AB,BC) print(N//A+N//B+N//C-N//AB-N//BC-N//CA+N//ABC)