結果
| 問題 |
No.1824 門\松\列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-28 21:41:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 260 bytes |
| コンパイル時間 | 461 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 133,504 KB |
| 最終ジャッジ日時 | 2024-12-30 05:48:56 |
| 合計ジャッジ時間 | 6,014 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 TLE * 1 |
ソースコード
T = int(input())
def solve():
N = int(input())
ans = 0
for i in range(1, N + 1)[::-1]:
l = max(0, (i - 2) * (i - 1) // 2)
r = max(0, (i - 2) * (i - 1) // 2)
ans += l + r
print(ans * 2)
for _ in range(T):
solve()