아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Mischievous Math

시간 제한1초메모리 제한1024 MB

요약
d가 주어질 때, 1부터 100 사이에서 d와 다른 서로 다른 세 수를 골라 덧셈, 뺄셈, 곱셈, 나눗셈으로 d를 만들 수 없도록 출력한다.
난이도

보통10점 중 4점

유형
완전 탐색, 수학, 구현
정답자
아직 제출이 없습니다

문제

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 dd. Nina then tells him three numbers aa, bb and cc. Now, Max needs to find an arithmetic expression using addition, subtraction, multiplication and division, using each of these three numbers (aa, bb and cc) at most once, such that the result is equal to dd. The numbers a,b,ca, b, c and dd all have to be distinct, and Max is allowed to use parentheses as well.

For instance, for a=5a = 5, b=8b = 8, c=17c = 17 and d=96d = 96 a possible solution would be (17−5)×8=96(17 - 5) \times 8 = 96, and for a=3a = 3, b=7b = 7, c=84c = 84 and d=12d = 12 a possible solution would be 84÷7=1284 \div 7 = 12, without using the 33.

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 aa, bb and cc such that it is impossible for Max to come up with a solution.

입력

The input consists of:

  • One line with an integer dd (1≤d≤1001 \le d \le 100), Max's chosen number.

출력

Output three numbers aa, bb and cc (1≤a,b,c≤1001 \le a,b,c \le 100) such that the numbers aa, bb, cc and dd are pairwise distinct and there is no solution to the number game.

예제3

  1. 예제 1

    입력
    5
    
    예상 출력
    1 20 30
    
  2. 예제 2

    입력
    100
    
    예상 출력
    33 55 77
    
  3. 예제 3

    입력
    3
    
    예상 출력
    11 9 4