Count Numbers with Digits Sum

Given an integer X, write an algorithm to find the number of integers which are less than or equal to X and whose digits add up to Y.

Input Description: The first line of input consists of an int...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: