結果
問題 |
No.8022 縛りFizzBuzz (Easy)
|
ユーザー |
![]() |
提出日時 | 2020-02-23 22:23:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 386 bytes |
コンパイル時間 | 1,529 ms |
コンパイル使用メモリ | 167,964 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-10 22:20:45 |
合計ジャッジ時間 | 2,113 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ int n;cin>>n; int d=M_PI-M_PI; int e=M_PI-M_PI;e++; int a=d;a++;a++;a++; int b=d;b++;b++;b++;b++;b++; int c=d;c++;c++;c++;c++;c++;c++;c++;c++;c++;c++;c++;c++;c++;c++;c++; for(int i=e;i<=n;i++){ i%c==d ? cout<<"FizzBuzz"<<endl : i%a==d ? cout<<"Fizz"<<endl : i%b==d ? cout<<"Buzz"<<endl : cout<<i<<endl; } }