My birthday Puzzle, part 1

508 × S A Y = H A P P Y + B I R T H + D A Y 508 \times \overline{SAY} = \overline{HAPPY} + \overline{BIRTH} +\overline{DAY}

Each letter represents a different digit from 0 to 9. There are two solutions to this puzzle. State the smaller 9-digit number B I R T H D A Y S \overline{BIRTHDAYS} .


You may continue to next puzzle here .


The answer is 450928371.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Fletcher Mattox
May 6, 2020

Are you sure there are only two solutions? I found 35. Am I missing something?

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
from itertools import permutationsdigits = range(11)
solution = set()
for (a,b,d,h,i,p,r,s,t,y) in permutations(digits, 10):
    say = 100*s + 10*a + y
    happy = 10000*h + 1000*a + 100*p + 10*p + y
    birth = 10000*b + 1000*i + 100*r + 10*t + h
    day = 100*d + 10*a + y
    if s*h*b*d == 0:
        continue
    if 508*say == happy + birth + day:
        birthdays = int(''.join(list(map(str,[b,i,r,t,h,d,a,y,s]))))
        solution.add(birthdays)
print("smallest solution: %d" % (min(solution)))
print("%d unique solutions" % (len(solution)))
print(sorted(solution))
'''
Output:
smallest solution: 450928371
35 unique solutions
[450928371, 860741592, 1638105402, 1658103402, 1903106452, 3718106902, 3768101902, 4100186732, 4110986532, 4169810532, 5010681732, 50109847
'''

@Fletcher Mattox , "Each letter represents a different digit from 0 to 9."

Chan Lye Lee - 1 year, 1 month ago
Lu Chee Ket
Nov 30, 2015

The equation is:

50800 S + 4070 A+ 506 Y = 10001 H + 10000 B + 1000 I + 110 P + 100 R + 100 D + 10 T

Generate 1 to 9 for S, H, B and D while 0 to 9 for A, Y, I, P, R and T; filter away any equal among all.

Look for TRUE for the equation introduced above as the conditional statement to quote:

1
2
3
S   A   Y   H   B   I   P   R   D   T
1   3   7   2   4   5   6   0   8   9
2   5   9   4   8   6   3   0   1   7

With running figures as stated above, there are i n d e e d indeed two solutions only! The smaller wanted:

508 × \times 137 = 23667 + 45092 + 837 = 69596

BIRTHDAYS = 450928371

LONGINT is chosen using Turbo Pascal.

Answer: 450928371 \boxed{450928371}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...