Hello and welcome to the challenge!
Write a code which for every given integer
n returns a number
s such that:
nequals maximum of all possible results for
digitSum(a) + digitSum(b)
a + b = n
a >= 0 and b >= 0
solve(29) = 11, because if we take
14, their sum will equal
digitSum = 1 + 5 + 1 + 4 = 11, what is the maximum value
n- integer number
s- integer number
0 < n < 10000
Did you like this challenge and would like to try your hand at some interesting big programming competitions? Check what’s all over the news in tech world in June 2019 in our article with upcoming IT Conferences, Hackathons and Online Challenges in June 2019.
Have fun and good luck! :)