結果

問題 No.677 10^Nの約数
ユーザー NoNo
提出日時 2018-04-28 02:06:09
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 625 bytes
コンパイル時間 2,540 ms
コンパイル使用メモリ 104,548 KB
実行使用メモリ 23,296 KB
最終ジャッジ日時 2023-09-10 07:41:28
合計ジャッジ時間 4,414 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
23,028 KB
testcase_01 AC 57 ms
20,892 KB
testcase_02 AC 58 ms
20,992 KB
testcase_03 AC 59 ms
23,096 KB
testcase_04 AC 58 ms
21,212 KB
testcase_05 AC 60 ms
23,168 KB
testcase_06 AC 59 ms
21,052 KB
testcase_07 AC 59 ms
21,092 KB
testcase_08 AC 59 ms
21,096 KB
testcase_09 AC 59 ms
21,128 KB
testcase_10 AC 60 ms
21,020 KB
testcase_11 AC 60 ms
21,076 KB
testcase_12 AC 60 ms
23,244 KB
testcase_13 AC 61 ms
21,240 KB
testcase_14 AC 60 ms
23,296 KB
testcase_15 AC 61 ms
23,208 KB
testcase_16 AC 61 ms
21,140 KB
testcase_17 AC 60 ms
21,360 KB
testcase_18 AC 61 ms
21,096 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;

namespace y
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());
            var ans = new List<long>();

            for (int i = 0; i <= n; i++)
            {
                long a = (long)Math.Pow(2, i);
                for (int j = 0; j <= n; j++)
                {
                    ans.Add( a * (long)Math.Pow(5, j));
                }
            }

            ans.Sort();
            foreach (var x in ans)
            {
                Console.WriteLine(x);
            }
        }
    }
}
0