Advertisement
Josif_tepe

Untitled

Mar 17th, 2021
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <iostream>
  2. #include<string>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int a, b;
  8.     cin >> a >> b;
  9.     int min;
  10.     if(a < b) {
  11.         min = a;
  12.     }
  13.     else {
  14.         min = b;
  15.     }
  16.     if((min * min) % 2 == 1) {
  17.         min -= 1;
  18.     }
  19.     cout << min * min << endl;
  20.     return 0;
  21. }
  22. /*
  23.  3 16
  24.  
  25.  I : 16
  26.  II : 16
  27.  III : 16
  28.  
  29.  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
  30.  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
  31.  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
  32.  
  33.  **/
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement