結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー ku_senjan
提出日時 2023-06-03 17:04:08
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 279 bytes
コンパイル時間 1,809 ms
コンパイル使用メモリ 167,608 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-29 03:09:05
合計ジャッジ時間 2,498 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int N;

void solve(int n){
  if(n%3==0 || n%5==0){
    if(n%3==0) cout << "Fizz";
    if(n%5==0) cout << "Buzz";
  }else{
    cout << n;
  }
  cout << endl;
}

int main(){
  cin >> N;

  for(int i=1; i<=N; i++){
    solve(i);
  }
}
0