write a program to print sum of the numbers divisible by the given number T from M to N in python
# Python 3.9.5
T, M, N = input("Enter T, M and N space separation: ").split()
counter = 0
for i in range(int(M), int(N)+1):
if (i % int(T) == 0):
counter += i
print(counter)
Comments
Leave a comment