結果

問題 No.677 10^Nの約数
ユーザー mame_shibemame_shibe
提出日時 2019-12-08 00:15:48
言語 C#(csc)
(csc 3.9.0)
結果
TLE  
実行時間 -
コード長 993 bytes
コンパイル時間 839 ms
コンパイル使用メモリ 65,460 KB
実行使用メモリ 43,316 KB
最終ジャッジ日時 2023-08-27 07:10:32
合計ジャッジ時間 10,156 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
43,316 KB
testcase_01 AC 63 ms
24,980 KB
testcase_02 AC 63 ms
22,948 KB
testcase_03 AC 61 ms
20,932 KB
testcase_04 AC 63 ms
22,912 KB
testcase_05 AC 64 ms
23,104 KB
testcase_06 AC 64 ms
25,032 KB
testcase_07 AC 63 ms
23,136 KB
testcase_08 AC 64 ms
23,120 KB
testcase_09 AC 66 ms
23,200 KB
testcase_10 AC 72 ms
22,988 KB
testcase_11 AC 91 ms
23,132 KB
testcase_12 AC 147 ms
23,036 KB
testcase_13 AC 337 ms
23,076 KB
testcase_14 AC 936 ms
23,176 KB
testcase_15 TLE -
testcase_16 TLE -
testcase_17 -- -
testcase_18 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Text;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization.Formatters;
using static System.Console;
using static System.Math;

namespace YukiCoder
{
    public class Program
    {
        public static void Main(string[] args)
        {
            new Program().Solve();
        }

        public void Solve()
        {
            int n = int.Parse(Console.ReadLine());

            double N = Math.Pow(10,n);
            var divisorStack = new Stack();

            for (int i = 1; i <= Math.Sqrt(N); i++)
            {
                if (N % i == 0)
                {
                    if ((double)N/i != Math.Sqrt(N)) Console.WriteLine(i);
                    divisorStack.Push(N/i);
                }
                
                
            }

            while (divisorStack.Count != 0)
            {
                Console.WriteLine(divisorStack.Pop());
            }

        }
    }
}
0