結果

問題 No.1429 Simple Dowsing
ユーザー pengin_2000pengin_2000
提出日時 2021-07-15 18:53:59
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 27 ms / 2,000 ms
コード長 336 bytes
コンパイル時間 981 ms
コンパイル使用メモリ 27,880 KB
実行使用メモリ 24,504 KB
平均クエリ数 3.00
最終ジャッジ日時 2023-09-24 12:10:44
合計ジャッジ時間 1,840 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
24,192 KB
testcase_01 AC 23 ms
23,400 KB
testcase_02 AC 25 ms
23,556 KB
testcase_03 AC 24 ms
23,556 KB
testcase_04 AC 24 ms
23,412 KB
testcase_05 AC 24 ms
24,204 KB
testcase_06 AC 24 ms
23,640 KB
testcase_07 AC 24 ms
23,688 KB
testcase_08 AC 24 ms
24,048 KB
testcase_09 AC 24 ms
23,676 KB
testcase_10 AC 24 ms
23,376 KB
testcase_11 AC 24 ms
23,676 KB
testcase_12 AC 25 ms
24,504 KB
testcase_13 AC 25 ms
23,376 KB
testcase_14 AC 23 ms
23,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
int main()
{
	int d1, d2;
	printf("? 0 0\n");
	fflush(stdout);
	scanf("%d", &d1);
	printf("? 100 0\n");
	fflush(stdout);
	scanf("%d", &d2);
	int x, y;
	for (x = 0; x <= 100; x++)
		for (y = 0; y <= 100; y++)
			if (x * x + y * y == d1 && (100 - x) * (100 - x) + y * y == d2)
				printf("! %d %d\n", x, y);
	return 0;
}
0