From 8fa580d8a0ef5a9e2455c477a296cb0a537e0ba3 Mon Sep 17 00:00:00 2001 From: Bruno Cesar Ribas Date: Tue, 23 Oct 2018 08:56:39 -0300 Subject: Adding kotlin files with problemtemplate Signed-off-by: Bruno Cesar Ribas --- doc/problemexamples/problemtemplate/tests/kt | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 doc/problemexamples/problemtemplate/tests/kt (limited to 'doc/problemexamples/problemtemplate/tests') diff --git a/doc/problemexamples/problemtemplate/tests/kt b/doc/problemexamples/problemtemplate/tests/kt new file mode 100755 index 0000000..2658715 --- /dev/null +++ b/doc/problemexamples/problemtemplate/tests/kt @@ -0,0 +1,41 @@ +#!/bin/bash +# +# This file performs a test of the autojudge system. It can run whatever you feel important to test the autojudge +# and the script files that are included in the problem package + +mkdir -p testdir +cd testdir + +cat > test.kt <<'EOF' +import java.util.* +fun main(args: Array) { + var scanner = Scanner(System.`in`) + val nTests = scanner.nextInt() + for (i in 1..nTests) { + System.`out`.format("%s%n", scanner.next()) + } +} +EOF +cat > test.in <