結果
問題 | No.316 もっと刺激的なFizzBuzzをください |
ユーザー |
|
提出日時 | 2018-06-04 23:17:02 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 594 bytes |
コンパイル時間 | 574 ms |
コンパイル使用メモリ | 64,428 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-30 09:49:05 |
合計ジャッジ時間 | 1,544 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 17 WA * 16 |
ソースコード
#include <iostream> using namespace std; typedef long long LL; int main(int argc, char* argv[]) { LL N,a,b,c; cin>>N; cin>>a>>b>>c; if (c%b==0 || c%a==0){ c=0; } if (b%a==0){ b=0; } LL a1=0,b1=0,c1=0,d1=0,e1=0,f1=0,g1=0; a1=N/a; if (b>0){ b1=N/b; } if (c>0){ c1=N/c; } if (b>0){ d1=N/(a*b); } if (c>0){ LL x=a*c; f1=N/(a*c); } if (b>0 &&c>0){ LL x=b*c; e1=N/(b*c); g1=N/(a*b*c); } /* cout<<a1<<endl; cout<<a1+b1<<endl; cout<<a1+b1+c1<<endl; cout<<a1+b1+c1-d1<<endl; cout<<a1+b1+c1-d1-e1<<endl; */ cout<<a1+b1+c1-d1-e1-f1+g1<<endl; return 0; }