I want to know how to test algorithms with Python

Asked 2 years ago, Updated 2 years ago, 113 views

Hello, I'm a new student who started studying algorithms.

I'm solving the Baekjun algorithm problem with Python.

When there was no input value or one line, I used to test it by floating it on the console

When I receive multiple input values, I can't test the rest because only one line is entered (including the line) and the program runs and ends right away.

When you use Python to receive multiple values including lines as input values, try to test if the code is correct.

What should I do?

python-3.x python algorithm

2022-09-22 12:00

1 Answers

After creating the input data file, put it as input into the pie line file created using redirection.

$ python3 solution.py < input.in


2022-09-22 12:00

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.