結果

問題 No.10 +か×か
ユーザー mmmpppmmmppp
提出日時 2017-03-07 17:44:46
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 168 bytes
コンパイル時間 70 ms
コンパイル使用メモリ 11,572 KB
実行使用メモリ 19,952 KB
最終ジャッジ日時 2023-09-05 21:56:18
合計ジャッジ時間 6,923 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
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|p k=n.times.map{|j|'+-'[i[j]]}.reverse;eval(s%k)==t&&$><<(k*'').tr(?-,?*)}
0