結果
| 問題 | No.316 もっと刺激的なFizzBuzzをください |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-12-09 12:08:46 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 80 ms / 1,000 ms |
| コード長 | 228 bytes |
| 記録 | |
| コンパイル時間 | 120 ms |
| コンパイル使用メモリ | 77,452 KB |
| 最終ジャッジ日時 | 2025-12-03 18:25:51 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 33 |
ソースコード
N=input()
(A,B,C)=map(int,raw_input().split())
def l(p,q,i=0):
if q==0:
return p
else:
i+=1
return p*q/l(q,p%q,i) if i<=1 else l(q,p%q,i)
print N/A+N/B+N/C-N/l(A,B)-N/l(B,C)-N/l(C,A)+N/l(l(A,B),C)