题解 1059: 二级C语言-等差数列

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

二级C语言-等差数列

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){int n,d = 3,a1 = 2;scanf("%d",&n);printf("%d\n",n*a1 + n*……

等差数列前n项和

摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main (void) {  int n,i,m=0,sum;  int a[100000];//开辟空间   scanf("……

等差数列的求和

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%d",&n); int sum=0; for(int i=1;i<=n;i++){……

二级C语言-等差数列

摘要:解题思路:直接模拟注意事项:要用long long参考代码:#include<bits/stdc++.h>using namespace std;long long n,s,t=2;int main(……

思路简单一些吧

摘要:解题思路:大家都用*3-1,还用while,我用的好少,总是用for循环有时候也要换个方法方向注意事项:我没有看出来i*3-1的规律,只知道在前一个数基础上加三。我的程序好理解吗参考代码:n=int(……

二级C语言-等差数列

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<fstream>#include<algorithm>using namespace std;int n,t=2,s……

二级C语言-等差数列

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main() {int n,sum=0;scanf("%d",&n);int a[n],i;a[0]=2;for(i=1; i<……