Add least action example and output ignore rules
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def main() -> None:
|
||||
case_dir = Path(__file__).resolve().parent
|
||||
root_dir = case_dir.parent.parent
|
||||
input_path = case_dir / "input" / "input.txt"
|
||||
output_path = case_dir / "output" / "result.txt"
|
||||
program_path = root_dir / "least_action.py"
|
||||
|
||||
subprocess.run(
|
||||
[sys.executable, str(program_path), str(input_path), str(output_path)],
|
||||
check=True,
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user