結果

問題 No.1824 門\松\列
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-01-28 21:52:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 153 bytes
コンパイル時間 237 ms
コンパイル使用メモリ 86,728 KB
実行使用メモリ 85,140 KB
最終ジャッジ日時 2023-08-28 19:47:59
合計ジャッジ時間 1,270 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
83,548 KB
testcase_01 AC 76 ms
83,436 KB
testcase_02 AC 96 ms
84,108 KB
testcase_03 AC 127 ms
85,140 KB
testcase_04 AC 99 ms
84,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

M = 10**6+5
ans = [0]*M
for i in range(1,M):
    ans[i] = ans[i-1]+i*(i+1)*2
t = int(input())
for i in range(t):
    n = int(input())
    print(ans[n-2])
0