収入と支出

今月、あなたは自身の支出と収入を記録することに決めました。 すべての支出をexpenses.txtファイルに1行ずつ記録し、同じフォーマットで収入をincome.txtファイルに記録しています。

今、あなたは使った金額が稼いだ金額を超えているのか、それとも予算内に収まっているのかを知りたいと考えています。

プログラムは支出が収入を超えない場合には Great, you've stayed within the limits! と出力し、そうでない場合は We need to cut the spending the next month というメッセージを表示するべきです。

expenses.txt

income.txt

出力

200
300

100
400
500

Great, you've stayed within the limits!

100
200
890
654

345
234
123
1000
142

Great, you've stayed within the limits!

100
200
300

100
300

We need to cut the spending the next month

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue