結果

問題 No.677 10^Nの約数
ユーザー shikakushikaku
提出日時 2018-04-27 23:24:29
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 766 bytes
コンパイル時間 623 ms
コンパイル使用メモリ 63,096 KB
実行使用メモリ 15,424 KB
最終ジャッジ日時 2023-09-10 06:49:40
合計ジャッジ時間 4,650 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

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 <= x ; j = j + 1 ){

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

              }

         }


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

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

         }

    return 0;

}
0