[SOLVED] Algothon- Match balls

20.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

There are N colors balls in a box. If you can get a pair of same color balls you win. find out how many balls you

need to take so that there is at least one matching pair.

Assume that there are indefinite number of balls available with given colors.

Example –

ifN = 5

It means there are indefinite number of 5 different color balls.

Input Format N = Number of colors Constraints

Output Format

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.