Sha256: bcdbe5db689f646ba6e6e353487b6cd17414755c1b8c4c1b95c2adfc65ab185e

Contents?: true

Size: 423 Bytes

Versions: 2

Compression:

Stored size: 423 Bytes

Contents

require 'zlib'
require 'base64'
stdin = Zlib::Inflate.new(Zlib::MAX_WBITS + 32).inflate(Base64.decode64($stdin.read)).split("<$><*><$>\n")
code = stdin[0]
input = stdin[1]
time = stdin[2]

File.open("./main.py", "w") do |file|
	file.puts code
	file.close
end

File.open("./test.in", "w") do |file|
	file.puts input
	file.close
end

system "timeout -s 9 " + time + " /opt/wandbox/cpython-head/bin/python3 main.py < test.in"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
judge_system-1.5.2 lib/compile_systems/py_system.rb
judge_system-1.5.1 lib/compile_systems/py_system.rb