题解 | 等差数列
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int begin = 2;
int end = 3*n-1;
cout << (begin + end)*n/2;//(首项+末项)*项数/2
}
// 64 位输出请用 printf("%lld")
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int begin = 2;
int end = 3*n-1;
cout << (begin + end)*n/2;//(首项+末项)*项数/2
}
// 64 位输出请用 printf("%lld")
相关推荐
凝孑哒哒:项目经历,不要光写工作内容,要加一些在这个项目中学习了什么有什么成长,比如实现什么设计模式,学会什么设计思想,还有就是明确你在这个项目中的具体职责,最终对项目有什么成果