比赛 20161115 评测结果 AAAAAAAAAA
题目名称 取石块儿 最终得分 100
用户昵称 KZNS 运行时间 0.184 s
代码语言 C++ 内存使用 0.29 MiB
提交时间 2016-11-15 09:02:46
显示代码纯文本
//KZNS
#include <cstdio>
using namespace std;
typedef unsigned long long ull;
inline ull input() {
    char c = getchar();
    ull ans = 0;
    while (!('0' <= c && c <= '9'))
        c = getchar();
    while ('0' <= c && c <= '9') {
        ans = ans * 10 + c - '0';
        c = getchar();
    }
    return ans;
}
int main() {
    freopen("tstones.in", "r", stdin);
    freopen("tstones.out", "w", stdout);
    int T;
    scanf("%d", &T);
    ull N, K;
    while (T--) {
        N = input();
        K = input();
        if (N % (K+1))
            printf("NO\n");
        else
            printf("YES\n");
    }
    return 0;
}
//UBWH