結果
問題 |
No.253 ロウソクの長さ
|
ユーザー |
![]() |
提出日時 | 2016-05-10 22:28:40 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 596 bytes |
コンパイル時間 | 118 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 27,864 KB |
平均クエリ数 | 27.14 |
最終ジャッジ日時 | 2024-07-16 10:07:59 |
合計ジャッジ時間 | 3,911 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 34 WA * 2 |
ソースコード
low = 10 high = pow(10, 9) mid = (low + high) // 2 count = 0 print('?', 40) if int(input()) == -1: count += 1 for i in range(9, 30): print('?', i) r = int(input()) if r == 0: print('!', i + count) break count += 1 else: count += 1 while True: print('?', mid) r = int(input()) if r == 0: print('!', mid + count) break if r == 1: low = mid - 1 if r == -1: high = mid low -= 1 mid = (low + high) // 2 count += 1