結果
問題 |
No.246 質問と回答
|
ユーザー |
![]() |
提出日時 | 2017-06-21 02:09:40 |
言語 | C90 (gcc 12.3.0) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 308 bytes |
コンパイル時間 | 200 ms |
コンパイル使用メモリ | 20,480 KB |
実行使用メモリ | 43,296 KB |
最終ジャッジ日時 | 2024-07-16 20:13:04 |
合計ジャッジ時間 | 6,650 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 1 -- * 29 |
コンパイルメッセージ
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; } else { l=m; } } printf("! %d\n",l); return; } int main(void){ run(); return 0; }