Egg Distribution

Company: Lam Research_7aug

Difficulty: medium

Problem Statement

Egg Distribution Problem Description Fitness, an important effort to promote healthy eating, has allotted 1 tray of eggs each to N students. Each tray is filled with N eggs. Every student is allotted a random number each day, and all students with the same random number must form a group. All the students in that group must consume eggs that are equal to the group size. For example, if group size is 3 then all the students in that group must consume 3 eggs from their tray. The Principal wanted a dashboard which displays the number of eggs left in each student's tray. Can you help with a program that accepts the number of students N and the random numbers allotted to each student, and prints the number of eggs left in each tray? Read the input from STDIN and print the output to STDOUT. Do not write arbitrary strings anywhere in the program, as these contribute to the standard output and testcases will fail. Constraints Number of students, N > 0 Input Format The first line of input conta