循环能过(情理之中,意料之中)
查看原帖
循环能过(情理之中,意料之中)
1309411
distorted_RE楼主2024/6/21 00:08
#include<bits/stdc++.h>
using namespace std;
int n,m,k; 
int main(){
	cin>>n>>m>>k;
	int x=m-n,j=n;
	for(int i=2;i<=k;i++){
		j+=x;
	}
	cout<<j;
	return 0;
}
2024/6/21 00:08
加载中...