結果

問題 No.441 和か積
ユーザー fkwnw3_1243fkwnw3_1243
提出日時 2017-05-04 08:33:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 44 ms / 1,000 ms
コード長 728 bytes
コンパイル時間 2,724 ms
コンパイル使用メモリ 71,324 KB
実行使用メモリ 49,484 KB
最終ジャッジ日時 2023-09-09 10:44:01
合計ジャッジ時間 5,373 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,456 KB
testcase_01 AC 43 ms
49,152 KB
testcase_02 AC 40 ms
49,172 KB
testcase_03 AC 41 ms
48,956 KB
testcase_04 AC 40 ms
49,112 KB
testcase_05 AC 42 ms
49,100 KB
testcase_06 AC 42 ms
49,232 KB
testcase_07 AC 42 ms
49,288 KB
testcase_08 AC 42 ms
49,196 KB
testcase_09 AC 41 ms
48,952 KB
testcase_10 AC 41 ms
49,444 KB
testcase_11 AC 41 ms
49,140 KB
testcase_12 AC 41 ms
49,256 KB
testcase_13 AC 42 ms
49,276 KB
testcase_14 AC 42 ms
49,424 KB
testcase_15 AC 42 ms
49,292 KB
testcase_16 AC 41 ms
49,384 KB
testcase_17 AC 42 ms
49,188 KB
testcase_18 AC 41 ms
47,056 KB
testcase_19 AC 42 ms
49,000 KB
testcase_20 AC 44 ms
49,108 KB
testcase_21 AC 43 ms
49,344 KB
testcase_22 AC 42 ms
49,300 KB
testcase_23 AC 42 ms
49,068 KB
testcase_24 AC 42 ms
49,192 KB
testcase_25 AC 42 ms
49,472 KB
testcase_26 AC 42 ms
49,296 KB
testcase_27 AC 42 ms
49,476 KB
testcase_28 AC 42 ms
49,184 KB
testcase_29 AC 42 ms
49,112 KB
testcase_30 AC 42 ms
49,340 KB
testcase_31 AC 41 ms
49,256 KB
testcase_32 AC 42 ms
49,484 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;

import static java.lang.System.in;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        String[] inputs = reader.readLine().split(" ");
        BigInteger A = new BigInteger(inputs[0]);
        BigInteger B = new BigInteger(inputs[1]);
        int r = (A.add(B)).compareTo(A.multiply(B));
        if(r == -1) {
            System.out.println("P");
        } else if (r == 0) {
            System.out.println("E");
        } else {
            System.out.println("S");
        }
    }
}
0