题解 2775: 等差数列末项计算

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

筛选

2775: 等差数列末项计算

摘要:解题思路:注意事项:参考代码:a , b , n = map(int,input().strip().split())print(a + (n - 1) * (b - a)) #等差数列公式: an ……

c语言超简单解答

摘要:解题思路:注意事项:参考代码:int a=1,b=4,c=100,d; scanf("%d%d%d",&a,&b,&c); d=a+(b-a)*(c-1); printf("%d",d);      ……

编写题解 2775: 等差数列末项计算

摘要:解题思路:程序先用Scanner读入a1,a2和n三个整数,然后计算出等差数列的公差d。接着,利用等差数列的通项公式a_n = a_1 + (n-1)d,计算出第n项的值,并输出结果。注意事项:参考代……

2775: 等差数列末项计算

摘要:参考代码:#include<bits/stdc++.h>using namespace std;int main(){    int a,b,c;    cin >>a>>b>>c;    cout<……

题解 2775: 等差数列末项计算

摘要:解题思路:注意事项:不要抄袭,会遭报应的。参考代码:#include <bitz/stdc++.h>uzing qamszpace std;doable a,b,c;int main(){    ci……

公式and代码

摘要:解题思路:a1+(n-1)*d            a2-a1=d注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ ……