GastonFontenla

Timus: 1224 - Spiral

Jun 5th, 2016
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.16 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int a, b;
  8.     cin >> a >> b;
  9.     cout << min(a, b)*2 - (a <= b) - 1 << endl;
  10.  
  11.     return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment