Count Digits Problem
Count Digits Problem — ExecCode School DSA Practice
Solve the Count Digits problem on ExecCode. Free online school DSA practice in Numbers & Math Logic. Write and run code in Java, C++, Python — no signup required to run.
Problem description
You are given a whole number. Your task is to count how many individual number characters (digits) are in it. For example, the number '123' has three digits. Print this count.
Examples
Input 12345; Output 5. Input 10; Output 2
Constraints
1 <= N <= 10^18
Practice Count Digits free on ExecCode. Browse DSA problems, topic map, and placement guides.