結果
問題 | No.9002 FizzBuzz(テスト用) |
ユーザー | mathiu |
提出日時 | 2019-01-13 20:32:56 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 55 ms / 5,000 ms |
コード長 | 540 bytes |
コンパイル時間 | 3,014 ms |
コンパイル使用メモリ | 99,512 KB |
実行使用メモリ | 20,816 KB |
最終ジャッジ日時 | 2023-08-27 01:07:30 |
合計ジャッジ時間 | 3,928 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 55 ms
20,784 KB |
testcase_01 | AC | 55 ms
20,816 KB |
testcase_02 | AC | 53 ms
20,636 KB |
testcase_03 | AC | 53 ms
20,628 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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); } } } }