結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー mathiu
提出日時 2019-01-13 20:32:56
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 27 ms / 5,000 ms
コード長 540 bytes
コンパイル時間 3,298 ms
コンパイル使用メモリ 101,888 KB
実行使用メモリ 17,408 KB
最終ジャッジ日時 2024-12-26 05:31:13
合計ジャッジ時間 3,586 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class No9002
{
  static void Main(string[] args)
  {
    string s = Console.ReadLine();

    int max = int.Parse(s);

    for(int i = 1; i < max + 1; i++) {

      if(i % 3 == 0 & i % 5 == 0) {
        Console.WriteLine("{0}", "FizzBuzz");
      }
      else
      if(i % 3 == 0) {
        Console.WriteLine("{0}", "Fizz");
      }
      else
      if(i % 5 == 0) {
        Console.WriteLine("{0}", "Buzz");
      }
      else {
        Console.WriteLine("{0}", i);
      }
    }
  }
}
0