結果

問題 No.1824 門\松\列
ユーザー Akisawa3Akisawa3
提出日時 2022-02-12 22:56:37
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 290 bytes
コンパイル時間 307 ms
コンパイル使用メモリ 86,672 KB
実行使用メモリ 78,844 KB
最終ジャッジ日時 2023-09-11 11:33:55
合計ジャッジ時間 1,820 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

from scipy.special import perm
from itertools import accumulate

T = int(input())
qs = [int(input()) for _ in range(T)]
mq = max(qs)
s = []
for j in range(3, mq+1):
        p = perm(j-1, 2, exact=True)
        s.append(p*2)
accum_s = list(accumulate(s))
for q in qs:
    print(accum_s[q-3])
0