結果
問題 |
No.8022 縛りFizzBuzz (Easy)
|
ユーザー |
![]() |
提出日時 | 2025-03-26 14:30:18 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 466 bytes |
コンパイル時間 | 2,077 ms |
コンパイル使用メモリ | 195,204 KB |
実行使用メモリ | 7,320 KB |
最終ジャッジ日時 | 2025-03-26 14:30:22 |
合計ジャッジ時間 | 3,225 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int N; cin>>N; set<int> st; int zero = *st.begin(); zero++; int one = zero; zero++; zero++; int three = zero; zero++; zero++; int five = zero; for(int i = one; i <= N; i++){ if(!(i % three) && !(i % five)){ cout << "FizzBuzz" << endl; } else if(!(i % three)){ cout << "Fizz" << endl; } else if(!(i % five)){ cout << "Buzz" << endl; } else{ cout << i << endl; } } }