def f(a,b):
if a and b:
return a//b+f(a%b,b) if a>b else b//a+f(a,b%a)
return 0
p,q,r,s=map(int,input().split())
t=0
for i in range(p,q+1):
for j in range(r,s+1):
t+=f(i,j)
print(t)
def f(a,b):
if a and b:
return a//b+f(a%b,b) if a>b else b//a+f(a,b%a)
return 0
p,q,r,s=map(int,input().split())
t=0
for i in range(p,q+1):
for j in range(r,s+1):
t+=f(i,j)
print(t)
Hi friends....
In this blog I'm going to give answer for daily test skillrack program, daily challenges and kick start programs and give some coding techniques.
It'll be helpful for u sure and make it usefull
Learn More →
0 Comments