啊0pts
查看原帖
啊0pts
1314767
RoutineZhou楼主2024/10/13 13:14
#include <iostream>
using namespace std;
int main(){
    int t, n, k, j, ans = 0;
    cin >> t;
    while(t--){
        cin >> n >> k;
        if(k == 0){
            j = 1;
        }
        for(int i = 1; i <= n; i++){
            if(n/i == k){
                ans++;
            }
        }
        if(k == 0) {
            cout << j;
        }else{
            cout << ans;
        }
    ans = 0;
}
    return 0;
}
2024/10/13 13:14
加载中...