結果
問題 | No.1556 Power Equality |
ユーザー | Asahi |
提出日時 | 2023-02-04 18:08:29 |
言語 | Java21 (openjdk 21) |
結果 |
RE
|
実行時間 | - |
コード長 | 973 bytes |
コンパイル時間 | 2,013 ms |
コンパイル使用メモリ | 73,000 KB |
実行使用メモリ | 153,196 KB |
最終ジャッジ日時 | 2023-09-16 14:40:01 |
合計ジャッジ時間 | 4,663 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 123 ms
55,644 KB |
testcase_01 | AC | 125 ms
55,764 KB |
testcase_02 | AC | 126 ms
55,432 KB |
testcase_03 | AC | 162 ms
153,196 KB |
testcase_04 | AC | 124 ms
55,940 KB |
testcase_05 | AC | 125 ms
55,432 KB |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | AC | 125 ms
55,480 KB |
testcase_09 | AC | 125 ms
55,464 KB |
testcase_10 | AC | 126 ms
55,724 KB |
ソースコード
import java.util.*; import java.io.*; import java.math.*; import java.util.stream.Stream; public class Main{ /* 入出力 */ static BufferedReader buff = new BufferedReader(new InputStreamReader(System.in)); static StringTokenizer st; static PrintWriter output = new PrintWriter(System.out); static Scanner sc = new Scanner(System.in); /* 定数 */ static final int [] y4 = {0,1,0,-1}; static final int [] x4 = {1,0,-1,0}; static final int INF1 = Integer.MAX_VALUE; static final long INF2 = Long.MAX_VALUE; static final long MOD1 = (long)1e9+7; static final long MOD2 = 998244353; /* Main */ public static void main(String[] args) throws IOException{ int a = sc.nextInt(); int b = sc.nextInt(); if(BigInteger.valueOf(a).pow(b).compareTo(BigInteger.valueOf(b).pow(a)) == 0) { output.print("Yes"); } else output.print("No"); output.flush(); } }