-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMARBLES.cpp
More file actions
39 lines (31 loc) · 932 Bytes
/
MARBLES.cpp
File metadata and controls
39 lines (31 loc) · 932 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
30
31
32
33
34
35
36
37
38
39
#include<iostream>
#include<cmath>
using namespace std;
main()
{int c;
cin>>c;
while(c){c--;
long long int c,a,i,b,count=0,flag=1;
cin>>a;
ravi:
if(flag)
{for(i=0;(4*i+3)<=a/2 || (4*i+3)==a;i++)
{
if(a%(4*i+3)==0)
{ count=1;
b=a/(4*i+3);
while(b!=0)
{ if(b%(4*i+3)==0)
{
count++;
}
else break;
b=b/(4*i+3);
}
}
if(count%2!=0)
{cout<<"No"<<endl; /*system("pause");*/ flag=0; goto ravi;}
}
cout<<"Yes"<<endl;}
//system("pause");
}}