結果

問題 No.2063 ±2^k operations (easy)
ユーザー 中井康介
提出日時 2022-09-02 22:34:05
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 497 bytes
コンパイル時間 337 ms
コンパイル使用メモリ 29,184 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-16 04:42:40
合計ジャッジ時間 1,147 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdbool.h>
#include <stdio.h>

bool det(unsigned long long int x)
{
    if (x==0) {
        return false;
    }
    return (x&(x-1))==0;
}


int main(void)
{
    long long int binary;
    long long int decimal = 0;
    long long int base = 1;
 
    scanf("%lld", &binary);
 
    while(binary>0){
        decimal = decimal + ( binary % 10 ) * base;
        binary = binary / 10;
        base = base * 2;
        }
        
    printf("%s\n",det(decimal)?"No":"Yes");

    return 0;
    
}
0