#147. 两位数共享数字判断
两位数共享数字判断
Shared Digit
Background
Congcong has recently been studying the properties of numbers. He is curious to know if there's an interesting connection between two two-digit numbers.
Problem Description
Given two integers, each in the range to , return true if there is a digit that appears in both numbers, such as the in and . Otherwise, return `falsen/10$, gives the left digit (tens place) while the modulo operation, e.g.,$n%10$, gives the right digit (ones place).)
Input Format
Input is given from standard input in the following format.
a b
Output Format
Output is given to standard output in the following format.
result
Sample
12 23
true
12 43
false
12 44
false
Sample Explanation
For the first sample, the two input numbers are and . The number contains digits and . The number contains digits and . Since both numbers contain the digit , the output is true.
Constraints
Time limit: second, Memory limit: KB for each test case. The two input integers satisfy .