結果

問題 No.677 10^Nの約数
ユーザー Mr.FukuMr.Fuku
提出日時 2018-08-17 21:23:56
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 487 bytes
コンパイル時間 628 ms
コンパイル使用メモリ 71,256 KB
実行使用メモリ 13,888 KB
最終ジャッジ日時 2024-04-18 18:00:45
合計ジャッジ時間 5,832 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
10,912 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,944 KB
testcase_03 AC 2 ms
6,944 KB
testcase_04 AC 1 ms
6,940 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 2 ms
6,944 KB
testcase_07 AC 2 ms
6,944 KB
testcase_08 AC 2 ms
6,944 KB
testcase_09 AC 2 ms
6,944 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 TLE -
testcase_18 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <math.h>
#include <list>
using namespace std;
int main(void){
    int n;cin>>n;
    long num = pow(10,n);
    double sq=sqrt(num);
    list<long> lst;
    
    for(int i=1;i<=sq;i++){
        if(num%i==0){
            printf("%d\n",i);
            lst.push_front(num/i);
        }
    }
    if(sq==lst.front())lst.pop_front();
    
    int sz = lst.size();
    for(int i=0;i<sz;i++){
        printf("%d\n",lst.front());
        lst.pop_front();
    }
    
}
0