Untitled
unknown
plain_text
3 years ago
206 B
6
Indexable
#include <iostream>
using namespace std;
int main(){
int a, b, c, t;
cin >> a >> b >> c >> t;
int s = 0;
if (t <= a){
cout << t * b;
}
else{
s = a * b + (t - a) * c;
cout << s;
}
}Editor is loading...