結果

問題 No.305 鍵(2)
ユーザー finefine
提出日時 2016-03-09 02:43:01
言語 Ruby
(3.3.0)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 357 bytes
コンパイル時間 44 ms
コンパイル使用メモリ 11,552 KB
実行使用メモリ 31,464 KB
平均クエリ数 80.85
最終ジャッジ日時 2023-09-23 23:18:52
合計ジャッジ時間 2,231 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 97 ms
31,172 KB
testcase_01 AC 89 ms
30,912 KB
testcase_02 AC 88 ms
31,044 KB
testcase_03 AC 90 ms
30,936 KB
testcase_04 AC 95 ms
31,184 KB
testcase_05 AC 98 ms
31,028 KB
testcase_06 AC 89 ms
30,916 KB
testcase_07 AC 91 ms
31,460 KB
testcase_08 AC 91 ms
31,464 KB
testcase_09 AC 90 ms
31,100 KB
testcase_10 AC 90 ms
31,088 KB
testcase_11 AC 91 ms
31,400 KB
testcase_12 AC 92 ms
31,088 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

s = '0000000000'
tmp = 0
a = ''
10.times{|k|
    tmp = 0
    0.upto(9){|i|
        s[9 - k] = i.to_s
        puts s
        STDOUT.flush
        x,judge = gets.chomp.split
        x = x.to_i
        if judge == 'unlocked'
            exit
        end
        if tmp < x
            tmp = x
            a = i.to_s
        end
        }
    s[9 - k] = a
    }
0