結果

問題 No.441 和か積
ユーザー atkrymatkrym
提出日時 2016-12-28 10:30:49
言語 Java19
(openjdk 21)
結果
AC  
実行時間 121 ms / 1,000 ms
コード長 540 bytes
コンパイル時間 3,148 ms
コンパイル使用メモリ 71,016 KB
実行使用メモリ 57,836 KB
最終ジャッジ日時 2023-09-09 10:33:34
合計ジャッジ時間 7,965 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
56,144 KB
testcase_01 AC 117 ms
55,436 KB
testcase_02 AC 115 ms
56,012 KB
testcase_03 AC 116 ms
55,636 KB
testcase_04 AC 117 ms
55,952 KB
testcase_05 AC 118 ms
56,120 KB
testcase_06 AC 118 ms
55,940 KB
testcase_07 AC 116 ms
55,724 KB
testcase_08 AC 116 ms
55,596 KB
testcase_09 AC 115 ms
56,112 KB
testcase_10 AC 114 ms
55,476 KB
testcase_11 AC 116 ms
57,444 KB
testcase_12 AC 117 ms
55,228 KB
testcase_13 AC 115 ms
55,408 KB
testcase_14 AC 118 ms
55,940 KB
testcase_15 AC 115 ms
55,672 KB
testcase_16 AC 116 ms
55,728 KB
testcase_17 AC 116 ms
55,468 KB
testcase_18 AC 116 ms
55,680 KB
testcase_19 AC 115 ms
56,364 KB
testcase_20 AC 121 ms
55,880 KB
testcase_21 AC 121 ms
57,836 KB
testcase_22 AC 120 ms
56,032 KB
testcase_23 AC 120 ms
55,756 KB
testcase_24 AC 118 ms
55,916 KB
testcase_25 AC 118 ms
55,484 KB
testcase_26 AC 117 ms
55,732 KB
testcase_27 AC 116 ms
55,588 KB
testcase_28 AC 120 ms
55,908 KB
testcase_29 AC 119 ms
56,176 KB
testcase_30 AC 118 ms
55,528 KB
testcase_31 AC 117 ms
55,640 KB
testcase_32 AC 118 ms
55,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;

public class Main {
    private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        BigInteger a = new BigInteger(sc.next());
        BigInteger b = new BigInteger(sc.next());
        
        int ret = a.add(b).compareTo(a.multiply(b));
        if (ret > 0) {
            System.out.println("S");
        } else if (ret < 0) {
            System.out.println("P");
        } else {
            System.out.println("E");
        }
    }
}
0