小米oj 优秀数字
Posted dogenya
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了小米oj 优秀数字相关的知识,希望对你有一定的参考价值。
#define mm(a) memset(a,0,sizeof(a)); #define max(x,y) (x)>(y)?(x):(y) #define min(x,y) (x)<(y)?(x):(y) #define Fopen freopen("1.in","r",stdin); freopen("m.out","w",stdout); #define rep(i,a,b) for(ll i=(a);i<=(b);i++) #define per(i,b,a) for(ll i=(b);i>=(a);i--) #include<bits/stdc++.h> typedef long long ll; #define PII pair<ll,ll> using namespace std; const int INF=0x3f3f3f3f; const int MAXN=(int)2e6+5; ll n; bool ck1(ll n) { ll x=1; n--; for(int i=1; i<=63; i++) { if(n==x)return 1; x<<=1; } return 0; } bool ck2(ll n) { ll x=1; n++; for(int i=1; i<=63; i++) { if(n==x)return 1; x<<=1; } return 0; } int main() { while(~scanf("%lld",&n)) { int ok1=ck1(n); int ok2=ck2(n); if(ok1&&ok2)printf("Very Good\n"); else if(ok1&&!ok2)printf("Good\n"); else if(!ok1&&ok2)printf("Bad\n"); else printf("Normal\n"); } return 0; }
#define mm(a) memset(a,0,sizeof(a));#define max(x,y) (x)>(y)?(x):(y) #define min(x,y) (x)<(y)?(x):(y) #define Fopen freopen("1.in","r",stdin);freopen("m.out","w",stdout);#define rep(i,a,b) for(ll i=(a);i<=(b);i++) #define per(i,b,a) for(ll i=(b);i>=(a);i--) #include<bits/stdc++.h> typedef long long ll; #define PII pair<ll,ll> using namespace std; const int INF=0x3f3f3f3f; const int MAXN=(int)2e6+5; ll n; bool ck1(ll n) { ll x=1; n--; for(int i=1; i<=63; i++) { if(n==x)return 1; x<<=1; } return 0; } bool ck2(ll n) { ll x=1; n++; for(int i=1; i<=63; i++) { if(n==x)return 1; x<<=1; } return 0; } int main() { while(~scanf("%lld",&n)) { int ok1=ck1(n); int ok2=ck2(n); if(ok1&&ok2)printf("Very Good\n"); else if(ok1&&!ok2)printf("Good\n"); else if(!ok1&&ok2)printf("Bad\n"); else printf("Normal\n"); } return 0; }
#define mm(a)memset(a,0,sizeof(a)); #define max(x,y)(x)>(y)?(x):( y)#define min(x,y)(x)<(y)?(x):( y)#define Fopen freopen ( “1.in”, “R”,标准输入); freopen函数( “m.out”, “W”,标准输出); #define rep(i,a,b)for(ll i =(a); i <=(b); i ++)#define per(i,b,a)for(ll i =(b); i> = (一);我 - )
的#include <比特/ STDC ++。H>
typedef long long ll;
#define PII对<ll,ll> using namespace std;
const int INF = 0x3f3f3f3f;
const int MAXN =(int)2e6 + 5;
ll n;
bool ck1(ll n){
ll x = 1;
N--;
for(int i = 1; i <= 63; i ++){
if(n == x)返回1;
X << = 1;
}
返回0;
}
bool ck2(ll n){
ll x = 1;
的n ++;
for(int i = 1; i <= 63; i ++){
if(n == x)返回1;
X << = 1;
}
返回0;
}
int main(){
while(~scanf(“%lld”,&n)){
int ok1 = ck1(n);
int ok2 = ck2(n);
if(ok1 && ok2)printf(“Very Good \ n”);
否则if(ok1 &&!ok2)printf(“Good \ n”);
否则if(!ok1 && ok2)printf(“Bad \ n”);
else printf(“Normal \ n”);
}
返回0;
}
的#include <比特/ STDC ++。H>
typedef long long ll;
#define PII对<ll,ll> using namespace std;
const int INF = 0x3f3f3f3f;
const int MAXN =(int)2e6 + 5;
ll n;
bool ck1(ll n){
ll x = 1;
N--;
for(int i = 1; i <= 63; i ++){
if(n == x)返回1;
X << = 1;
}
返回0;
}
bool ck2(ll n){
ll x = 1;
的n ++;
for(int i = 1; i <= 63; i ++){
if(n == x)返回1;
X << = 1;
}
返回0;
}
int main(){
while(~scanf(“%lld”,&n)){
int ok1 = ck1(n);
int ok2 = ck2(n);
if(ok1 && ok2)printf(“Very Good \ n”);
否则if(ok1 &&!ok2)printf(“Good \ n”);
否则if(!ok1 && ok2)printf(“Bad \ n”);
else printf(“Normal \ n”);
}
返回0;
}
以上是关于小米oj 优秀数字的主要内容,如果未能解决你的问题,请参考以下文章