結果

問題 No.2357 Guess the Function
ユーザー 👑 ygussanyygussany
提出日時 2023-06-04 19:09:05
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 41 ms / 1,000 ms
コード長 318 bytes
コンパイル時間 810 ms
コンパイル使用メモリ 26,528 KB
実行使用メモリ 24,300 KB
平均クエリ数 2.91
最終ジャッジ日時 2023-08-28 08:21:14
合計ジャッジ時間 1,339 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
23,388 KB
testcase_01 AC 23 ms
23,520 KB
testcase_02 AC 22 ms
23,532 KB
testcase_03 AC 22 ms
24,276 KB
testcase_04 AC 22 ms
23,436 KB
testcase_05 AC 23 ms
23,652 KB
testcase_06 AC 22 ms
24,060 KB
testcase_07 AC 23 ms
24,300 KB
testcase_08 AC 23 ms
23,412 KB
testcase_09 AC 23 ms
23,628 KB
testcase_10 AC 22 ms
23,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main()
{
	int y, yy;
	printf("? 100\n");
	fflush(stdout);
	scanf("%d", &y);
	if (y < 99) {
		printf("? %d\n", 100 - (y + 1));
		fflush(stdout);
		scanf("%d", &yy);
	} else yy = 99;
	
	int A, B;
	B = yy + 1;
	A = ((y - 100) % B + B) % B;
	printf("! %d %d\n", A, B);
	fflush(stdout);
	return 0;
}
0