結果

問題 No.722 100×100=1000
ユーザー DeAKetsuDeAKetsu
提出日時 2019-06-03 12:28:00
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 623 bytes
コンパイル時間 2,399 ms
コンパイル使用メモリ 81,956 KB
実行使用メモリ 41,668 KB
最終ジャッジ日時 2024-04-20 16:19:50
合計ジャッジ時間 6,483 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
41,520 KB
testcase_01 AC 102 ms
40,920 KB
testcase_02 AC 96 ms
40,136 KB
testcase_03 WA -
testcase_04 AC 102 ms
41,304 KB
testcase_05 AC 113 ms
41,308 KB
testcase_06 AC 112 ms
41,032 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 114 ms
40,088 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 114 ms
40,000 KB
testcase_13 AC 115 ms
41,656 KB
testcase_14 AC 107 ms
41,124 KB
testcase_15 AC 112 ms
41,272 KB
testcase_16 AC 95 ms
41,384 KB
testcase_17 AC 113 ms
41,144 KB
testcase_18 AC 111 ms
41,240 KB
testcase_19 AC 109 ms
41,668 KB
testcase_20 WA -
testcase_21 AC 121 ms
41,240 KB
testcase_22 AC 101 ms
41,328 KB
testcase_23 AC 118 ms
41,184 KB
testcase_24 AC 108 ms
41,468 KB
testcase_25 AC 103 ms
41,320 KB
testcase_26 AC 111 ms
41,172 KB
testcase_27 WA -
testcase_28 AC 102 ms
41,292 KB
testcase_29 AC 100 ms
40,256 KB
testcase_30 AC 96 ms
41,148 KB
権限があれば一括ダウンロードができます

ソースコード

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