結果

問題 No.305 鍵(2)
ユーザー kurenai3110kurenai3110
提出日時 2016-05-31 19:02:44
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 728 bytes
コンパイル時間 644 ms
コンパイル使用メモリ 66,780 KB
実行使用メモリ 24,360 KB
平均クエリ数 45.31
最終ジャッジ日時 2023-09-23 10:44:16
合計ジャッジ時間 2,763 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <string>
#include <iomanip>
#include <math.h>
using namespace std;

int main()
{
	string s;
	int n=0;
	int atari=0;
	int t,prevt;

	cout << "0000000000" << endl;
	cin >> prevt >> s;
	if(s == "unlocked") return 0;
	n++;

	for(int i=0;i<10;i++){
		n = pow(10,(double)i);
		for(int j=1;j<10;j++){
			cout << setw(10) << setfill('0') << n << endl;

			cin >> t >> s;
			if(s == "unlocked") return 0;

			if(t != prevt){
				if(t>prevt) atari += j*pow(10,(double)i);
				else if(t<prevt) atari += (j-1)*pow(10,(double)i);
				break;
			}
			
			n += pow(10,(double)i);
		}
	}

	cout << setw(10) << setfill('0') << atari << endl;
        cin >> t >> s;
        if(s == "unlocked") return 0;

	return 0;
}
0