mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
38 lines
623 B
C++
38 lines
623 B
C++
#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;
|
|
}
|