ll@t; ll d[1344],i; rep(t){ ll@a,@b; if(a==b){ wt(0); }else{ i=Divisor(b-a,d); if(d[--i]=a){ --i; } wt(d[i]-a); } } }