結果
問題 |
No.253 ロウソクの長さ
|
ユーザー |
![]() |
提出日時 | 2016-05-10 22:36:52 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 385 bytes |
コンパイル時間 | 112 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 28,064 KB |
平均クエリ数 | 25.97 |
最終ジャッジ日時 | 2024-07-16 10:08:08 |
合計ジャッジ時間 | 8,004 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 8 WA * 28 |
ソースコード
low = 10 high = pow(10, 9) count = 0 print('?', 40) if int(input()) == -1: high = 40 low = 0 count += 1 mid = (low + high) // 2 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