結果

問題 No.305 鍵(2)
ユーザー 0w10w1
提出日時 2017-11-30 15:38:21
言語 Ruby
(3.3.0)
結果
AC  
実行時間 112 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 415 ms
コンパイル使用メモリ 11,188 KB
実行使用メモリ 31,136 KB
平均クエリ数 52.15
最終ジャッジ日時 2023-09-24 01:36:57
合計ジャッジ時間 2,696 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
30,696 KB
testcase_01 AC 110 ms
30,832 KB
testcase_02 AC 109 ms
30,656 KB
testcase_03 AC 112 ms
30,880 KB
testcase_04 AC 108 ms
30,752 KB
testcase_05 AC 105 ms
31,136 KB
testcase_06 AC 109 ms
30,888 KB
testcase_07 AC 109 ms
30,880 KB
testcase_08 AC 110 ms
31,092 KB
testcase_09 AC 110 ms
30,744 KB
testcase_10 AC 108 ms
30,928 KB
testcase_11 AC 110 ms
30,932 KB
testcase_12 AC 110 ms
30,932 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

@a = [9]*10
def get
  puts @a.join
  STDOUT.flush
  n, state = gets.chomp.split(" ")
  exit if state == "unlocked"
  n.to_i
end
10.times do |i|
  n = get()
  (0..9).each do |j|
    @a[i] = j
    _n = get()
    break if _n > n
  end
end
0