結果

問題 No.294 SuperFizzBuzz
ユーザー zizi4n5zizi4n5
提出日時 2017-07-02 12:05:19
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 695 bytes
コンパイル時間 1,045 ms
コンパイル使用メモリ 112,744 KB
実行使用メモリ 32,552 KB
最終ジャッジ日時 2024-04-15 11:50:38
合計ジャッジ時間 12,000 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
23,904 KB
testcase_01 WA -
testcase_02 RE -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace yukicoder_no294
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());

            //制約の中で最も大きなSuperFizzBuzz(25桁)
            //5533533555333355355553555
            //1111111111111111111111111(33,554,432通り)

            var c = 0;
            for (int i = 1; true; i++)
            {
                var b = Convert.ToString(i, 2);
                var num = ulong.Parse(b.Replace("0", "3").Replace("1", "5"));

                if (num % 15 == 0 && ++c == N)
                {
					Console.WriteLine("{0}", num);
					return;
				}
			}
        }
    }
}
0