結果
問題 |
No.9002 FizzBuzz(テスト用)
|
ユーザー |
![]() |
提出日時 | 2021-06-25 11:41:43 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 370 bytes |
コンパイル時間 | 1,956 ms |
コンパイル使用メモリ | 194,640 KB |
最終ジャッジ日時 | 2025-01-22 11:49:02 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; for(int i = 1 ; i <= n ; i++){ string ans = ""; if(i % 3 == 0){ ans += "Fizz"; } if(i % 5 == 0){ ans += "Buzz"; } if(ans.empty()){ ans += to_string(i); } cout << ans << endl; } }