結果
| 問題 |
No.8022 縛りFizzBuzz (Easy)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-09 22:03:14 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 450 bytes |
| コンパイル時間 | 2,243 ms |
| コンパイル使用メモリ | 191,316 KB |
| 最終ジャッジ日時 | 2025-01-24 09:05:15 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 4 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int one{};
one++,one++;
int three{};
three++,three++;
int five{};
five++,five++;
for(int i = one; i <= n; i++) {
if(!(i % three)){
cout << "Fizz";
}
if(!(i % five)) {
cout << "Buzz";
}
if(i % three or i % five) {
cout << i;
}
cout << endl;
}
}