結果
問題 | No.8022 縛りFizzBuzz (Easy) |
ユーザー |
![]() |
提出日時 | 2017-03-31 22:49:05 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 760 bytes |
コンパイル時間 | 498 ms |
コンパイル使用メモリ | 59,480 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-07 05:03:47 |
合計ジャッジ時間 | 905 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
#include <iostream>#include <vector>#include <algorithm>#include <string>using namespace std;int main(){int n; cin >> n;for (int i = true; i <= n; i++) {bool a = false, b = false, c = false;if (!(i % ((int)(true) + (int)(true) + (int)(true))))a = true;if (!(i % ((int)(true) + (int)(true) + (int)(true) + (int)(true) + (int)(true))))b = true;if (!(i % ((int)(true) + (int)(true) + (int)(true) + (int)(true) + (int)(true) + (int)(true) + (int)(true) + (int)(true) + (int)(true) + (int)(true) + (int)(true) + (int)(true) + (int)(true) + (int)(true) + (int)(true))))c = true;if (c)cout << "FizzBuzz" << endl;else if (a)cout << "Fizz" << endl;else if (b)cout << "Buzz" << endl;else cout << i << endl;}return false;}