Буду сюда технический шыз писать, пока не надоест.
Немного кода:
class GCJSolution def initialize(input = STDIN, output = STDOUT) @input = input @output = output end def read_strings @input.gets.chomp.split(' ') end def read_ints read_strings.map(&:to_i) end def read_int @input.gets.to_i end def read_solve_write_all number_of_tests = read_int for test_no in 1..number_of_tests test_case = parse_input() ans = solve(test_case) @output.puts "Case ##{test_no}: #{ans}" end number_of_tests end end
Комментариев нет:
Отправить комментарий