• 【小米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
    ");
            else if(ok1&&!ok2)printf("Good
    ");
            else if(!ok1&&ok2)printf("Bad
    ");
            else printf("Normal
    ");
        }
        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 ");         else if(ok1&&!ok2)printf("Good ");         else if(!ok1&&ok2)printf("Bad ");         else printf("Normal ");     }     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;
    }
  • 相关阅读:
    Node.js 事件驱动编程
    css常见布局
    The Perfect Solution To Convert Immutable Bitmap To A Mutable Bitmap
    Mac终端Terminal使用
    入门Mac快捷键详细分类整理,包括Eclipse和Android Studio中一些常用的快捷键
    Android自定义控件属性的使用
    Visual Studio的快捷键
    cmd中编译和运行java程序
    查看本机的IP、MAC地址和端口占用情况
    ASC2码
  • 原文地址:https://www.cnblogs.com/dogenya/p/10816045.html
Copyright © 2020-2023  润新知