結果

問題 No.305 鍵(2)
ユーザー FF256grhyFF256grhy
提出日時 2015-11-27 23:10:45
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 457 bytes
コンパイル時間 135 ms
コンパイル使用メモリ 25,416 KB
実行使用メモリ 24,408 KB
平均クエリ数 85.69
最終ジャッジ日時 2023-09-23 06:47:39
合計ジャッジ時間 2,810 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <stdio.h>

int x, y, z[10];
char s[100];

int main(void) {
	int i, j, k = 1;
	for(i = 0; i < 10; i++) {
	for(j = 0; j < 10; j++) {
		y = x;
		printf("%010d\n", j * k); fflush(stdout);
		scanf("%d %s", &x, s);
		if(j != 0 && x != y) { z[i] = (y < x ? j : j - 1); }
		if(x == 10) { return 0; }
	} k *= 10;
	}
	
	int res = 0;
	k = 1;
	for(i = 0; i < 10; i++) {
		res += k * z[i];
		k*= 10;
	}
	
	printf("%010d\n", res); fflush(stdout);
	
	return 0;
}
0