import sys
d=int(raw_input())
for j in xrange(0,d):
n=int(raw_input())
sum=0
c=n-2
sum=(c*(c-1))/2
print sum+2
j=j+1
sys.exit(0)

I am getting an TLE for this program..tell me the corrections to be made.

Suggested Topics

Want to read more? Browse other topics in Python or view latest topics.