80分求助
查看原帖
80分求助
1048589
HuangBarry楼主2023/10/3 16:32
#include <bits/stdc++.h>
using namespace std;

int main(){
	int x,y,n;
	cin>>x>>y>>n;
	x--;
	y--;
	if(10*x>y){
		if(n<10) {cout<<n*x<<endl;return 0;}
		int shu=n/10;
		cout<<shu*y+(n-shu*10)*x<<endl;
	}
	else{
		cout<<n*x<<endl;
	}
	return 0;
}
2023/10/3 16:32
加载中...