結果

問題 No.677 10^Nの約数
ユーザー shikakushikaku
提出日時 2018-04-27 23:27:55
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 787 bytes
コンパイル時間 477 ms
コンパイル使用メモリ 62,516 KB
実行使用メモリ 784,448 KB
最終ジャッジ日時 2023-09-10 06:51:22
合計ジャッジ時間 6,373 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;
                                                                                                
  
int main(){
                                                                                                
   
    long long x, n, i, j;

    
    cin >> n;

    x = 10;

    for( i = 1 ; i < n ; i = i + 1 ){

         x *= 10;

         }


    vector<long long> k(x + 1);


    for( i = 1 ; i * i <= x ; i = i + 1 ){

         for( j = 1 ; j * j <= x ; j = j + 1 ){

              if( x % ( i * j ) == 0 ) k.at(i*j) = 1;

              }

         }

    k.at(x) = 1;

    for( i = 1 ; i <= x ; i = i + 1 ){

         if( k.at(i) == 1 ) cout << i << endl;

         }

    return 0;

}
0