Untitled
unknown
plain_text
2 years ago
206 B
2
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...