結果
問題 |
No.677 10^Nの約数
|
ユーザー |
![]() |
提出日時 | 2018-05-23 22:20:42 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 887 bytes |
コンパイル時間 | 3,243 ms |
コンパイル使用メモリ | 104,448 KB |
実行使用メモリ | 19,200 KB |
最終ジャッジ日時 | 2024-06-28 16:29:53 |
合計ジャッジ時間 | 2,164 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
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); } Console.WriteLine(x); } }