結果

問題 No.305 鍵(2)
コンテスト
ユーザー kurenai3110
提出日時 2016-05-31 19:02:44
言語 C++11
(gcc 15.2.0 + boost 1.90.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 728 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 408 ms
コンパイル使用メモリ 87,936 KB
実行使用メモリ 6,016 KB
平均クエリ数 42.54
最終ジャッジ日時 2026-08-13 23:19:21
合計ジャッジ時間 1,910 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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