Champernowne Verification
Question
Solution
Idea
Instead of taking the input as an integer, I take it as a string. So, this problem becomes a basic string manipulation problem.
The first 9 possible digits is easy to validate
To validate the 10th digit, you can utilise the
strcmp()from thestring.hC Standard Libaray.
Code
https://github.com/mendax1234/Coding-Problems/blob/main/kattis/champernowneverification/champernowneverification.c
Last updated