Income and expenses
You’ve decided to keep track of your expenses and your income this month. You have recorded all the expenses in expenses.txt
file each on a separate line while keeping track of the income in income.txt
file following the same format.
Now you would like to know if you have spent more than you earned or if you’ve stayed within the limits.
The program should print Great, you've stayed within the limits!
if the expenses do not exceed the income, and We need to cut the spending the next month
otherwise.
expenses.txt | income.txt | Output |
---|---|---|
200 | 100 | Great, you've stayed within the limits! |
100 | 345 | Great, you've stayed within the limits! |
100 | 100 | We need to cut the spending the next month |
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB