Created
March 14, 2019 18:13
-
-
Save tuankiet65/da6d3a6ff1f2d39d5f682ab6edf24657 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
TASK_NAME = Path().absolute().name | |
i = 1 | |
while True: | |
old_in = Path(f"{i}.in") | |
old_out = Path(f"{i}.out") | |
if (not old_in.exists()) and (not old_out.exists()): | |
exit() | |
new_folder = Path(f"Test{i:02}") | |
new_in = new_folder / f"{TASK_NAME}.inp" | |
new_out = new_folder / f"{TASK_NAME}.out" | |
new_folder.mkdir() | |
old_in.replace(new_in) | |
old_out.replace(new_out) | |
i += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment