← All problemsSign in

Special Round off 1

Statement: You are given an integer n and a count c. Integer n can consists of all digits from 0 to 9. You have to sum up last c digits of integer until it becomes a single digit value (0 <= d <= 9) and have to perform the following operations: 1) If the sum of last c digits is greater than equal to 5 and less than equal to 9 (5 <= sum <=9), then replace all the last c digits with a single d

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start