結果
| 問題 |
No.305 鍵(2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-03-09 01:56:39 |
| 言語 | Ruby (3.4.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 485 bytes |
| コンパイル時間 | 223 ms |
| コンパイル使用メモリ | 7,680 KB |
| 実行使用メモリ | 29,688 KB |
| 平均クエリ数 | 36.00 |
| 最終ジャッジ日時 | 2024-07-16 08:48:32 |
| 合計ジャッジ時間 | 4,387 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 RE * 12 |
コンパイルメッセージ
Syntax OK
ソースコード
s = ''
tmp = 0
puts '0000000000'
STDOUT.flush
x,judge = gets.chomp.split
x = x.to_i
if judge == 'unlocked'
exit
end
if tmp < x
tmp = x
s = '0'
end
10.times{
1.upto(9){|i|
puts "%010d" % (i.to_s + s)
STDOUT.flush
x,judge = gets.chomp.split
x = x.to_i
if judge == 'unlocked'
exit
end
if tmp < x
tmp = x
s = i.to_s + s
break
end
}
s = '0' + s
}