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