Submit | All submissions | Best solutions | Back to list |
UTP_Q3 - Make Ends Meet |
Develop a Python code to determine whether household income is sufficient to cover monthly cost of living based on the number of adults and children of a family. The monthly cost of living for an adult is approximately RM500, while a child RM300
Input
An integer n identifies the number of cases in the first line. In subsequent n lines, each provides trifold information: a household monthly income in Malaysian Ringgit, the number adults and the number of children in the family
Output
For each case, the output will either be Yes if the difference between monthly household income and monthly cost of living non-negative, No otherwise
Example
Input: 4 2345 2 3 2500 4 2 3998 2 10 1600 2 2 Output: Yes No No Yes
Added by: | jbA |
Date: | 2021-06-02 |
Time limit: | 1s-2s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | NCSHARP JULIA PYTHON3 |