Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

FACTORIAL

t=int(input())
for i in range(t):
n=int(input())
cnt=0
if n<5:
print(0)
else:
while(n>4):
n=n//5
cnt+=n
print(cnt)

AREA OR PERIMETER

# cook your dish here


T1 = int(input())
T2 = int(input())

def f(a,b):
peri = 2*(a+b)
area = a*b
return "Peri\n{0}".format(peri) if peri>area else "Area\n{0}".format(area) if area>peri else "Eq\
n{0}".format(area)

print(f(T1,T2))

RICHIE RICH

for i in range (int(input())):


a,b,x=map(int,input().split())
y=b-a
print(y//x)

COLDPLAY

for i in range(int(input())):
a,b=map(int,input().split())
c=0
while a>=b:
c+=1
a-=b
print(c)

SUMMER HEAT

# cook your dish here


T=int(input())
for _ in range(T):
x_a,x_b,X_A,X_B=map(int,input().split(" "))
c=X_A//x_a
d=X_B//x_b
print(c+d)

You might also like