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