結果
| 問題 |
No.2063 ±2^k operations (easy)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-09-02 22:27:44 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 455 bytes |
| コンパイル時間 | 349 ms |
| コンパイル使用メモリ | 29,312 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-16 04:24:32 |
| 合計ジャッジ時間 | 1,141 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 WA * 8 |
ソースコード
#include <stdbool.h>
#include <stdio.h>
bool det(unsigned int x)
{
if (x==0) {
return false;
}
return (x&(x-1))==0;
}
int main(void)
{
int binary;
int decimal = 0;
int base = 1;
scanf("%d", &binary);
while(binary>0){
decimal = decimal + ( binary % 10 ) * base;
binary = binary / 10;
base = base * 2;
}
printf("%s\n",det(decimal)?"No":"Yes");
return 0;
}