結果

問題 No.593 4進FizzBuzz
ユーザー NoNo
提出日時 2018-01-21 00:31:01
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 605 bytes
コンパイル時間 3,866 ms
コンパイル使用メモリ 101,644 KB
実行使用メモリ 36,956 KB
最終ジャッジ日時 2023-08-26 09:41:56
合計ジャッジ時間 14,222 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
20,840 KB
testcase_01 AC 54 ms
20,904 KB
testcase_02 AC 54 ms
20,908 KB
testcase_03 AC 54 ms
21,220 KB
testcase_04 AC 53 ms
20,988 KB
testcase_05 AC 54 ms
22,956 KB
testcase_06 AC 53 ms
20,972 KB
testcase_07 AC 54 ms
22,876 KB
testcase_08 AC 53 ms
20,928 KB
testcase_09 AC 54 ms
22,980 KB
testcase_10 AC 54 ms
22,976 KB
testcase_11 AC 54 ms
20,928 KB
testcase_12 AC 54 ms
20,868 KB
testcase_13 AC 54 ms
18,924 KB
testcase_14 AC 55 ms
21,080 KB
testcase_15 AC 55 ms
21,184 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 423 ms
33,024 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 429 ms
33,008 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 429 ms
32,860 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 429 ms
32,748 KB
testcase_30 WA -
testcase_31 AC 416 ms
32,920 KB
testcase_32 AC 421 ms
34,772 KB
testcase_33 AC 436 ms
30,888 KB
testcase_34 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace y
{
    class Program
    {
        static void Main(string[] args)
        {
            string n4 = Console.ReadLine();

            long a = 0;
            long n10 = 0;
            for (int i = n4.Length - 1; i >= 0; i--)
            {
                n10 += (long)((long.Parse(Convert.ToString(n4[i]))) * Math.Pow(4, a));
                a++;
            }

            string ans = "";

            if (n10 % 3 == 0) ans += "Fizz";
            if (n10 % 5 == 0) ans += "Buzz";
            if (ans.Length == 0) ans = n4;

            Console.WriteLine(ans);
        }
    }
}
0