結果
| 問題 | No.246 質問と回答 |
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2017-06-27 10:15:56 |
| 言語 | Ruby (3.4.1) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 271 bytes |
| 記録 | |
| コンパイル時間 | 130 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 46,836 KB |
| 最終ジャッジ日時 | 2024-07-16 20:13:22 |
| 合計ジャッジ時間 | 6,517 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 29 |
コンパイルメッセージ
Syntax OK
ソースコード
def f(d,u) if d==u then puts ["!",d]*" " else m=(d+u)/2 puts ["?",m]*" " x=gets.to_i if x==1 then puts ["?",m+1]*" " if gets.to_i==0 then puts ["!",m]*" " return end end if x==0 then f(d,m) else f(m+1,u) end end end f(1,10**9)
horiesiniti