harbor run -t openthoughts/tasktrove-exp-rpt-codenet-python-v2-codenet-python-9769
harbor download openthoughts/tasktrove-exp-rpt-codenet-python-v2-codenet-python-9769
You are planning a trip using trains and buses, and you need to calculate the minimum total fare for your journey. The fare system is as follows:
Train Fare Options:
Bus Fare Options:
Your goal is to determine the minimum total fare when choosing the optimal ticket options for both trains and buses.
The input consists of four integers:
Output a single integer, which is the minimum total fare combining the optimal choices of train and bus tickets.
100 250 200 500
300
In this example:
400 800 300 600
700
In this case, the optimal choice involves selecting one unlimited bus ticket for 600 yen and one ordinary train ticket for 400 yen, totaling 700 yen.
Please place your solution in the /app/ directory as a Python script.
/app/
Important: place your implementation at /app/solution.py so the verifier can run it.
/app/solution.py