結果
| 問題 |
No.8022 縛りFizzBuzz (Easy)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-18 15:30:48 |
| 言語 | C# (.NET 8.0.404) |
| 結果 |
AC
|
| 実行時間 | 53 ms / 2,000 ms |
| コード長 | 520 bytes |
| コンパイル時間 | 7,668 ms |
| コンパイル使用メモリ | 165,396 KB |
| 実行使用メモリ | 182,676 KB |
| 最終ジャッジ日時 | 2024-06-28 23:29:33 |
| 合計ジャッジ時間 | 8,681 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (96 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System;
using System.Collections.Generic;
static class Program
{
static public void Main(string[] args)
{
int n = int.Parse(Console.ReadLine());
var ans = new List<string>();
for (int i = 'b' - 'a'; i <= n; i++) {
var a = "";
if (i % ('d' - 'a') == 'a' - 'a') a += "Fizz";
if (i % ('f' - 'a') == 'a' - 'a') a += "Buzz";
if (a == "") a += i;
ans.Add(a);
}
Console.WriteLine(string.Join("\n", ans));
}
}