Little Elephant and Numbers
题意翻译
小象喜欢数字。
他有一个正整数x。 小象想要找到正整数d的数量,使得d是x的除数,并且x和d在其十进制表示中具有至少一个共同(相同)数字。
帮助小象找到所描述的数字。
题目描述
The Little Elephant loves numbers.
He has a positive integer $ x $ . The Little Elephant wants to find the number of positive integers $ d $ , such that $ d $ is the divisor of $ x $ , and $ x $ and $ d $ have at least one common (the same) digit in their decimal representations.
Help the Little Elephant to find the described number.
输入输出格式
输入格式
A single line contains a single integer $ x $ $ (1<=x<=10^{9}) $ .
输出格式
In a single line print an integer — the answer to the problem.
输入输出样例
输入样例 #1
1
输出样例 #1
1
输入样例 #2
10
输出样例 #2
2