結果
問題 | No.1824 門\松\列 |
ユーザー | Ain48803949 |
提出日時 | 2022-01-28 22:11:26 |
言語 | Python3 (3.11.6 + numpy 1.26.0 + scipy 1.11.3) |
結果 |
AC
|
実行時間 | 47 ms / 2,000 ms |
コード長 | 990 bytes |
コンパイル時間 | 461 ms |
コンパイル使用メモリ | 10,900 KB |
実行使用メモリ | 10,300 KB |
最終ジャッジ日時 | 2023-08-28 20:10:52 |
合計ジャッジ時間 | 1,390 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 31 ms
10,224 KB |
testcase_01 | AC | 30 ms
10,172 KB |
testcase_02 | AC | 31 ms
10,300 KB |
testcase_03 | AC | 47 ms
10,168 KB |
testcase_04 | AC | 31 ms
10,216 KB |
ソースコード
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)