跳到正文

题解

P5722 【深基4.例11】数列求和题解:我没有高斯聪明,那我直接推出等差数列求和公式(能不能过我不知道)

020714xsh约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2026年3月17日
篇幅
约 1 分钟
获赞
1
题目
P5722

版本

  1. v1当前

#include<iostream> #include<cstdio> using namespace std; int main() { int n; cin>>n; cout<<(1+n)*n/2; return 0; }

原文