#include using namespace std; typedef long long ll; const int M=1000000007; const int inv2=(M+1)/2; int _,n,x,y; int main(){ scanf("%d",&_); while (_--){ scanf("%d%d",&n,&x); if (n==1){ printf("%d\n",x/2); continue; } for (int i=1;i