結果

問題 No.1556 Power Equality
ユーザー CleyLCleyL
提出日時 2022-09-27 14:28:56
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 233 bytes
コンパイル時間 465 ms
コンパイル使用メモリ 69,964 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-02 01:03:19
合計ジャッジ時間 962 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
    int a,b;cin>>a>>b;
    if(a>b)swap(a,b);
    bool ok = a==b;
    while(a%2==0)a/=2;
    while(b%2==0)b/=2;
    if(a==1 && b==1)ok = true;
    cout << (ok?"Yes":"No") << endl;
}
0