fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int age = 20;
  6. int n;
  7. int weekly = 1000;
  8.  
  9. cin >> n;
  10.  
  11. int weeks = (n - age) * 52;
  12. int total = weeks * weekly;
  13.  
  14. cout << total << endl;
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5316KB
stdin
55
stdout
1820000