結果
| 問題 | No.305 鍵(2) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-12-04 13:15:34 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 120 ms / 2,000 ms |
| コード長 | 371 bytes |
| コンパイル時間 | 85 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 29,152 KB |
| 平均クエリ数 | 86.69 |
| 最終ジャッジ日時 | 2024-07-16 21:59:55 |
| 合計ジャッジ時間 | 2,698 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
コンパイルメッセージ
Syntax OK
ソースコード
def iter a
ns = []
for i in 0 ... 10
b = a + i.to_s
b = b + '0' while b.length < 10
puts b
STDOUT.flush
n, res = gets.chomp.split
ns[i] = n.to_i
if res == 'unlocked'
exit(0)
end
end
mx = ns[0]
idx = 0
for i in 0 ... 10
if mx < ns[i]
mx = ns[i]
idx = i
end
end
iter (a + idx.to_s)
end
iter ''