結果

問題 No.1824 門\松\列
ユーザー gr1msl3ygr1msl3y
提出日時 2022-01-28 21:54:19
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 220 bytes
コンパイル時間 1,608 ms
コンパイル使用メモリ 86,684 KB
実行使用メモリ 93,288 KB
最終ジャッジ日時 2023-08-28 19:49:20
合計ジャッジ時間 1,367 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
91,436 KB
testcase_01 AC 87 ms
91,352 KB
testcase_02 AC 98 ms
92,008 KB
testcase_03 AC 120 ms
93,288 KB
testcase_04 AC 99 ms
92,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

M = 10**6
A = [i*(i+1) for i in range(M+1)]
B = [0]*(M+1)
for i in range(1, M+1):
    B[i] = B[i-1]+A[i]

T = int(input())
ans = [0]*T
for i in range(T):
    N = int(input())
    ans[i] = B[N-2]*2

print(*ans, sep='\n')
0