結果

問題 No.441 和か積
ユーザー OGNMOGNM
提出日時 2016-11-11 23:08:38
言語 Java
(openjdk 23)
結果
AC  
実行時間 136 ms / 1,000 ms
コード長 490 bytes
コンパイル時間 2,236 ms
コンパイル使用メモリ 80,760 KB
実行使用メモリ 54,508 KB
最終ジャッジ日時 2024-06-27 03:30:09
合計ジャッジ時間 7,453 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

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