HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > IMPC - 2013-2014 > problem:


14-03-10. 50412 - K numbers

IMPC - 2013-2014

Start: Mar.16.2013 at 12:00:00 PM
Finish: Mar.16.2013 at 05:00:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (5)

Contest problems

• 50386 - Conformity
• 14-01-10. 50457 - The Number of W...
• 14-01-40. 50419 - The longest bitoni...
• 14-01-50. 50795 - Trunk
• 14-03-10. 50412 - K numbers
• 14-03-20. 50398 - Sum of kth Anti-d...
• 14-03-30. 50377 - kth Permutation
• 14-03-40. 50773 - Balanced Sum Tree
• 14-03-60. 50382 - Parkside's Other ...
• 14-03-70. 50468 - Draw Matrix - 2
• 14-03-70. 50468 - Draw Matrix - 2
• 14-03-80. 50675 - Kruja Boys
• 14-03-90. 50717 - Hurdle Jumping

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.
Question by Evis Hoxha.

K numbers

Dattaraya Ramchandra Kaprekar, an Indian recreational mathematician, while experimenting with number properties, made an interesting discovery. He found out that some non-negative integers have the following property: their square can be split into two parts that add up to the original number again. For example: 452 = 2025 and 20+25 = 45. He named them K numbers.

By convention, the second part may start with the digit 0, but must be positive. For example, 999 is a K number, because 9992= 998001, which can be split into 998 and 001, and 998 + 001 = 999. But 100 is not; although 1002 = 10000 and 100 + 00 = 100, the second part here is not positive.

To make further researches, he needs a program to test if a given number N is a K number.

Input specifications

A positive integer N will be given where n < 600000.

Output specifications

If N is a K number, output the splited form of the number. For example, if N=45, the output will be: 20 25
If it is not, output "Impossible".

Input 1 Output 1
45 20 25

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

www.contester.ru