Question: Integers num _ parts, allowed _ groups, and rejected _ groups are read from input. If num _ parts is less than or equal to

Integers num_parts, allowed_groups, and rejected_groups are read from input. If num_parts is less than or equal to 23, then add 4 to allowed_groups. Otherwise, add 6 to rejected_groups.
Click here for examples
Ex 1: If the input is:
22
7
1
then the output is:
11
1
Ex 2: If the input is:
24
7
1
then the output is:
7
7

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!