#143. 彩票结果判断

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

彩票结果判断

Red Lottery Ticket

Background

Dawei is checking his red lottery ticket. The ticket has three numbers, a,b,a, b, and cc, each being 0,1,0, 1, or 22. He needs your help to determine the prize based on a specific set of rules.

Problem Description

You have a red lottery ticket showing ints a,b,a, b, and cc, each of which is 0,1,0, 1, or 22.

If they are all the value 22, the result is 1010. Otherwise if they are all the same, the result is 55. Otherwise so long as both bb and cc are different from aa, the result is 11. Otherwise the result is 00.

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.

result

Sample

2 2 2
10
2 2 1
0
0 0 0
5

Sample Explanation

Sample 1: a=2,b=2,c=2a=2, b=2, c=2. All numbers are 22, satisfying the first condition, so the result is 1010.

Sample 2: a=2,b=2,c=1a=2, b=2, c=1. Does not satisfy the condition that all numbers are 22. Does not satisfy the condition that all numbers are the same. bb (22) is not different from aa (22), so it does not satisfy the condition that both bb and cc are different from aa. Thus, the result is 00.

Sample 3: a=0,b=0,c=0a=0, b=0, c=0. Does not satisfy the condition that all numbers are 22. Satisfies the condition that all numbers are the same, so the result is 55.

Constraints

Time limit: 11 second, Memory limit: 10241024 KiB for each test case.