結果

問題 No.10 +か×か
ユーザー mmmpppmmmppp
提出日時 2017-03-07 17:45:25
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 166 bytes
コンパイル時間 36 ms
コンパイル使用メモリ 11,408 KB
実行使用メモリ 20,640 KB
最終ジャッジ日時 2023-09-05 21:56:26
合計ジャッジ時間 6,865 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

n,t,*a=$<.read.split.map &:to_i
n-=1
s=a*'%s'
class Integer;alias:-:*end
(1<<n).times.any?{|i|k=n.times.map{|j|'+-'[i[j]]}.reverse;eval(s%k)==t&&$><<(k*'').tr(?-,?*)}
0