시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 (추가 시간 없음) | 1024 MB | 905 | 769 | 735 | 85.366% |
When one looks at a set of numbers, one usually wonders if there is a relationship among them? This task is more manageable if there are only three numbers.
Given three distinct positive integers, you are to determine how one can be computed using the other two. Print 1 if any of the three numbers is the sum of the other two numbers, print 2 if any of the three numbers is the product of the other two numbers, print 3 otherwise. Assume that exactly one of these three messages will apply.
There is only one input line; it contains three distinct positive integers, each between 2 and 1000 (inclusive).
Print the appropriate message as described above.
10 30 20
1
10 20 200
2
100 5 700
3