80分求ac!!!
查看原帖
80分求ac!!!
1426883
yly0012166楼主2024/10/10 17:34
#include <bits/stdc++.h>
using namespace std;

int main(){
	long long x,y;
	int n;
	cin >> x >> y >> n;
	x -= 1;
	y -= 1;
	if(x<0){
		x = 0;
	}
	if(y<0){
		y = 0;
	}
	
	if(n<10){
		cout << n*x;
		return 0;
	}else if((n>=10) && (n%10==0)){
		cout << n/10*y;
		return 0;
	}else if((n>=10) && (n%10!=0)){
		cout << ((n%10*x)+(n/10*y));
		return 0;
	}
	
	return 0;
}
2024/10/10 17:34
加载中...