結果
問題 |
No.246 質問と回答
|
ユーザー |
![]() |
提出日時 | 2017-06-21 02:07:34 |
言語 | C90 (gcc 12.3.0) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 310 bytes |
コンパイル時間 | 502 ms |
コンパイル使用メモリ | 20,480 KB |
実行使用メモリ | 42,916 KB |
平均クエリ数 | 1.00 |
最終ジャッジ日時 | 2024-07-16 20:12:47 |
合計ジャッジ時間 | 4,177 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 TLE * 1 -- * 28 |
コンパイルメッセージ
main.c: In function ‘run’: main.c:13:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%d",&d); | ^~~~~~~~~~~~~~
ソースコード
#include<stdio.h> void run(void){ int l=1; int h=1000000000; while(l<h){ int m=(l+h)/2; printf("? %d\n",m); fflush(stdout); int d; scanf("%d",&d); if(d==0){ h=m-1; } else { l=m; } } printf("! %d\n",l); return; } int main(void){ run(); return 0; }