长了点,但应该看得懂
适合蒟蒻看,DALAO勿喷(本人就是蒟蒻)
求关~
#include<bits/stdc++.h>
using namespace std;
int main(){
long long x,y,n,a=0;
cin>>x>>y>>n;
if(y<x*10){
if(n==0){
cout<<0;
return 0;
}
if(n/10!=0&&n%10!=0){
cout<<(n/10)*(y-1)+(n%10)*(x-1);
return 0;
}
else if(n/10!=0){
cout<<(n/10)*(y-1)+(n%10)*x;
return 0;
}
else{
cout<<(n/10)*y+(n%10)*(x-1);
return 0;
}
}
else{
cout<<n*(x-1);
}
return 0;
}