比赛 |
20161115 |
评测结果 |
C |
题目名称 |
取石块儿 |
最终得分 |
0 |
用户昵称 |
jinqiu |
运行时间 |
0.000 s |
代码语言 |
C++ |
内存使用 |
0.00 MiB |
提交时间 |
2016-11-15 08:59:20 |
显示代码纯文本
#include<iostream>
#include<Cstdio>
#define ULL unsigned long long
using namespace std;
int T;
ULL read();
int main() {
freopen("tstones.in", "r", stdin);
freopen("tstones.out", "w", stdout);
cin >> T;
while(T--) {
ULL n = read(), k = read();
if(n % (k + 1) == 0)
cout << "YES\n";
else cout << "NO\n";
}
return 0;
}
ULL read() {
ULL t = 0, f = 1;
char s = getchar();
while(s < '0' || s > '9') {
if(s == '-')f = -1;
s = getchar();
}
while(s >= '0' && s < '9') {
t = (t << 3) + (t << 1) + s - '0';
s = getchar();
}
return t*f;
}