結果

問題 No.1291 小手調べ
ユーザー tadanoningentadanoningen
提出日時 2020-11-20 22:23:30
言語 C++17
(gcc 11.2.0 + boost 1.78.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 441 bytes
コンパイル時間 541 ms
使用メモリ 6,268 KB
最終ジャッジ日時 2023-02-23 18:57:38
合計ジャッジ時間 1,412 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 2 ms
6,268 KB
testcase_01 AC 2 ms
6,184 KB
testcase_02 AC 2 ms
6,188 KB
testcase_03 AC 1 ms
6,204 KB
testcase_04 AC 2 ms
6,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<vector>

using namespace std;

int main(){
    int n;
    cin >> n;
    vector<string> ans(n,"");
    for(int i=0;i < n;i++){
        int d;
        cin >> d;
        if(d == 1) {ans[i] = "10";continue;}
        else{
            ans[i] = "9";
            for(int j=1;j < d;j++){
                ans[i] += '0';
            }
        }
    }
    for(auto x: ans) cout << x << endl;
    return 0;
}
0