結果

問題 No.683 Two Operations No.3
ユーザー suga___0125suga___0125
提出日時 2018-06-15 22:15:54
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 507 bytes
コンパイル時間 478 ms
コンパイル使用メモリ 64,352 KB
実行使用メモリ 7,456 KB
最終ジャッジ日時 2023-09-13 04:45:39
合計ジャッジ時間 4,540 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
int ans=0;
void aout(void){
	cout<<ans<<endl;
}
void out(int a){
	cout<<a<<endl;
}
int main(void){
	ll a,b;
	cin>>a>>b;
	while(1){
		if(a>b)swap(a,b);
		if(b%2==0){
			b/=2;
			a--;
		}else if(a%2==0){
			a/=2;
			b--;
		}else{
			cout<<"No\n";
          return 0;
		}
		if(a==0&&b==0){
			cout<<"Yes\n";
          return 0;
		}
	}
}
0