結果
| 問題 |
No.8022 縛りFizzBuzz (Easy)
|
| コンテスト | |
| ユーザー |
はむこ
|
| 提出日時 | 2017-04-05 04:42:54 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 469 bytes |
| コンパイル時間 | 1,307 ms |
| コンパイル使用メモリ | 157,556 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-08 09:37:34 |
| 合計ジャッジ時間 | 1,857 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int i;
int three;
int five;
int main(void) {
int n; cin >> n;
i++;
three++; three++; three++;
five++; five++; five++; five++; five++;
while (i <= n) {
if (!(i % three)) {
cout << "Fizz";
}
if (!(i % five)) {
cout << "Buzz";
}
if (i % three && i % five)
cout << i;
cout << endl;
i++;
}
return false;
}
はむこ