結果
問題 | No.1824 門\松\列 |
ユーザー | Akisawa3 |
提出日時 | 2022-02-12 22:55:32 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 217 ms / 2,000 ms |
コード長 | 257 bytes |
コンパイル時間 | 301 ms |
コンパイル使用メモリ | 87,072 KB |
実行使用メモリ | 204,020 KB |
最終ジャッジ日時 | 2023-09-11 11:32:37 |
合計ジャッジ時間 | 1,761 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 74 ms
71,580 KB |
testcase_01 | AC | 174 ms
204,020 KB |
testcase_02 | AC | 97 ms
76,448 KB |
testcase_03 | AC | 217 ms
160,320 KB |
testcase_04 | AC | 182 ms
187,840 KB |
ソースコード
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 * j) - (3 * j) + 2 s.append(p*2) accum_s = list(accumulate(s)) for q in qs: print(accum_s[q-3])