結果
問題 |
No.9002 FizzBuzz(テスト用)
|
ユーザー |
![]() |
提出日時 | 2020-04-28 15:46:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 269 bytes |
コンパイル時間 | 1,664 ms |
コンパイル使用メモリ | 168,596 KB |
実行使用メモリ | 6,816 KB |
最終ジャッジ日時 | 2024-11-24 21:14:00 |
合計ジャッジ時間 | 1,907 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main() { int N;scanf("%d",&N); for(int i=1;i<N+1;i++) { string ans=""; if(i%3==0)ans=ans+"Fizz"; if(i%5==0)ans=ans+"Buzz"; if(ans==""){printf("%d\n",i);continue;} cout<<ans<<endl; } }