結果

問題 No.722 100×100=1000
ユーザー DeAKetsu
提出日時 2019-06-03 12:28:00
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 623 bytes
コンパイル時間 3,594 ms
コンパイル使用メモリ 76,620 KB
実行使用メモリ 41,588 KB
最終ジャッジ日時 2024-10-12 12:07:03
合計ジャッジ時間 7,823 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 21 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main{
	
	public static void main(String[] args)
	{
	    Scanner sc = new Scanner(System.in);

	    String input = sc.nextLine();
	    String[] inputArr = input.split(" ");
	    int a = Integer.parseInt(inputArr[0]);
	    int b = Integer.parseInt(inputArr[1]);

	    boolean bySelf = (Math.abs(a) % 100 == 0 && Math.abs(b) % 100 == 0);

	    int ans = a * b;

	    if (bySelf) {
	        ans /= 10;
	    } else {
	        if (-99999999 > ans || ans >= 99999999){
	            ans = -1;
	        }
	    }

	    String ansStr = ans == -1 ? "E" : ans+"";

	    System.out.println(ansStr);
	}
}
0