1
1
mirror of https://github.com/theoludwig/programming-challenges.git synced 2024-12-08 00:45:29 +01:00
programming-challenges/scripts/languages-wrapper/execute.py
2020-07-05 15:48:51 +02:00

14 lines
403 B
Python

import os
import json
from solution import solution
current_directory = os.path.dirname(__file__)
input_path = os.path.join(current_directory, "input.json")
output_path = os.path.join(current_directory, "output.json")
with open(input_path, "r") as file_content:
input_json = json.load(file_content)
with open(output_path, "w") as file_content:
json.dump(solution(*input_json), file_content)