Header Ads

Header ADS

1132.Multiple of 13 in python

This is the solution of this problem in python:

X=int(input())
Y=int(input())
summ=0
if(X>Y):
    X,Y=Y,X
    for i in range(X,Y+1):
        if(i%13!=0):
            summ=summ+i
else:
    for i in range(X,Y+1):
        if(i%13!=0):
            summ=summ+i
   
print(summ)

No comments

Powered by Blogger.