记录编号 349846 评测结果 AAAAAAAAAA
题目名称 取石块儿 最终得分 100
用户昵称 GravatarAAAAAAAAAA 是否通过 通过
代码语言 C++ 运行时间 0.095 s
提交时间 2016-11-15 12:07:20 内存使用 0.32 MiB
显示代码纯文本
  1. #include<cstdio>
  2. #define ll long long
  3. namespace IO{
  4. char buf[1<<15],*fs,*ft;
  5. inline char gc(){return (fs==ft&&(ft=(fs=buf)+fread(buf,1,1<<15,stdin),fs==ft))?0:*fs++;}
  6. inline unsigned ll qr(){
  7. unsigned ll x=0,ch=gc();
  8. while(ch<'0'||ch>'9'){ch=gc();}
  9. while(ch>='0'&&ch<='9'){x=(x<<1)+(x<<3)+ch-'0';ch=gc();}
  10. return x;
  11. }
  12. }using namespace IO;
  13. using namespace std;
  14. /**********************************************************************************************/
  15. unsigned ll t,x,y;
  16. int main(){
  17. freopen ("tstones.in","r",stdin);
  18. freopen ("tstones.out","w",stdout);
  19. int i;
  20. t=qr();
  21. for(i=0;i<t;i++){
  22. x=qr();
  23. y=qr();
  24. if(x%(y+1)!=0){
  25. printf("NO\n");}
  26. else{
  27. printf("YES\n");}
  28. }
  29. return 0;
  30. }