結果

問題 No.677 10^Nの約数
ユーザー shikakushikaku
提出日時 2018-04-27 23:54:47
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 905 bytes
コンパイル時間 458 ms
コンパイル使用メモリ 62,848 KB
実行使用メモリ 784,208 KB
最終ジャッジ日時 2023-09-10 07:02:44
合計ジャッジ時間 6,471 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 3 ms
4,376 KB
testcase_06 AC 17 ms
10,704 KB
testcase_07 AC 143 ms
81,336 KB
testcase_08 MLE -
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, t, 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 ){

         t = x;

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

              if( t % i == 0 ){

                  k.at(i) = 1;

                  k.at(t / i) = 1;

                  t = t / i;

                  }

              }


         }


    k.at(x) = 1;

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

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

         }

    return 0;

}
0