#139. 判断三个数是否有相同个位数

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

判断三个数是否有相同个位数

Same Rightmost Digit

Background

Congcong is currently learning about number properties. He wants to know if, given three integers, at least two of them have the same rightmost digit.

Problem Description

Given three non-negative integers aa, bb, cc, return true if two or more of them have the same rightmost digit. The integers are non-negative. Note: the % "mod" operator computes the remainder, e.g. 17%1017 \% 10 is 77.

Input Format

Input is given from Standard Input in the following format.

a b c

Output Format

Output is printed to Standard Output in the following format.

true or false

Sample

23 19 13
true
23 19 12
false
23 19 3
true

Sample Explanation

Sample 1: The rightmost digit of 2323 is 33, the rightmost digit of 1919 is 99, and the rightmost digit of 1313 is 33. Since 2323 and 1313 both have 33 as their rightmost digit, true is returned.

Sample 2: The rightmost digit of 2323 is 33, the rightmost digit of 1919 is 99, and the rightmost digit of 1212 is 22. No two or more integers have the same rightmost digit, so false is returned.

Sample 3: The rightmost digit of 2323 is 33, the rightmost digit of 1919 is 99, and the rightmost digit of 33 is 33. Since 2323 and 33 both have 33 as their rightmost digit, true is returned.

Constraints

Time limit: 1 second, Memory limit: 1024 KiB for each test case.