結果
| 問題 | No.316 もっと刺激的なFizzBuzzをください |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-12-09 12:10:18 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 226 bytes |
| 記録 | |
| コンパイル時間 | 146 ms |
| コンパイル使用メモリ | 77,052 KB |
| 最終ジャッジ日時 | 2025-12-03 18:25:56 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 3 |
| other | AC * 6 WA * 27 |
ソースコード
N=input()
(A,B,C)=map(int,raw_input().split())
def l(p,q,i=0):
if -q:
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)