結果
問題 | No.9002 FizzBuzz(テスト用) |
ユーザー | arasabaki |
提出日時 | 2016-03-06 22:25:52 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 21 ms / 5,000 ms |
コード長 | 898 bytes |
コンパイル時間 | 3,512 ms |
コンパイル使用メモリ | 107,668 KB |
実行使用メモリ | 23,728 KB |
最終ジャッジ日時 | 2023-10-24 20:11:17 |
合計ジャッジ時間 | 1,357 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 21 ms
23,712 KB |
testcase_01 | AC | 20 ms
23,724 KB |
testcase_02 | AC | 21 ms
23,728 KB |
testcase_03 | AC | 21 ms
23,728 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace TestConsole { class Program { static void Main(string[] args) { const string fizz = "Fizz"; const string buzz = "Buzz"; var readN = Console.ReadLine(); for (int i = 1; i <= int.Parse(readN); i++) { if (i % 15 == 0) { Console.WriteLine(fizz + buzz); } else if (i % 3 == 0) { Console.WriteLine(fizz); } else if (i % 5 == 0) { Console.WriteLine(buzz); } else { Console.WriteLine(i); } } } } }