結果

問題 No.3084 Identify f(x)
ユーザー pengin_2000
提出日時 2025-04-04 21:30:16
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 23 ms / 2,000 ms
コード長 200 bytes
コンパイル時間 1,034 ms
コンパイル使用メモリ 23,936 KB
実行使用メモリ 25,856 KB
平均クエリ数 3.00
最終ジャッジ日時 2025-04-04 21:32:07
合計ジャッジ時間 1,890 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    7 |         scanf("%d", &b);
      |         ^~~~~~~~~~~~~~~
main.c:10:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |         scanf("%d", &a);
      |         ^~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
int main()
{
	int a, b, x;
	printf("? 0\n");
	fflush(stdout);
	scanf("%d", &b);
	printf("? 1\n");
	fflush(stdout);
	scanf("%d", &a);
	a -= b;
	printf("! %d %d\n", a, b);
	return 0;
}
0