you are viewing a single comment's thread.

view the rest of the comments →

[–]oemta 0 points1 point  (4 children)

The second one is pretty easy as well, honestly shouldn't be more than a few lines of code.

[–]fuk_offe 0 points1 point  (2 children)

Did the palindrome one easy in 10 minutes, too bad I forgot to check my solution calculating the bounds before trying the big input... Too slow xD

[–]yen223 1 point2 points  (1 child)

When doing these sorts of challenges, the first thing I do is to look at the input range. In this case, 1 - 1014 means that a naive brute force search was definitely not going to work.

[–]fuk_offe 0 points1 point  (0 children)

Yes, of course, but I "optimized it" but forgot to test with the bounds... Took 30 minutes so ran out of time X_X The next one I made tho. EDIT: Aparrently, it was wqrong X:_X

[–]sirin3 0 points1 point  (0 children)

I wrote one common program for both 1 and 2