結果

問題 No.1824 門\松\列
ユーザー atjh16
提出日時 2022-02-03 17:00:20
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 21 ms / 2,000 ms
コード長 212 bytes
コンパイル時間 1,976 ms
コンパイル使用メモリ 191,100 KB
最終ジャッジ日時 2025-01-27 18:28:52
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int t;
long long n;

int main(){
    cin >> t;
    
    for(int j = 0; j < t; j++){
        cin >> n;
        cout << n * (n - 1) * (n - 2) / 3 * 2 << endl;
    }
}
0