結果
問題 | No.316 もっと刺激的なFizzBuzzをください |
ユーザー |
|
提出日時 | 2015-12-11 21:20:08 |
言語 | C++11 (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 307 bytes |
コンパイル時間 | 594 ms |
コンパイル使用メモリ | 60,568 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-15 08:24:04 |
合計ジャッジ時間 | 1,668 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 3 |
other | AC * 10 WA * 23 |
ソースコード
#include <string>#include <iostream>#include <cmath>#include <fstream>using namespace std;int main(){int n, a, b, c;cin >> n;cin >> a >> b >> c;int ans;ans = n / a + n / b + n / c;ans = ans - n / (a*b) - n / (b*c) - n / (a*c);ans += n / (a*b*c);cout << ans << endl;return 0;}