結果
問題 |
No.246 質問と回答
|
ユーザー |
![]() |
提出日時 | 2019-07-12 10:22:18 |
言語 | C (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 311 bytes |
コンパイル時間 | 391 ms |
コンパイル使用メモリ | 28,800 KB |
実行使用メモリ | 42,660 KB |
最終ジャッジ日時 | 2024-07-16 17:46:44 |
合計ジャッジ時間 | 6,785 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 1 -- * 29 |
ソースコード
#include<stdio.h> #include<stdlib.h> #include<string.h> #define df 0 int a=1,b=1000000000; void ask(){ int c=(a+b)/2; printf("? %d\n",c); int flag; scanf("%d",&flag); if(flag) a=c; else b=c; } int main(){ while(b-a>1){ ask(); } printf("! %d\n",a); return 0; } /// confirm df==0 ///