結果
問題 |
No.246 質問と回答
|
ユーザー |
![]() |
提出日時 | 2015-08-01 14:36:05 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 511 bytes |
コンパイル時間 | 79 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 28,024 KB |
平均クエリ数 | 101.00 |
最終ジャッジ日時 | 2024-07-16 07:18:26 |
合計ジャッジ時間 | 4,170 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 30 |
ソースコード
import sys def question(num): print("? " + str(num)) sys.stdout.flush() n = int(input()) if n == 1: return True else: return False def result(num): print("! " + str(num)) sys.stdout.flush() # main max_num = 1000000000 judge = int(max_num / 2) min_num = 1 for i in range(0,100): r = question(judge) if r == True: # higer or equal min_num = judge else: # low max_num = judge judge = int(max_num / 2) result(min_num)