結果
| 問題 | 
                            No.1824 門\松\列
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-08-12 18:25:26 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 20 ms / 2,000 ms | 
| コード長 | 296 bytes | 
| コンパイル時間 | 2,088 ms | 
| コンパイル使用メモリ | 192,016 KB | 
| 最終ジャッジ日時 | 2025-01-30 20:32:36 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 4 | 
ソースコード
typedef long long ll;
typedef long double ld;
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
    ll t;
    std::cin >> t;
    for (int iii = 0; iii < t; iii++) {
        ll n;
        std::cin >> n;
        std::cout << n*(n-1)*(n-2)*2/3 << std::endl;
    }
}