結果
| 問題 |
No.677 10^Nの約数
|
| ユーザー |
isimiya
|
| 提出日時 | 2018-05-23 22:32:37 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 862 bytes |
| コンパイル時間 | 816 ms |
| コンパイル使用メモリ | 104,704 KB |
| 実行使用メモリ | 19,200 KB |
| 最終ジャッジ日時 | 2024-06-28 16:31:33 |
| 合計ジャッジ時間 | 2,127 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | WA * 17 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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);
}
}
}
isimiya