結果
| 問題 | No.1824 門\松\列 |
| コンテスト | |
| ユーザー |
taisii2
|
| 提出日時 | 2022-01-28 22:25:50 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 299 bytes |
| 記録 | |
| コンパイル時間 | 959 ms |
| コンパイル使用メモリ | 179,520 KB |
| 実行使用メモリ | 11,168 KB |
| 最終ジャッジ日時 | 2026-06-03 23:30:53 |
| 合計ジャッジ時間 | 4,799 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 2 TLE * 1 -- * 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