HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


50649 - Puzzle

Guest
• Discussion of problem (1)

Section problems

• 50377 - kth Permutation
• 50341 - Separate Into Digits
• 50424 - Area
• 50335 - Five Math Operators
• 50299 - Median
• 50301 - Fractions to Decimals
• 50304 - Number Pattern
• 50305 - John's Tasks
• 50649 - Puzzle
• 50321 - Missing Number
• 50308 - IT Knowledge Seminars
• 50310 - Kinetic Energy
• 50314 - Falling Distance
• 50316 - Population Bar Chart
• 50530 - Sum of Ratios
• 50384 - Permutations revisited
• 50368 - Right-most non zero digit in N!

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Prepared by: Ilir Capuni. Difficulty Alpha

Puzzle

Write a program that for a given integer n (1≤n ≤200,000) determines the integers a and b such that
  n = a*b*(a+b) or write "Impossible" if that is not possible.
Input
The first line contains a single number N where 2 < N < 100.

  Sample 1 Sample 1
Input 30 65
Output 1 5
2 3
3 2
5 1
impossible


Для отправки решений необходимо выполнить вход.

www.contester.ru