Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
94633 | 翁思宸 | 05等差数列 | C++ | Accepted | 1 MS | 272 KB | 219 | 2024-10-25 18:55:59 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() using namespace std; int main(){ int a1,a2,n,a,b; cin>>a1>>a2>>n; a=a2-a1; b=a1+a*(n-1); cout<<b; return 0; }