pbinfo | varena | campion | timus | codeforces | atcoder |
#include <iostream> using namespace std; int main() { int t1, t2, n , m , z; cin >> t1 >> t2 >> n >> m >> z; int sol = (t1 * n + t2 * m) * z; cout << sol; return 0; }