問題一覧 > 通常問題

No.1556 Power Equality

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 242
作問者 : noya2 / テスター : first_vil nok0
お気に入りにしたユーザー ProblemId : 6478 / 自分の提出
問題文最終更新日: 2021-06-23 00:46:37
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 301 (順位表) の他の問題:

Problem Statement

Does $A^B=B^A$ hold?

Constraints

  • All input values are integers
  • $1\le A,B\le 10^9$
  • Input

    $A\ B$
    

    Output

    Print Yes if $A^B=B^A$, and No otherwise.

    Print a newline at the end.

    Sample

    Sample 1
    Input
    50 50
    Output
    Yes

    We have $50^{50}=50^{50}$.

    Sample 2
    Input
    1 1000000000
    Output
    No

    We have $1^{1000000000}\neq 1000000000^1$.

    提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。