Skip to content

Commit

Permalink
Create CRDGAME3.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Priyanshiguptaaa authored Sep 19, 2020
1 parent a8cbc61 commit 089c7de
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Number_Theory/CRDGAME3.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#include <bits/stdc++.h>
using namespace std;

int main()
{
// your code goes here
int t;
cin>>t;
while(t--)
{
int Chef,Rick;
int rick_dig,chef_dig;
cin>>Chef>>Rick;
//cout<<Chef<<" "<<Rick<<endl;
chef_dig=ceil(Chef/9.0);
//cout<<"chef_dig="<<chef_dig<<endl;
rick_dig=ceil(Rick/9.0);
//cout<<"rick_dig="<<rick_dig<<endl;
if(chef_dig<rick_dig)
{
cout<<0<<" "<<chef_dig<<endl;
}
else
{
cout<<1<<" "<<rick_dig<<endl;
}
if(t==0)
break;
}
return 0;
}

0 comments on commit 089c7de

Please sign in to comment.