m=int(input("m=")) n=int(input("n=")) if m>n: m,n=n,m s=0 txt="" for i in range(m,n+1): if i%3==0 and i%5==0: s+=i #txt+=str(i)+"+" #print(txt[:-1],"=",s) print("s=",s)