Ingresos y gastos
Has decidido llevar un control de tus gastos e ingresos este mes. Has registrado todos los gastos en el archivo expenses.txt
, cada uno en una línea separada, mientras que los ingresos los has registrado en el archivo income.txt
siguiendo el mismo formato.
Ahora te gustaría saber si has gastado más de lo que has ganado o si te has mantenido dentro de los límites.
El programa debería imprimir Great, you've stayed within the limits!
si los gastos no exceden los ingresos, y We need to cut the spending the next month
de lo contrario.
expenses.txt | income.txt | Salida |
---|---|---|
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