結果
問題 | No.1824 門\松\列 |
ユーザー |
|
提出日時 | 2022-02-12 23:01:49 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 209 ms / 2,000 ms |
コード長 | 248 bytes |
コンパイル時間 | 167 ms |
コンパイル使用メモリ | 81,920 KB |
実行使用メモリ | 215,808 KB |
最終ジャッジ日時 | 2024-06-29 02:16:19 |
合計ジャッジ時間 | 1,397 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 4 |
ソースコード
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 = (j-1) * (j-2) s.append(p*2) accum_s = list(accumulate(s)) for q in qs: print(accum_s[q-3])