#include<bits/stdc++.h>#define int long longusingnamespace std;typedeflonglong ll;constint maxn =1e6+5;constint N =2e7+5;int mm[N];int cnt[21];bool vis[maxn];voidinit(){for(ll i =2; i * i < maxn; i++){if(!vis[i])for(ll j = i * i; j < maxn; j *= i)
vis[j]=true;}}voidsolve(){memset(mm,0,sizeof(mm));int a, b;
cin >> a >> b;int sum =0;for(int i =1; i <=(int)log2(a); i++){for(int j =2; j <= b; j++){if(mm[i * j]==0){
mm[i * j]=1;
sum++;}}
cnt[i]= sum;}int res =0;for(int i =2; i <= a; i++){if(vis[i])continue;int xx =log2(a)/log2(i);
res += cnt[xx];}
cout << res <<"\n";}signedmain(){
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);int _ =1;
cin >> _;init();while(_--)solve();return0;}
武汉大学2020年新生程序设计竞赛(同步赛)A 仓鼠与饭堂using namespace std;#include <bits/stdc++.h>#define int long longsigned main() { int t; cin>>t; while (t--){ double n,m; int flag=0; cin>>n>>m; for(in