結果

問題 No.441 和か積
ユーザー yagi2yagi2
提出日時 2017-04-15 19:16:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 1,000 ms
コード長 586 bytes
コンパイル時間 4,107 ms
コンパイル使用メモリ 72,048 KB
実行使用メモリ 56,476 KB
最終ジャッジ日時 2023-09-09 10:41:20
合計ジャッジ時間 7,350 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
55,384 KB
testcase_01 AC 116 ms
55,744 KB
testcase_02 AC 115 ms
55,684 KB
testcase_03 AC 118 ms
56,408 KB
testcase_04 AC 117 ms
56,156 KB
testcase_05 AC 116 ms
56,092 KB
testcase_06 AC 117 ms
56,144 KB
testcase_07 AC 115 ms
55,772 KB
testcase_08 AC 114 ms
55,672 KB
testcase_09 AC 114 ms
55,824 KB
testcase_10 AC 114 ms
55,976 KB
testcase_11 AC 113 ms
56,072 KB
testcase_12 AC 113 ms
56,012 KB
testcase_13 AC 111 ms
56,312 KB
testcase_14 AC 107 ms
55,840 KB
testcase_15 AC 112 ms
56,372 KB
testcase_16 AC 113 ms
55,780 KB
testcase_17 AC 115 ms
56,004 KB
testcase_18 AC 113 ms
56,184 KB
testcase_19 AC 114 ms
56,064 KB
testcase_20 AC 119 ms
56,024 KB
testcase_21 AC 119 ms
56,476 KB
testcase_22 AC 120 ms
56,032 KB
testcase_23 AC 117 ms
55,836 KB
testcase_24 AC 117 ms
55,908 KB
testcase_25 AC 118 ms
56,056 KB
testcase_26 AC 115 ms
56,036 KB
testcase_27 AC 112 ms
55,292 KB
testcase_28 AC 115 ms
56,032 KB
testcase_29 AC 109 ms
55,460 KB
testcase_30 AC 115 ms
55,892 KB
testcase_31 AC 114 ms
55,760 KB
testcase_32 AC 117 ms
56,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.BigInteger;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        BigInteger A = new BigInteger(sc.next());
        BigInteger B = new BigInteger(sc.next());

        BigInteger S = A.add(B);
        BigInteger P = A.multiply(B);

        if (S.compareTo(P) > 0) {
            System.out.println("S");
        } else if (S.compareTo(P) < 0) {
            System.out.println("P");
        } else if (S.compareTo(P) == 0) {
            System.out.println("E");
        }
    }
}
0