結果
| 問題 |
No.1824 門\松\列
|
| コンテスト | |
| ユーザー |
taisii2
|
| 提出日時 | 2022-01-28 22:25:50 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 299 bytes |
| コンパイル時間 | 2,074 ms |
| コンパイル使用メモリ | 165,640 KB |
| 実行使用メモリ | 10,016 KB |
| 最終ジャッジ日時 | 2024-12-30 08:11:03 |
| 合計ジャッジ時間 | 6,215 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 TLE * 1 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
int T;
cin>>T;
while(T--){
long long N;
cin>>N;
long long ans=0;
for(long long i=0;i<2*N;i++){
if(i<N){
ans+=i*(i-2);
}else{
ans+=(2*N-i-1)*(2*N-i-1);
}
}
cout<<ans<<endl;
}
}
taisii2