結果

問題 No.1824 門\松\列
ユーザー irumo8202
提出日時 2022-01-28 22:47:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 150 ms / 2,000 ms
コード長 225 bytes
コンパイル時間 490 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 91,520 KB
最終ジャッジ日時 2024-12-30 09:30:33
合計ジャッジ時間 1,731 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())

M = 10 ** 6
res = [0] * (M + 1)
acc = [0] * (M + 1)
for i in range(3, M + 1):
    res[i] += res[i - 1] + i - 2
    acc[i] += acc[i - 1] + res[i]

for _ in range(T):
    N = int(input())
    print(acc[N] * 4)
0