0

Challenge: Kaprekar numbers

In mathematic, a Kaprekar number for a given base is a non-negative integer, the representation of whose square in that base can be split into two parts that add up to the original number again. For instance, 45 is a Kaprekar number, because 452=2025 and 20+25=45. 297 is a Kaprekar number too, because 2972=88209, which can be split into 88 and 209, and 88+209=297. Task: write a code to find all the Kaprekar numbers from 1 to x (code should provide explanation) in any language you prefer. Enjoy coding :)

2nd Sep 2017, 5:22 PM
Szevek
Szevek - avatar
3 Respuestas
2nd Sep 2017, 5:26 PM
Burey
Burey - avatar
+ 1
heres mine check i exceed the limit upto 400k https://code.sololearn.com/c27f9n3YZgCX/?ref=app
2nd Sep 2017, 5:40 PM
sayan chandra
sayan chandra - avatar
24th Dec 2019, 1:08 PM
Алексей Васильев
Алексей Васильев - avatar