結果

問題 No.677 10^Nの約数
ユーザー iwkjoseciwkjosec
提出日時 2018-06-10 11:37:01
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 67 ms / 2,000 ms
コード長 541 bytes
コンパイル時間 2,242 ms
コンパイル使用メモリ 102,628 KB
実行使用メモリ 25,232 KB
最終ジャッジ日時 2023-09-13 02:35:56
合計ジャッジ時間 4,597 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
22,936 KB
testcase_01 AC 64 ms
24,840 KB
testcase_02 AC 63 ms
24,800 KB
testcase_03 AC 63 ms
25,104 KB
testcase_04 AC 64 ms
23,052 KB
testcase_05 AC 65 ms
23,184 KB
testcase_06 AC 64 ms
23,188 KB
testcase_07 AC 64 ms
22,988 KB
testcase_08 AC 63 ms
23,052 KB
testcase_09 AC 64 ms
23,100 KB
testcase_10 AC 64 ms
22,996 KB
testcase_11 AC 65 ms
23,056 KB
testcase_12 AC 65 ms
23,152 KB
testcase_13 AC 65 ms
23,148 KB
testcase_14 AC 65 ms
25,100 KB
testcase_15 AC 65 ms
23,048 KB
testcase_16 AC 67 ms
23,264 KB
testcase_17 AC 65 ms
21,200 KB
testcase_18 AC 65 ms
25,232 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;
using System.Linq;
using static System.Console;

class Program
{
    static void Main()
    {
        var N = int.Parse(ReadLine());
        var s = new HashSet<long>();
        for (int i = 0; i <= N; i++)
        {
            for (int j = 0; j <= N; j++)
            {
                s.Add((long)Math.Pow(2, i) * (long)Math.Pow(5, j));
            }
        }
        var l = s.ToList();
        l.Sort();
        foreach (var p in l)
        {
            WriteLine(p);
        }
    }
}
0