Passes the examples, fails the judge
transcript
Your code passed three examples. You submit it. The judge says Wrong Answer.
The example adds one twenty, eighty and three hundred. The total is five hundred. Your code returns five hundred. It is a small case you can trace by hand.
A hidden test has three payments of one billion. The true total is three billion. Your total is a thirty two bit integer. You never see this test. It checks a total of the largest size.
A thirty two bit integer stops at two point one billion. Three billion does not fit. The value wraps to a negative number. The judge compares it with three billion. They differ, so the verdict is Wrong Answer.
Use a sixty four bit total. In Java write long. In C plus plus write long long. A sixty four bit integer holds nine quintillion. Python never wraps, but Java and C plus plus do.
Examples are not the exam. Full breakdown in the lecture.