1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #ruby Mendelbrot 1924-2010 require 'chunky_png' png = ChunkyPNG::Image.new(513, 257, ChunkyPNG::Color::TRANSPARENT) (-128..128).each { |c| (-256..256).each { |d| a = b = 0.0 result = (1..70).each_with_index.find { t = a * b a *= a b *= b a = a - b + d / 256.0 - 0.5; b = 2 * t + c / 128.0; a + b > 2 || (a + b).nan? } png[d + 256, c + 128] = result ? ChunkyPNG::Color.rgba(0, (result.last * 2.55).to_i, 0, 255) : ChunkyPNG::Color('black') } } png.write(STDOUT) |
-
upload with new input
-
result: Time limit exceeded time: 5s memory: 9672 kB signal: 24 (SIGXCPU)
x = 10 y = 20 puts "#{x} + #{y} = #{x + y}" -
result: Time limit exceeded time: 5s memory: 9712 kB signal: 24 (SIGXCPU)
require 'chunky_png' png = ChunkyPNG::Image.new(513, 257, ChunkyPNG::Color::TRANSPARENT) (-128..128).each { |c| (-256..256).each { |d| a = b = 0.0 result = (1..70).each_with_index.find { t = a * b a *= a b *= b a = a - b + d / 256.0 - 0.5; b = 2 * t + c / 128.0; a + b > 2 || (a + b).nan? } png[d + 256, c + 128] = result ? ChunkyPNG::Color.rgba(0, (result.last * 2.55).to_i, 0, 255) : ChunkyPNG::Color('black') } } png.write(STDOUT) -
result: Time limit exceeded time: 5s memory: 9704 kB signal: 24 (SIGXCPU)
while(1) do print "f" end
-
result: Time limit exceeded time: 5s memory: 9672 kB signal: 24 (SIGXCPU)
-
result: Time limit exceeded time: 5s memory: 9672 kB signal: 24 (SIGXCPU)
puts "hi"
-
result: Time limit exceeded time: 5s memory: 9672 kB signal: 24 (SIGXCPU)
ubvjuyhvblujhv lhgv l;hv jhk
-
result: Success time: 14.98s memory: 10400 kB returned value: 0


