Old Keypad
CodeChefOpen on judge ↗
Old Keypad Print total number of times key is pressed in order to type the input string on a old keypad as shown in the figure. Also print the key which is pressed maximum times. Input - One and only that contains a srting. Output - Print total key presses in one line and maximum key pressed on the next. Example Input: CHARUSAT Output: 17 7 Explanation: C: 2-2-2 H: 4-4 A: 2 R: 7-7-7 U:
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