#include #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") using namespace std; using std::cout; using std::cin; using std::endl; using ll=long long; using ld=long double; const ll ILL=2167167167167167167; const int INF=2100000000; const int mod=998244353; #define rep(i,a,b) for (int i=(int)(a);i<(int)(b);i++) #define all(p) p.begin(),p.end() template using _pq = priority_queue, greater>; template ll LB(vector &v,T a){return lower_bound(v.begin(),v.end(),a)-v.begin();} template ll UB(vector &v,T a){return upper_bound(v.begin(),v.end(),a)-v.begin();} template bool chmin(T &a,const T &b){if(a>b){a=b;return 1;}else return 0;} template bool chmax(T &a,const T &b){if(a fact; std::vector rev; std::vector fact_rev; combination(int max,long long mod):upper(max),MOD(mod),fact(max+1),rev(max+1),fact_rev(max+1){ for(long long i=0;i<=max;i++){ if(i<2){ fact[i]=1; fact_rev[i]=1; rev[i]=1; continue; } fact[i]=(fact[i-1]*i)%mod; rev[i]=mod-((mod/i)*rev[mod%i])%mod; fact_rev[i]=(fact_rev[i-1]*rev[i])%mod; } } long long Comb(int x,int y){ assert(upper>=x); if (x=x); if (x>t; rep(i,0,t) solve(); } void solve(){ ll N,K; cin>>N>>K; if(K==0){ cout<<"1\n"; return; } auto f=[&](ll a)-> ll { return (N+1-a)*a; }; ll L=0,R=(N+1)/2; while(R-L>1){ ll M=(R+L)/2; if(f(M)