Given a integer number n, find largest sum of digits in all divisors of n.
The first line of the input contains a single integer T, denoting the number of test cases. Then T test case follows, a single line of the input containing a positive integer N.
For each testcase, print the largest sum of digits of divisors.
For testcase 1: The divisors are: 1 2 3 4 6 12. 6 is maximum digit-sum among all divisors.
For testcase 2: The divisors are: 1 2 4 68. 68 consists of maximum digit-sum among all divisors.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.