-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDCEPC504.cpp
More file actions
29 lines (27 loc) · 774 Bytes
/
DCEPC504.cpp
File metadata and controls
29 lines (27 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include<iostream>
using namespace std;
#include<math.h>
int main()
{
long long int k,t,n,i,count;
cin>>t;
for(i=0;i<t;i++)
{
count=0;
cin>>n>>k;
while(k!=1)
{
if(k%2!=0)
k=(k+1)/2;
else
{
count++;
k=k/2;
}
}
if(count%2==0)
cout<<"Male\n";
else
cout<<"Female\n";
}
}