結果

問題 No.505 カードの数式2
ユーザー cielciel
提出日時 2017-04-23 23:13:09
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 140 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 11,476 KB
実行使用メモリ 15,352 KB
最終ジャッジ日時 2023-09-29 16:05:20
合計ジャッジ時間 4,061 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
15,076 KB
testcase_01 AC 67 ms
15,272 KB
testcase_02 AC 67 ms
15,188 KB
testcase_03 AC 70 ms
15,320 KB
testcase_04 AC 66 ms
15,004 KB
testcase_05 AC 66 ms
15,276 KB
testcase_06 AC 67 ms
15,128 KB
testcase_07 AC 68 ms
15,076 KB
testcase_08 AC 69 ms
15,052 KB
testcase_09 AC 67 ms
15,220 KB
testcase_10 AC 70 ms
15,120 KB
testcase_11 AC 74 ms
15,100 KB
testcase_12 AC 69 ms
15,128 KB
testcase_13 AC 70 ms
15,156 KB
testcase_14 AC 69 ms
15,292 KB
testcase_15 AC 67 ms
15,272 KB
testcase_16 AC 68 ms
15,084 KB
testcase_17 WA -
testcase_18 AC 72 ms
15,136 KB
testcase_19 AC 70 ms
15,092 KB
testcase_20 AC 71 ms
15,116 KB
testcase_21 AC 67 ms
15,132 KB
testcase_22 AC 67 ms
15,264 KB
testcase_23 AC 66 ms
15,188 KB
testcase_24 AC 68 ms
15,048 KB
testcase_25 AC 68 ms
15,320 KB
testcase_26 AC 70 ms
15,076 KB
testcase_27 AC 68 ms
15,096 KB
testcase_28 AC 68 ms
15,056 KB
testcase_29 WA -
testcase_30 AC 70 ms
15,008 KB
testcase_31 AC 69 ms
15,260 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n,x,*a=`dd`.split.map(&:to_i)
mi=ma=x
a.each{|e|
	mi,ma=[mi,ma].product(['+','-','*',e==0?'+':'/']).map{|v,o|
		v.send(o,e)
	}.minmax
}
p ma
0