Lucian_Adrian

Untitled

Aug 18th, 2021
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. long long int p,k;
  4. int main()
  5. {
  6. cin>>p>>k;
  7. long long int j=k/2;
  8. if(k%2)
  9. cout<<p+j*30;
  10. else
  11. cout<<p+j*10+(j-1)*20;
  12. return 0;
  13. }
  14.  
Advertisement
Add Comment
Please, Sign In to add comment