Mischievous Math
시간 제한1초메모리 제한1024 MB
d가 주어질 때, 1부터 100 사이에서 d와 다른 서로 다른 세 수를 골라 덧셈, 뺄셈, 곱셈, 나눗셈으로 d를 만들 수 없도록 출력한다.
문제
Max enjoys playing number games, whether it involves finding a combination that leads to a given result or discovering all possible results for some given integers. The problem is that Max is only 10 and has limited mathematical knowledge, which restricts the possibilities for these games. Luckily, in today's maths class, Max learned the concept of parentheses and their effects on calculations. He realises that incorporating parentheses into his number games could make them much more interesting. After getting home from school, he asked his sister Nina to play a variant of his favourite number game with him, using parentheses.
In this new game, Max first tells her a number . Nina then tells him three numbers , and . Now, Max needs to find an arithmetic expression using addition, subtraction, multiplication and division, using each of these three numbers (, and ) at most once, such that the result is equal to . The numbers and all have to be distinct, and Max is allowed to use parentheses as well.
For instance, for , , and a possible solution would be , and for , , and a possible solution would be , without using the .
Nina is quickly annoyed by this game. She would rather spend the afternoon with her friends instead of playing games with her little brother. Therefore, she wants to give him a task that occupies him for as long as possible. Help her to find three numbers , and such that it is impossible for Max to come up with a solution.
입력
The input consists of:
- One line with an integer (), Max's chosen number.
출력
Output three numbers , and () such that the numbers , , and are pairwise distinct and there is no solution to the number game.