結果

問題 No.305 鍵(2)
ユーザー CleyLCleyL
提出日時 2020-02-18 16:02:28
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 27 ms / 2,000 ms
コード長 722 bytes
コンパイル時間 553 ms
コンパイル使用メモリ 65,796 KB
実行使用メモリ 24,036 KB
平均クエリ数 52.15
最終ジャッジ日時 2023-09-24 02:29:28
合計ジャッジ時間 1,963 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
24,036 KB
testcase_01 AC 24 ms
23,628 KB
testcase_02 AC 23 ms
23,352 KB
testcase_03 AC 24 ms
23,652 KB
testcase_04 AC 25 ms
23,364 KB
testcase_05 AC 25 ms
23,940 KB
testcase_06 AC 21 ms
23,400 KB
testcase_07 AC 25 ms
23,820 KB
testcase_08 AC 25 ms
23,400 KB
testcase_09 AC 23 ms
23,376 KB
testcase_10 AC 23 ms
23,376 KB
testcase_11 AC 24 ms
23,520 KB
testcase_12 AC 24 ms
23,364 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(n == 10){
              return 0;
            }
            if(!j){
                def = n;
            }else{
                if(def > n){
                    s.push_back('0');
                    break;
                }else if(def < n){
                    s.push_back('0'+j);
                    break;
                }
            }
        }
    }
}
0