結果
| 問題 | No.1187 皇帝ペンギン |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-22 14:58:07 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 171 ms / 1,000 ms |
| + 2µs | |
| コード長 | 400 bytes |
| 記録 | |
| コンパイル時間 | 418 ms |
| コンパイル使用メモリ | 95,732 KB |
| 実行使用メモリ | 78,976 KB |
| 平均クエリ数 | 16.44 |
| 最終ジャッジ日時 | 2026-08-15 05:03:00 |
| 合計ジャッジ時間 | 6,377 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 54 |
ソースコード
import sys
x = 0
y = 1000
while x < y:
z = (x + y + 1) // 2
print('?', z)
sys.stdout.flush()
if input() == 'safe':
x = z
continue
print('?', z + 1)
sys.stdout.flush()
if input() == 'safe':
x = z + 1
else:
y = z - 1
print('!', x)