希望更丰富的展现?使用[Markdown](https://www.luogu.org/wiki/show?name=%E5%B8%AE%E5%8A%A9%EF%BC%9Amarkdown)
by Kuriyama_Mirai @ 2019-09-06 18:22:40
希望更丰富的展现?使用Markdown
by NIMNIM @ 2019-09-06 18:30:54
希望更丰富的展现?使用Markdown
by 星尘舰队 @ 2019-09-06 18:40:38
希望更丰富的展现?使用Markdown(保持队形)
by _Camille_ @ 2019-09-06 22:05:59
希望更丰富的展现?使用Markdown
by EarthGiao @ 2019-09-08 15:50:02
请不要使用[Markdown](https://www.luogu.com.cn/wiki/show?name=%E5%B8%AE%E5%8A%A9%EF%BC%9Amarkdown)来突显头文件的重要性。
by BlueDone @ 2019-09-20 19:35:21
请不要使用Markdown来突显头文件的重要性。
by Leoeight @ 2019-11-01 16:38:23
请不要使用Markdown来突显头文件的重要性。
by 智子·起源 @ 2019-11-22 12:38:29
你写个
**```cpp**
**```**
就好了
by 骗分过样例 @ 2020-04-14 17:14:04
```cpp
include<bits/stdc++.h>
using namespace std; int main() { int n,ans[1000]={0},total[1000]={0},a[1000]; cin>>n; for(int j=1;j<=n;j++) { cin>>a[j]; for(int i=a[j];i>=1;i--) { total[j]=(1+i)i/2; ans[j]+=total[j]; total[j]=0; } total[j]=0; for(int i=a[j]-1;i>=1;i=i-2) { total[j]=(1+i)i/2; ans[j]+=total[j]; total[j]=0; } cout<<ans[j]<<endl; } return 0; }
```
整合一下就是这样
by 清风雪月 @ 2021-08-28 19:31:56