結果

問題 No.305 鍵(2)
ユーザー yamachu_nazoyamachu_nazo
提出日時 2015-11-28 00:01:04
言語 C++11
(gcc 11.4.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 616 bytes
コンパイル時間 416 ms
コンパイル使用メモリ 52,392 KB
実行使用メモリ 24,408 KB
平均クエリ数 55.31
最終ジャッジ日時 2023-09-23 06:50:25
合計ジャッジ時間 2,148 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 28 ms
23,340 KB
testcase_02 AC 26 ms
24,408 KB
testcase_03 AC 28 ms
23,484 KB
testcase_04 AC 28 ms
23,604 KB
testcase_05 AC 30 ms
23,976 KB
testcase_06 WA -
testcase_07 AC 28 ms
23,412 KB
testcase_08 AC 29 ms
23,400 KB
testcase_09 AC 29 ms
24,024 KB
testcase_10 AC 28 ms
23,472 KB
testcase_11 AC 29 ms
23,412 KB
testcase_12 AC 28 ms
23,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main() {
    int i=0;
    int x,zerox;
    int ans[10];
    string rep;
    
    cout << "0000000000" << endl;
    cin >> zerox >> rep;
    
    for(int i=0;i<10;i++){
    	for(int j=0;j<10;j++){
    		for(int k=0;k<10;k++){
    			if(k==i){
    				cout << j;
    			}else{
    				cout << '0';
    			}
    		}
    		cout << endl;
    		cin >> x >> rep;
	    	if(x>zerox){
	    		ans[i]=j;
	    		break;
	    	}else if(x<zerox){
	    		ans[i]=0;
	    		break;
	    	}
    	}
    }
    for(int i=0;i<10;i++){
    	cout << ans[i];
    }
    cout << endl;
    return 0;
}
0