Sunday, July 28, 2013

TRAINGLE

TRYANGLE
CODE

import math
t=int(input())
for i in range(1,t+1):
    n=int(input())
    ans=(n*(n-1)*(n-2))/6
    print "Case %d: %d" % (i,ans)

No comments:

Post a Comment