結果
問題 | No.441 和か積 |
ユーザー |
![]() |
提出日時 | 2016-11-11 23:00:56 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 142 ms / 1,000 ms |
コード長 | 838 bytes |
コンパイル時間 | 2,183 ms |
コンパイル使用メモリ | 76,804 KB |
実行使用メモリ | 54,536 KB |
最終ジャッジ日時 | 2024-06-27 03:29:00 |
合計ジャッジ時間 | 7,636 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
import java.util.*;import java.math.BigInteger;public class Main {public static void main(String[] args) {Scanner sc = new Scanner(System.in);String str = "";String str3 = sc.next();String str2 = sc.next();BigInteger big1 = new BigInteger( str3 );BigInteger big2 = new BigInteger( str2 );BigInteger big3 = new BigInteger( str3 );BigInteger big4 = new BigInteger( str2 );BigInteger big5 = big1.add(big2);BigInteger big6 = big3.multiply(big4);if( big5.compareTo(big6) == 0 ){str += "E";}else if( big5.compareTo(big6) > 0 ){str += "S";}else if( big5.compareTo(big6) < 0 ){str += "P";}System.out.print( str );System.out.println( );}}