Advertisement
18argon

piso.cpp

Apr 22nd, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     int l, c;
  7.     int t1, t2;
  8.     cin >> l >> c;
  9.  
  10.     t1 = l*c + (l-1)*(c-1);
  11.     t2 = 2*(l-1) + 2*(c-1);
  12.  
  13.     cout << t1 << endl;
  14.  
  15.     cout << t2 << endl;    
  16.  
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement