Răspuns :
Răspuns:
#include <iostream>
using namespace std;
int main()
{
int t1,t2,n,m,z;
cin>>t1>>t2>>n>>m>>z;
cout << z*(t1*n+t2*m);
return 0;
}
Explicație:
#include <iostream>
using namespace std;
int main()
{
int t1,t2,n,m,z;
cin>>t1>>t2>>n>>m>>z;
cout<<((t1*n)+(t2*m))*z;
return 0;
}