結果
問題 |
No.677 10^Nの約数
|
ユーザー |
![]() |
提出日時 | 2018-09-06 19:46:43 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 558 bytes |
コンパイル時間 | 2,298 ms |
コンパイル使用メモリ | 112,572 KB |
実行使用メモリ | 34,176 KB |
最終ジャッジ日時 | 2024-11-23 16:46:20 |
合計ジャッジ時間 | 11,330 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 14 WA * 1 TLE * 2 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System.Collections.Generic; using System; public class Hello { public static void Main() { var n = int.Parse(Console.ReadLine().Trim()); var n10 = (long)Math.Pow(10, n); var imax = (long)Math.Sqrt(n10); var a = new List<long>(); a.Add(1); a.Add(n10); for (long i = 2; i <= imax; i++) if (n10 % i == 0) { a.Add(i); if (n10 / i != i) a.Add(n10 / i); } a.Sort(); foreach (var x in a) Console.WriteLine(x); } }