結果
問題 |
No.9002 FizzBuzz(テスト用)
|
ユーザー |
|
提出日時 | 2020-09-07 15:13:29 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 364 bytes |
コンパイル時間 | 1,584 ms |
コンパイル使用メモリ | 165,452 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-29 10:46:45 |
合計ジャッジ時間 | 1,943 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
#include <bits/stdc++.h> #define forn(i,a,b) for(int i=a; i<=b; i++) using namespace std; void solve(){ int n; cin>>n; forn(i,1,n){ if(i%15==0) cout<<"FizzBuzz\n"; else if(i%5==0) cout<<"Buzz\n"; else if(i%3==0) cout<<"Fizz\n"; else cout<<i<<"\n"; } } int main(){ ios::sync_with_stdio(0); cin.tie(0); int t=1; // cin>>t; while(t--){ solve(); } }