#147. 两位数共享数字判断

    ID: 147 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatLogic-1gesp1条件结构数学基础

两位数共享数字判断

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 1010 to 9999, return true if there is a digit that appears in both numbers, such as the 22 in 1212 and 2323. Otherwise, return `false.(Note:integerdivision,e.g.,. (Note: integer division, e.g., n/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 1212 and 2323. The number 1212 contains digits 11 and 22. The number 2323 contains digits 22 and 33. Since both numbers contain the digit 22, the output is true.

Constraints

Time limit: 11 second, Memory limit: 10241024 KB for each test case. The two input integers a,ba, b satisfy 10a,b9910 \le a, b \le 99.