MAX5

Level pending

Find the maximum five digit number a b c d e abcde which is divisible by b c d e bcde , c d e cde , d e de and e e .


The answer is 95625.

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.

1 solution

David Holcer
Mar 21, 2015
1
2
3
4
5
6
7
8
9
array=[]
for i in range(10**4,10**5):
    i=str(i)
    try:
        if int(i)%int(i[-4:])==0 and int(i)%int(i[-3:])==0 and int(i)%int(i[-2:])==0 and int(i)%int(i[-1:])==0:
            array.append(i)
    except (ZeroDivisionError):
        pass
print array[-1]

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...