Hide

Problem C
Budget

Accepted submissions to this problem will be granted a score of 100

You are a member of the newly formed Mars colonization effort. Your job is to budget for three projects: the cloud seeding project, the equatorial magnetizer, and the space elevator. Given a budget, and the cost of the three projects, determine if all projects can be started immediately.

Input

Input consists of four lines.
The first line consists of one integer b, the budget. 106b106
The second line consists of one integer p1, the cost of the cloud seeding project. 106p1106
The third line consists of one integer p2, the cost of the equatorial magnetizer project. 106p2106
The fourth line consists of one integer p3, the cost of space elevator project. 106p3106

Output

If all projects can be started immediately, print Budget is sufficient., else print Budget is insufficient.

Sample Input 1 Sample Output 1
59
11
21
27
Budget is sufficient.
Sample Input 2 Sample Output 2
51
11
12
27
Budget is sufficient.
Sample Input 3 Sample Output 3
30
11
11
27
Budget is insufficient.
Hide

Please log in to submit a solution to this problem

Log in