diff --git a/.gitignore b/.gitignore index 71c7e11..2a73ca0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ a.out main .vscode -vgcore* \ No newline at end of file +vgcore* +output.txt \ No newline at end of file diff --git a/input.py b/input.py new file mode 100644 index 0000000..699f4a9 --- /dev/null +++ b/input.py @@ -0,0 +1,11 @@ +import sys + +try: + n = int(sys.argv[1]) +except: + n = 5 + +print(n) + +for i in range(n): + print(i, -i if i % 2 == 0 else i) \ No newline at end of file diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..941d338 --- /dev/null +++ b/run.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +gcc main.c +python input.py $1 | tee /dev/fd/2 | ./a.out | tee output.txt \ No newline at end of file