[quote="ruby_georgina"]i am getting TLE for MARBLES please help me
import math
for i in range(1):
try:
n=input('')
except EOFError:
break
for i in range(n):
try:
a,b=raw_input().split()
a=int(a)-1
b=int(b)-1
ac=a-b
n=1
r=1
x=1
while a!=ac:
n=n*a
a=a-1
while b!=0:
r=r*b
b=b-1
print n
print r
res=n/r
print res
except EOFError:
break
except ValueError:
break
except ZeroDivisionError:
break
[/quote]
This is very nice post thanks for sharing this great post.