結果
問題 |
No.441 和か積
|
ユーザー |
![]() |
提出日時 | 2016-11-12 19:01:43 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 460 bytes |
コンパイル時間 | 2,015 ms |
コンパイル使用メモリ | 76,740 KB |
実行使用メモリ | 42,768 KB |
最終ジャッジ日時 | 2024-11-25 21:22:26 |
合計ジャッジ時間 | 7,528 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 30 |
ソースコード
import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); BigInteger a=sc.nextBigInteger(); BigInteger b=sc.nextBigInteger(); BigInteger s=a.add(b); BigInteger p=a.multiply(b); int i=s.compareTo(p); System.out.println(p+" "+s); if(i==0) System.out.println("E"); else if(i>0) System.out.println("S"); else System.out.println("P"); } }