Reddito e spese

Hai deciso di tenere traccia delle tue spese e del tuo reddito questo mese. Hai registrato tutte le spese nel file expenses.txt, ognuna su una riga separata, mentre hai registrato il reddito nel file income.txt seguendo lo stesso formato.

Ora vorresti sapere se hai speso più di quanto hai guadagnato o se sei rimasto entro i limiti.

Il programma dovrebbe stampare Great, you've stayed within the limits! se le spese non superano il reddito, e We need to cut the spending the next month altrimenti.

expenses.txt

income.txt

Uscita

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