Saturday, June 23, 2018

QCJ2 - Another Box Problem : Classical

#The solution in Python 3 is as follows:

from math import factorial as f
while True:
n = int(input())
if n==0:
           break
print ((f(2*n) // f(n) // f(n+1)) % 761238923)        #simple probability


#Keep visiting for more solutions of SPOJ problems in Python 3.Thank you!!!