結果

問題 No.677 10^Nの約数
ユーザー shikaku
提出日時 2018-04-27 23:27:55
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 787 bytes
コンパイル時間 453 ms
コンパイル使用メモリ 61,384 KB
実行使用メモリ 784,348 KB
最終ジャッジ日時 2024-06-27 22:20:19
合計ジャッジ時間 6,110 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 5 WA * 1 RE * 10 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

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