結果

問題 No.305 鍵(2)
ユーザー CleyLCleyL
提出日時 2020-02-18 15:54:53
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 672 bytes
コンパイル時間 477 ms
コンパイル使用メモリ 64,204 KB
実行使用メモリ 24,336 KB
平均クエリ数 1.54
最終ジャッジ日時 2023-09-23 19:42:06
合計ジャッジ時間 2,709 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
24,000 KB
testcase_01 WA -
testcase_02 AC 26 ms
24,048 KB
testcase_03 AC 25 ms
23,544 KB
testcase_04 WA -
testcase_05 AC 28 ms
23,640 KB
testcase_06 WA -
testcase_07 AC 26 ms
23,544 KB
testcase_08 AC 25 ms
24,252 KB
testcase_09 WA -
testcase_10 AC 25 ms
24,024 KB
testcase_11 AC 26 ms
23,400 KB
testcase_12 AC 27 ms
24,324 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
    string s = "";
    for(int i = 0; 10 > i; i++){
        int def = 0;
        for(int j = 0; 10 > j; j++){
            cout << s << j;
            for(int k = 0; 10-s.size()-1 > k; k++){
                cout << "0";
            }
            cout << endl;
            int n;string c;cin>>n>>c;
            
            if(!j){
                def = n;
            }else{
                if(def > n){
                    s.push_back('0');
                    break;
                }else if(def < n){
                    s.push_back('0'+j);
                    break;
                }
            }
        }
    }
}
0