Challenge: Kaprekar numbers | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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 Answers
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