結果

問題 No.441 和か積
ユーザー Hiroaki KonoHiroaki Kono
提出日時 2017-10-27 19:43:57
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 566 bytes
コンパイル時間 3,075 ms
コンパイル使用メモリ 72,276 KB
実行使用メモリ 57,816 KB
最終ジャッジ日時 2023-08-14 03:20:42
合計ジャッジ時間 8,337 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 119 ms
55,920 KB
testcase_02 AC 116 ms
55,584 KB
testcase_03 AC 120 ms
56,040 KB
testcase_04 AC 120 ms
55,924 KB
testcase_05 AC 119 ms
55,888 KB
testcase_06 AC 118 ms
55,860 KB
testcase_07 AC 119 ms
55,792 KB
testcase_08 WA -
testcase_09 AC 114 ms
55,676 KB
testcase_10 AC 116 ms
56,028 KB
testcase_11 AC 116 ms
55,828 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 118 ms
53,876 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 119 ms
55,924 KB
testcase_21 AC 121 ms
55,548 KB
testcase_22 AC 122 ms
56,228 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 118 ms
55,708 KB
testcase_28 AC 118 ms
57,816 KB
testcase_29 AC 119 ms
55,700 KB
testcase_30 AC 118 ms
55,904 KB
testcase_31 AC 119 ms
55,628 KB
testcase_32 AC 118 ms
54,060 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