結果

問題 No.305 鍵(2)
ユーザー Tsuneo YoshiokaTsuneo Yoshioka
提出日時 2015-11-27 23:58:16
言語 Ruby
(3.3.0)
結果
AC  
実行時間 108 ms / 2,000 ms
コード長 264 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 11,332 KB
実行使用メモリ 31,516 KB
平均クエリ数 86.69
最終ジャッジ日時 2023-09-23 22:06:44
合計ジャッジ時間 2,606 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
31,508 KB
testcase_01 AC 106 ms
30,796 KB
testcase_02 AC 104 ms
31,372 KB
testcase_03 AC 105 ms
31,412 KB
testcase_04 AC 103 ms
31,160 KB
testcase_05 AC 102 ms
30,828 KB
testcase_06 AC 101 ms
31,156 KB
testcase_07 AC 101 ms
30,916 KB
testcase_08 AC 106 ms
31,516 KB
testcase_09 AC 103 ms
31,304 KB
testcase_10 AC 104 ms
30,928 KB
testcase_11 AC 104 ms
30,936 KB
testcase_12 AC 104 ms
31,352 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

STDOUT.sync = true
num = "0000000000"
(0...10).each{|place|
    hits = []
    (0...10).each{|i|
        num[place] = i.to_s
        puts num
        hit = gets.to_i
        exit 0 if hit === 10
        hits.push([hit, i])
    }
    num[place] = hits.max[1].to_s
}
0