Christmas Gifts of 9
CodeChefOpen on judge ↗
Santa wants to give some gifts to Chef. So Santa told Chef that choose a number(N) and drop that number in a shocks and Santa will give gifts according to that number. Santa decided that he will form a string by taking N number of 9's,and he will square that string and then he will sum up the digits of string. Now this new formed number will be the amount of candies that Santa will give to Chef.
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start