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