85 Follower problem

Determine the sum of all three digit number N N such that N N is divisible by 11 and N 11 \dfrac{N}{11} is equal to sum of the square of the digit of N N .

Bonus :- Find for such 4 digit numbers


The answer is 1353.

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

Sahil Goyat
Jul 4, 2020
1
sum(i for i in range(100,1000) if i%11==0 and int(i/11)==sum([int(j)**2 for j in str(i)]))

Razing Thunder
Jul 3, 2020
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
def sums(int):
    a=  (int )% 10
    b=(int%100)//10
    c=int//100
    return a**2 + b**2 + c**2
#print(sum(123))
x=[]
for i in range(100,1000):
    a=int(i)
    if int(i)%11 == 0 :
        if (i/11) == sums(a):
            x.append(i)
print(sum(x))        

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...