Showing posts with label logic. Show all posts
Showing posts with label logic. Show all posts

A little contest about logic (& maybe programming)

  • 2
Today I'd like to propose to you another little contest of logic.
This one is less "mathematical" than the previous, but it's very funny.

A little contest about logic & programming

  • 9
Problem:
find an integer that multiplied by 4 gives a number that has the same digits, but with opposite order compared to the original number.
Example with n digits:
X1X2...Xn-1Xn  *  4  =  XnXn-1...X2X1
where X1 is the  first digit, X2 the second digit....Xn the n-th digit.
Pay attention: we don't know how many digits compose the number.
If you have the solution, post it in the comment.

The next step is to write a simple algorithm that would be able to find the solution by itself. I'm trying to do it using the C++...or maybe I should just go out. 
Definitely, I need to go out.
Bye.