結果
問題 |
No.441 和か積
|
ユーザー |
![]() |
提出日時 | 2017-05-04 08:33:19 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 54 ms / 1,000 ms |
コード長 | 728 bytes |
コンパイル時間 | 2,238 ms |
コンパイル使用メモリ | 74,704 KB |
実行使用メモリ | 37,156 KB |
最終ジャッジ日時 | 2024-06-27 03:52:37 |
合計ジャッジ時間 | 4,547 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigInteger; import static java.lang.System.in; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String[] inputs = reader.readLine().split(" "); BigInteger A = new BigInteger(inputs[0]); BigInteger B = new BigInteger(inputs[1]); int r = (A.add(B)).compareTo(A.multiply(B)); if(r == -1) { System.out.println("P"); } else if (r == 0) { System.out.println("E"); } else { System.out.println("S"); } } }