結果
| 問題 |
No.355 数当てゲーム(2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-06-01 14:00:51 |
| 言語 | Ruby (3.4.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 231 bytes |
| コンパイル時間 | 53 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 29,768 KB |
| 平均クエリ数 | 97.08 |
| 最終ジャッジ日時 | 2024-07-16 10:15:33 |
| 合計ジャッジ時間 | 15,428 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 RE * 49 |
コンパイルメッセージ
Main.rb:12: warning: assigned but unused variable - x Main.rb:9: warning: assigned but unused variable - c Syntax OK
ソースコード
def query(q)
puts q*" ";STDOUT.flush
x,y=gets.split(" ").map(&:to_i)
exit if x==4
return [x,y]
end
c=0
(0..9).to_a.combination(4){|ce|
ce.permutation(4){|pe|
x,y=query(pe)
break if y!=4
}
}