結果

問題 No.441 和か積
ユーザー OGNMOGNM
提出日時 2016-11-11 23:08:38
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 1,000 ms
コード長 490 bytes
コンパイル時間 2,571 ms
コンパイル使用メモリ 71,072 KB
実行使用メモリ 57,548 KB
最終ジャッジ日時 2023-09-09 10:21:23
合計ジャッジ時間 8,197 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
55,772 KB
testcase_01 AC 116 ms
55,828 KB
testcase_02 AC 117 ms
55,824 KB
testcase_03 AC 119 ms
55,872 KB
testcase_04 AC 112 ms
55,928 KB
testcase_05 AC 114 ms
55,476 KB
testcase_06 AC 111 ms
55,924 KB
testcase_07 AC 112 ms
55,472 KB
testcase_08 AC 111 ms
56,556 KB
testcase_09 AC 115 ms
55,980 KB
testcase_10 AC 115 ms
55,756 KB
testcase_11 AC 115 ms
55,572 KB
testcase_12 AC 116 ms
56,272 KB
testcase_13 AC 116 ms
55,496 KB
testcase_14 AC 118 ms
55,360 KB
testcase_15 AC 112 ms
55,128 KB
testcase_16 AC 112 ms
55,856 KB
testcase_17 AC 114 ms
55,564 KB
testcase_18 AC 112 ms
55,512 KB
testcase_19 AC 114 ms
55,336 KB
testcase_20 AC 121 ms
56,040 KB
testcase_21 AC 117 ms
55,492 KB
testcase_22 AC 116 ms
55,768 KB
testcase_23 AC 114 ms
57,548 KB
testcase_24 AC 117 ms
55,400 KB
testcase_25 AC 112 ms
55,524 KB
testcase_26 AC 109 ms
55,764 KB
testcase_27 AC 105 ms
55,320 KB
testcase_28 AC 109 ms
55,400 KB
testcase_29 AC 107 ms
55,580 KB
testcase_30 AC 112 ms
55,592 KB
testcase_31 AC 113 ms
55,704 KB
testcase_32 AC 113 ms
55,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
	String n1 = sc.next();
	String n2 = sc.next();
	BigInteger bi1 = new BigInteger(n1);
	BigInteger bi2 = new BigInteger(n2);
	BigInteger s = bi1.add(bi2);
	BigInteger p = bi1.multiply(bi2);
	if(s.compareTo(p)>0){
		System.out.println("S");
	}else if(s.compareTo(p)<0){
		System.out.println("P");
	}else if(s.equals(p) ){
		System.out.println("E");
	}
}
}
0