8 lines
185 B
Python
8 lines
185 B
Python
ans = []
|
|
for _ in range(int(input())) :
|
|
temp = 0
|
|
for k in range(1, int(input())+1) :
|
|
temp += k*(k+1)*(k+2)
|
|
ans.append(temp//2)
|
|
|
|
print('\n'.join(list(map(str, ans)))) |