Skip to content

Commit eef94e0

Browse files
authored
Create minimal-square
1 parent 0e70345 commit eef94e0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

minimal-square

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include <iostream>
2+
using namespace std;
3+
int main()
4+
{
5+
int t,a,b;
6+
cin>>t;
7+
while(t--){
8+
cin>>a>>b;
9+
if(2*min(a,b)>max(a,b)){
10+
cout<<min(a,b)*min(a,b)*4<<"\n";
11+
}
12+
else{
13+
cout<<max(a,b)*max(a,b)<<"\n";
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)