結果
問題 | No.8022 縛りFizzBuzz (Easy) |
ユーザー |
|
提出日時 | 2021-09-09 22:04:19 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 422 bytes |
コンパイル時間 | 2,283 ms |
コンパイル使用メモリ | 191,444 KB |
最終ジャッジ日時 | 2025-01-24 09:05:32 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 3 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int one{}; one++; int three{}; three++, three++, three++; int five{}; five++, five++, 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; } }