結果

問題 No.305 鍵(2)
ユーザー 小指が強い人小指が強い人
提出日時 2015-11-27 22:55:00
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 387 bytes
コンパイル時間 317 ms
コンパイル使用メモリ 11,388 KB
実行使用メモリ 31,608 KB
平均クエリ数 78.15
最終ジャッジ日時 2023-09-23 06:46:08
合計ジャッジ時間 4,833 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 104 ms
31,080 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a = Array.new(10, 0)
x = "%010d" % 0
puts x
STDOUT.flush
str = gets.split
zero_num = str[0].to_i
if str[1] == "unlocked"
    exit
end
9.times do |i|
    y = i + 1
    10.times do |j|
        s = "%010d" % y
        puts s
        STDOUT.flush
        y *= 10
        h = gets.split[0].to_i
        if h > zero_num
            a[9 - j] = i
        end
    end
end
puts a.join
STDOUT.flush
0