fork(1) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. using ll = long long ;ll n , x , y , kq;
  4. int main(){
  5. freopen("REVENUE.INP","r",stdin);
  6. freopen("REVENUE.OUT","w",stdout);
  7. cin >> x >> y >> n;
  8. ll c = n/7;
  9. n = n%7;
  10. kq = c*(2*y+5*x)+(y+(n-1)*x);
  11. cout << kq;
  12. return 0;
  13. }
Success #stdin #stdout 0.01s 5324KB
stdin
2 3 7
stdout
17