Files
python/TangDou/AoSaiYiBenTong/YBT1035.cpp

12 lines
238 B
C++
Raw Normal View History

2025-08-30 18:35:01 +08:00
#include <bits/stdc++.h>
using namespace std;
int main() {
//cin读入优化
std::ios::sync_with_stdio(false);
int a1, a2, n;
cin >> a1 >> a2 >> n;
cout << a1 + (a2 - a1) * (n - 1) << endl;
return 0;
}