結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
83,328 KB
testcase_01 AC 79 ms
83,480 KB
testcase_02 AC 102 ms
84,348 KB
testcase_03 AC 132 ms
85,280 KB
testcase_04 AC 101 ms
84,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

cnt = [0] * (10 ** 6 + 1)
cnt[3] = 4
total = 4
total2 = 4
for i in range(4, len(cnt)):
    total2 += total
    cnt[i] = total2 + (i-2) * 4
    total2 += (i-2) * 4
    total += (i-2) * 4


T = int(input())
for _ in range(T):
    print(cnt[int(input())])
0