0
$\begingroup$

You are heading to your hotel room but forget your room number.
Try to check the key card but the digits are blurred
You call to hotel desk info and a nerdy bell boy tell you:

  • Your room have 4 digits
  • the digits are different
  • the digits are in an increasing order
  • the product of the first two is the sum of the last two.

What is your room number?

$\endgroup$
4
  • $\begingroup$ Also I found three possible answers... $\endgroup$
    – user88
    Commented Apr 17, 2015 at 22:12
  • $\begingroup$ My bad, i only found one when made it. $\endgroup$ Commented Apr 17, 2015 at 22:24
  • 2
    $\begingroup$ Perhaps this hotel only has 3568 rooms. $\endgroup$
    – Ayefork
    Commented Apr 17, 2015 at 22:25
  • 2
    $\begingroup$ @Ayefork Or only 34 floors. $\endgroup$
    – user88
    Commented Apr 17, 2015 at 23:58

2 Answers 2

7
$\begingroup$

The room number is 3457, 3569, or 3578. 3 × 4 = 5 + 7, and 3 × 5 = 6 + 9 or 7 + 8.

$\endgroup$
0
$\begingroup$

The answers are 3457,3569 & 3578. Calculated using brute force: http://ideone.com/yD3RXL

$\endgroup$
1
  • $\begingroup$ That's a rather inefficient piece of code, though it does the job in this case. $\endgroup$
    – Rohcana
    Commented Sep 22, 2015 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.