#include using namespace std; #define ll long long int main(){
#include<bits/stdc++.h> using namespace std; #define ll long long int main(){ ios::sync_with_stdio(0); ll a,b;cin>>a>>b;if(a>b)swap(a,b); ll c=(a+1)*(a+1)/4; if(b>=c){ cout<<a; return 0; } for(c=sqrt(4*b+1)-1;c<=b-1;c++){ if(c*(a+b-1)>=a*b+(((c-1)*(c-1)+(c-1))/2+(c-1)*(c-1)/4)){ break; } } cout<<c; return 0; }
暂存