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 | 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