結果

問題 No.441 和か積
ユーザー Hiroaki KonoHiroaki Kono
提出日時 2017-10-27 19:44:36
言語 Java21
(openjdk 21)
結果
AC  
実行時間 118 ms / 1,000 ms
コード長 566 bytes
コンパイル時間 3,478 ms
コンパイル使用メモリ 73,020 KB
実行使用メモリ 57,692 KB
最終ジャッジ日時 2023-09-09 10:47:38
合計ジャッジ時間 8,818 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
57,692 KB
testcase_01 AC 115 ms
55,764 KB
testcase_02 AC 115 ms
55,840 KB
testcase_03 AC 115 ms
55,984 KB
testcase_04 AC 113 ms
56,028 KB
testcase_05 AC 115 ms
56,192 KB
testcase_06 AC 116 ms
56,440 KB
testcase_07 AC 115 ms
55,880 KB
testcase_08 AC 115 ms
55,904 KB
testcase_09 AC 112 ms
56,240 KB
testcase_10 AC 114 ms
56,380 KB
testcase_11 AC 111 ms
55,696 KB
testcase_12 AC 112 ms
55,836 KB
testcase_13 AC 111 ms
55,840 KB
testcase_14 AC 114 ms
55,872 KB
testcase_15 AC 113 ms
56,064 KB
testcase_16 AC 115 ms
55,648 KB
testcase_17 AC 113 ms
56,556 KB
testcase_18 AC 114 ms
55,868 KB
testcase_19 AC 112 ms
53,808 KB
testcase_20 AC 115 ms
56,220 KB
testcase_21 AC 118 ms
56,376 KB
testcase_22 AC 116 ms
55,712 KB
testcase_23 AC 118 ms
56,264 KB
testcase_24 AC 117 ms
55,780 KB
testcase_25 AC 116 ms
56,040 KB
testcase_26 AC 113 ms
55,836 KB
testcase_27 AC 112 ms
56,344 KB
testcase_28 AC 107 ms
55,488 KB
testcase_29 AC 109 ms
56,140 KB
testcase_30 AC 108 ms
56,000 KB
testcase_31 AC 112 ms
56,008 KB
testcase_32 AC 111 ms
56,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No441 {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String a = s.next();
        String b = s.next();
        int aa = getAbstracted(a);
        int bb = getAbstracted(b);
        String out = aa * bb > aa + bb ? "P" : aa + bb > aa * bb ? "S" : "E";
        System.out.println(out);
    }

    private static int getAbstracted(String str) {
        if (str.length() > 2) {
            return 3;
        } else {
            return Integer.parseInt(str);
        }
    }
}
0