結果

問題 No.677 10^Nの約数
ユーザー taktak
提出日時 2018-05-01 07:44:29
言語 C#(csc)
(csc 3.9.0)
結果
TLE  
実行時間 -
コード長 1,910 bytes
コンパイル時間 3,699 ms
コンパイル使用メモリ 107,724 KB
実行使用メモリ 31,212 KB
最終ジャッジ日時 2023-09-10 08:36:14
合計ジャッジ時間 10,005 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
31,212 KB
testcase_01 AC 65 ms
21,988 KB
testcase_02 AC 65 ms
22,232 KB
testcase_03 AC 71 ms
22,248 KB
testcase_04 AC 67 ms
24,260 KB
testcase_05 AC 68 ms
22,308 KB
testcase_06 AC 67 ms
24,300 KB
testcase_07 AC 67 ms
22,188 KB
testcase_08 AC 67 ms
22,248 KB
testcase_09 AC 65 ms
20,212 KB
testcase_10 AC 68 ms
22,272 KB
testcase_11 AC 71 ms
22,292 KB
testcase_12 AC 80 ms
24,268 KB
testcase_13 AC 106 ms
24,292 KB
testcase_14 AC 194 ms
24,376 KB
testcase_15 AC 469 ms
22,280 KB
testcase_16 AC 1,326 ms
24,280 KB
testcase_17 TLE -
testcase_18 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using System.Runtime.InteropServices;
using System.Text;
using static System.Console;
using static System.Math;
class Simple {
    private int N;
    void Solve() {
        N = io.Int;

        var M = (long)Pow(10, N);
        var divsor = new List <long>();

        for(int i = 1; i <= Sqrt(M); ++i) {
            if(M % i == 0) {
                divsor.Add(i);
                divsor.Add(M / i);
            }
        }

        foreach(var v in divsor.Distinct().OrderBy(x=>x)) 
            WriteLine(v);        
    }
   
    SimpleIO io = new SimpleIO();
    public static void Main(string[] args) => new Simple().Stream();
    private void Stream() {
        //var exStdIn = new System.IO.StreamReader("stdin.txt");
        //SetIn(exStdIn);
        Solve();
        io.Flush();
    }
}
class SimpleIO {
    string[] _nextBuffer;
    int _bufferCnt;
    char[] cs = new char[] {' ', '"', ','};
    StreamWriter sw = new StreamWriter(OpenStandardOutput()) {
#if DEBUG
        AutoFlush = true
#else
        AutoFlush = false
#endif
    };
    public SimpleIO() {
        _nextBuffer = new string[0];
        _bufferCnt = 0;
        SetOut(sw);
    }
    string Next() {
        if(_bufferCnt < _nextBuffer.Length)
            return _nextBuffer[_bufferCnt++];
        var st = ReadLine();
        while(st == "")
            st = ReadLine();
        _nextBuffer = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        _bufferCnt  = 0;
        return _nextBuffer[_bufferCnt++];
    }
    public string String => Next();
    public char Char     => char.Parse(String);
    public int Int       => int.Parse(String);
    public long Long     => long.Parse(String);
    public double Double => double.Parse(String);
    public void Flush()  => Out.Flush();
}
0