結果

問題 No.1824 門\松\列
ユーザー Ain48803949Ain48803949
提出日時 2022-01-28 22:11:26
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 64 ms / 2,000 ms
コード長 990 bytes
コンパイル時間 349 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,520 KB
最終ジャッジ日時 2024-12-30 07:18:47
合計ジャッジ時間 1,570 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect,collections,copy,heapq,itertools,math,string,sys,queue,time,random
input = lambda: sys.stdin.readline().rstrip()
def I(): return input()
def IS(): return input().split()
def II(): return int(input())
def IIS(): return list(map(int,input().split()))
def LIIS(): return list(map(int,input().split()))
def comb(n, r):return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
ragen=range
INF=10**18
MOD=998244353
#sys.setrecursionlimit(10**7)
alpha="abcdefghijklmnopqrstuvwxyz"
def bit(x):
    return bin(x).count("1")
##############################################################################
t=II()
for i in range(t):
    n=II()
    n-=2
    print(n*(n+1)*(n+2)//3*2)
0