Здравейте,
Може ли малко помощ със следната задача:
“Good” numbers
Description
Ivancho considers a number to be “good”, if it can be divided by each of its digits.
For example:
- 13 is not “good”, because it cannot be divided by 3;
- 36 is “good”, because it can be divided both by 3 and 6;
- 102 is “good” - can be divided by 1 and by 2;
- 103 is not “good” - cannot be divided by 3;
Help Invancho by writing a program, which counts the “good” numbers between number A and number B (inclusive).
Input
Read from the standard input the numbers A and B received on one line, separated by space.
Output
Print to the standard output the count of “good” numbers.
#Constraints
- 1 <= A <= B <= 100000
Examples
Input
1 10
Output
10
Explanation - between 1 and 10 there are 10 “good” numbers
Input
42 142
Output
29
Input
256 768
Output
50
using System;using System.Linq;namespace _05._Good_numbers{ class P - Pastebin.com - Това е решението ми, разгледах и други теми, но се обърках
Благодаря