I will be grateful if anyone provide me the idea to solve the following problem.
The problem says, we have five digits a, b, c, d, e (0 <= a, b, c, d, e <= 9). Now for these five digits, we can convert each of 120 permutations(5!=120) of these five digits into a decimal number. if the sum of all the 120 numbers is x, then we can exclude a number N from the sum which results in a sum of 119 numbers. Now we will be given that sum of 119 numbers, we have to find the numbers N that we excluded. if multiple answers possible output them all in ascending order. Note : the initial five numbers will not be provided. Problem Link
It's mainly math. Try to calculate the final sum. You know, that each digit will appear on each decimal position the same number of times.
Digit $$$a$$$ will appear $$$24$$$ times on decimal position $$$1$$$ through $$$5$$$.
Digit $$$a$$$ will contribute $$$24 \cdot a \cdot (10000+1000+100+10+1)$$$ to the sum.
The final sum of all $$$120$$$ permutations will be $$$24 \cdot (a+b+c+d+e) \cdot (10000+1000+100+10+1)$$$
So the sum of $$$120$$$ Permutations has to be divisible by $$$24 \cdot 11111=266664$$$. So first find, how much do you need to add to the given number, to make it divisible by $$$266664$$$.
we can also try out all possibilities, that will also fits in the time limit.
link to solution
Thanks a lot OleschY for your contribution.
TOO much Difficult for me , Can anyone tell me the expected rating of this problem.