結果

問題 No.441 和か積
ユーザー ぴろずぴろず
提出日時 2016-11-27 09:10:20
言語 Java19
(openjdk 21)
結果
AC  
実行時間 125 ms / 1,000 ms
コード長 491 bytes
コンパイル時間 1,978 ms
コンパイル使用メモリ 71,796 KB
実行使用メモリ 56,668 KB
最終ジャッジ日時 2023-09-09 10:29:37
合計ジャッジ時間 7,280 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,600 KB
testcase_01 AC 120 ms
56,444 KB
testcase_02 AC 120 ms
56,328 KB
testcase_03 AC 118 ms
56,228 KB
testcase_04 AC 115 ms
56,124 KB
testcase_05 AC 112 ms
56,052 KB
testcase_06 AC 116 ms
55,832 KB
testcase_07 AC 118 ms
56,392 KB
testcase_08 AC 120 ms
56,380 KB
testcase_09 AC 120 ms
55,784 KB
testcase_10 AC 121 ms
56,184 KB
testcase_11 AC 119 ms
55,636 KB
testcase_12 AC 120 ms
56,056 KB
testcase_13 AC 120 ms
56,164 KB
testcase_14 AC 121 ms
55,924 KB
testcase_15 AC 117 ms
55,636 KB
testcase_16 AC 119 ms
55,968 KB
testcase_17 AC 118 ms
56,048 KB
testcase_18 AC 111 ms
55,952 KB
testcase_19 AC 116 ms
55,960 KB
testcase_20 AC 120 ms
56,548 KB
testcase_21 AC 125 ms
56,080 KB
testcase_22 AC 125 ms
55,768 KB
testcase_23 AC 121 ms
55,696 KB
testcase_24 AC 121 ms
55,588 KB
testcase_25 AC 122 ms
55,884 KB
testcase_26 AC 122 ms
56,312 KB
testcase_27 AC 120 ms
56,072 KB
testcase_28 AC 121 ms
56,400 KB
testcase_29 AC 121 ms
56,668 KB
testcase_30 AC 116 ms
56,228 KB
testcase_31 AC 119 ms
56,396 KB
testcase_32 AC 119 ms
55,596 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no441;

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 = sc.nextBigInteger();
		BigInteger b = sc.nextBigInteger();
		BigInteger sum = a.add(b);
		BigInteger mul = a.multiply(b);
		int comp = sum.compareTo(mul);
		if (comp == 0) {
			System.out.println("E");
		}else if(comp > 0) {
			System.out.println("S");
		}else{
			System.out.println("P");
		}
	}

}
0