Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
264 ZRH 05等差数列 C++ Wrong Answer 0 MS 268 KB 388 2022-07-22 14:52:32

Tests(0/10):


Code:

#include<iostream> //输入函数库 #include<iomanip> #include<cmath> //数学函数库 #include<cstdio> #include<ctime> #include<cstring> #include<cstdlib> #include<string> #include<stdlib.h> #include<sys/time.h> using namespace std; int main(){ int a1,a2,n,x,y; cin>>a1>>a2>>n; x=a2-a1; y=a2; for(int i=1;i<=n;i++){ y=y+x; } cout<<y; return 0; }


Run Info:

------Input------
3 11 9
------Answer-----
67
------Your output-----
83