結果
問題 | No.1824 門\松\列 |
ユーザー | Akisawa3 |
提出日時 | 2022-02-12 23:01:49 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 204 ms / 2,000 ms |
コード長 | 248 bytes |
コンパイル時間 | 1,172 ms |
コンパイル使用メモリ | 86,556 KB |
実行使用メモリ | 209,788 KB |
最終ジャッジ日時 | 2023-09-11 11:40:23 |
合計ジャッジ時間 | 1,857 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 75 ms
70,988 KB |
testcase_01 | AC | 174 ms
209,788 KB |
testcase_02 | AC | 99 ms
75,972 KB |
testcase_03 | AC | 204 ms
160,848 KB |
testcase_04 | AC | 187 ms
188,168 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-1) * (j-2) s.append(p*2) accum_s = list(accumulate(s)) for q in qs: print(accum_s[q-3])