← Back to List
14545번: Square ↗
Solutions
Python 3
80 B | 80 chars
for i in range(int(input())): n = int(input()) print(n*(n+1)*(2*n+1)//6)