Arithmetic Magic
Time limit2sMemory limit512 MB
Given N, compute (x+1)(y+1) - x - y - xy for chosen numbers x and y, which simplifies to 1, and raise it to N.
- Level
Easy2 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
David Blaine asked a spectator to think of two numbers. He then asked the spectator to multiply two numbers, each one greater by one than one of the chosen numbers, subtract from the result first one chosen number, then the other, and then their product, and raise the result to the -th power.
After that David looked closely at the spectator's face and correctly named the result. Your task is to repeat David's trick. Given , guess the number the spectator obtained.
Input
The input contains a single integer ().
Output
Output a single number: the result the spectator obtained.