Create 1681.cpp

This commit is contained in:
KiritoTRw 2016-05-01 15:21:26 +08:00
parent fd2d459e2c
commit e3adfe0ab2

37
QUSTOJ/1681.cpp Normal file
View File

@ -0,0 +1,37 @@
#include <iostream>
using namespace std;
int main()
{
int t;
cin>>t;
int m,n;
int start;
for(int i=0;i<t;i++)
{
cin>>start>>m>>n;
int a=n%(m+1);
if(a!=0)
{
if(start==1)
{
cout<<"Richard"<<endl;
}
else
{
cout<<"Dick"<<endl;
}
}
else
{
if(start==1)
{
cout<<"Dick"<<endl;
}
else
{
cout<<"Richard"<<endl;
}
}
}
return 0;
}