結果

問題 No.1824 門\松\列
ユーザー ys
提出日時 2022-03-06 23:40:41
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 162 bytes
コンパイル時間 487 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 63,488 KB
最終ジャッジ日時 2024-07-21 10:11:12
合計ジャッジ時間 4,124 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 2 TLE * 1 -- * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

for i in range(int(input())):
  N = int(input())
  ans = 0
  for i in range(1, N + 1):
    ans += (N - i) * (N - i - 1)
    ans += (i - 1) * (i - 2)
  print(ans)
0