結果
| 問題 |
No.8022 縛りFizzBuzz (Easy)
|
| コンテスト | |
| ユーザー |
はむこ
|
| 提出日時 | 2017-04-05 04:42:24 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 466 bytes |
| コンパイル時間 | 1,269 ms |
| コンパイル使用メモリ | 157,784 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-08 09:37:32 |
| 合計ジャッジ時間 | 1,738 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 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 0;
}
はむこ