Question: Pocket money Problem Statement: Adam is having three kids Brian, Martin, and Peter. It's christmas and the kids are expecting pocket money from their father.
Pocket money
Problem Statement:
Adam is having three kids Brian, Martin, and Peter. It's christmas and the kids are expecting pocket money from their father. All the kids want the same amount and if it is less or more for anyone then they don't want it Now the problem is Adam is having number pf Dollar Notes with different values. He wants to distribute those notes in such a way that everyone gets an equal amount.
Now you have to find out, what is the amount he has distributed amongst the kids?
Input Format:
First line: A positive integer which represents the number of notes
Second line: Values of N notes separated by a space.Now you have to find out, what is the amount he has distributed amongst the kids?
Input Format:
First line: A positive integer N which represents the number of notes
Second line: Values of notes separated by a space.
Example
Output Format:
First Line: Print "YES" if the amount can be distributed equally else print NO
Second Line: If "YES" print the number of notes that each child gets in ascending order separated by space.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
