結果
問題 | No.1556 Power Equality |
ユーザー |
![]() |
提出日時 | 2021-06-25 21:33:30 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 522 bytes |
コンパイル時間 | 1,579 ms |
コンパイル使用メモリ | 166,924 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-25 09:07:31 |
合計ジャッジ時間 | 2,088 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 8 WA * 1 |
ソースコード
#include<bits/stdc++.h>//#include<boost/multiprecision/cpp_int.hpp>//#include<atcoder/all>using namespace std;//using namespace boost::multiprecision;//using namespace atcoder;int main(){int A,B;cin>>A>>B;if(A==1&&B==1) cout<<"Yes"<<endl;else if(A==1) cout<<"No"<<endl;else if(B==1) cout<<"No"<<endl;else if(A==B) cout<<"Yes"<<endl;else if(A==2&&B%2==0) cout<<"Yes"<<endl;else if(A%2==0&&B==2) cout<<"Yes"<<endl;else cout<<"No"<<endl;}//2^3=8//log28=3//logA(B^A)=B