Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ans = []
- 0.step(10, 0.1) do |x|
- -10.step(0, 0.1) do |y|
- -10.step(10, 0.1) do |z|
- a= x+y-z-2
- b= 3*x+4*y+z-6
- c = 5-(x-2*y+3*z).abs
- if a >0 and b >0 and c >0 then
- ans << 7*x-y+z-4
- end
- end
- end
- end
- print ans.min
- ------------------------
- 答え:10.4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement