結果
問題 | No.441 和か積 |
ユーザー | atkrym |
提出日時 | 2016-12-28 10:30:49 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 133 ms / 1,000 ms |
コード長 | 540 bytes |
コンパイル時間 | 2,426 ms |
コンパイル使用メモリ | 74,748 KB |
実行使用メモリ | 54,432 KB |
最終ジャッジ日時 | 2024-06-27 03:42:07 |
合計ジャッジ時間 | 7,341 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
import java.util.*; import java.math.*; public class Main { private static Scanner sc = new Scanner(System.in); public static void main(String[] args) throws Exception { BigInteger a = new BigInteger(sc.next()); BigInteger b = new BigInteger(sc.next()); int ret = a.add(b).compareTo(a.multiply(b)); if (ret > 0) { System.out.println("S"); } else if (ret < 0) { System.out.println("P"); } else { System.out.println("E"); } } }