結果

問題 No.677 10^Nの約数
ユーザー isimiyaisimiya
提出日時 2018-05-23 22:32:37
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 862 bytes
コンパイル時間 823 ms
コンパイル使用メモリ 65,896 KB
実行使用メモリ 25,896 KB
最終ジャッジ日時 2023-09-11 01:59:47
合計ジャッジ時間 2,767 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 54 ms
21,816 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;


class MainClass
{
	public static void Main(string[] args)
	{
		long N = 2;
		double d = Math.Pow(10, N);
		long x = (long)d;
		Console.WriteLine(1);
		if (N == 0) return;

		List<long> answer = new List<long>();

		for (int i = 1; i <= N; i++)
		{
			answer.Add((long)Math.Pow(2, i));
			answer.Add((long)Math.Pow(5, i));
		}

		for (int i = 1; i <= N; i++)
		{
			for (int j = 1; j <= N; j++)
			{
				answer.Add((long)(Math.Pow(2, i)) * (long)(Math.Pow(5, j)));
			}
		}

		for (int i = 1; i <= N; i++)
		{
			for (int j = 1; j <= N; j++)
			{
				answer.Add((long)(Math.Pow(5, i)) * (long)(Math.Pow(2, j)));
			}
		}

		answer.Sort();
		IEnumerable<long> result = answer.Distinct();

		long[] data = result.ToArray<long>();

		foreach (long a in data)
		{
			Console.WriteLine(a);
		}
	}
}
0