From 27e7dff60eae7685d55b327d52a000c8d1a353e4 Mon Sep 17 00:00:00 2001 From: Tomislav Gracin Date: Wed, 15 Oct 2014 10:42:47 +0200 Subject: [PATCH] Different output file naming a.in.1 instead of in1 --- scraper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scraper.py b/scraper.py index 76ecccd..9e07e44 100755 --- a/scraper.py +++ b/scraper.py @@ -134,11 +134,11 @@ def download_problem(contest_uri, problem): os.mkdir(problem_dir) for i, example in enumerate(examples, 1): - input_path = os.path.join(problem_dir, 'in{}'.format(i)) + input_path = os.path.join(problem_dir, '{}.in.{}'.format(problem.lower(), i)) with open(input_path, 'w') as f: f.write(example[0]) - output_path = os.path.join(problem_dir, 'out{}'.format(i)) + output_path = os.path.join(problem_dir, '{}.out.{}'.format(problem.lower(), i)) with open(output_path, 'w') as f: f.write(example[1])