Rosetta Problems

鉄道運賃 2 (Train Fare 2)

https://hoj.hamako-ths.ed.jp/onlinejudge/problems/590