結果

問題 No.1824 門\松\列
ユーザー shinichishinichi
提出日時 2022-01-28 21:50:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 253 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 83,712 KB
最終ジャッジ日時 2024-12-30 06:18:52
合計ジャッジ時間 1,434 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

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