結果

問題 No.722 100×100=1000
ユーザー htensaihtensai
提出日時 2019-11-12 00:29:33
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 578 bytes
コンパイル時間 2,111 ms
コンパイル使用メモリ 74,412 KB
実行使用メモリ 54,260 KB
最終ジャッジ日時 2024-04-20 16:27:03
合計ジャッジ時間 7,026 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
41,600 KB
testcase_01 AC 126 ms
41,212 KB
testcase_02 AC 117 ms
40,984 KB
testcase_03 AC 121 ms
41,024 KB
testcase_04 AC 125 ms
41,196 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 128 ms
41,236 KB
testcase_08 AC 126 ms
41,260 KB
testcase_09 AC 113 ms
40,016 KB
testcase_10 AC 114 ms
40,104 KB
testcase_11 AC 120 ms
40,928 KB
testcase_12 AC 118 ms
40,480 KB
testcase_13 AC 127 ms
41,160 KB
testcase_14 AC 129 ms
41,352 KB
testcase_15 AC 116 ms
40,244 KB
testcase_16 AC 127 ms
41,040 KB
testcase_17 AC 126 ms
41,132 KB
testcase_18 AC 128 ms
41,288 KB
testcase_19 AC 136 ms
41,680 KB
testcase_20 AC 130 ms
41,372 KB
testcase_21 WA -
testcase_22 AC 136 ms
41,384 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 126 ms
41,180 KB
testcase_26 AC 131 ms
41,436 KB
testcase_27 AC 130 ms
41,656 KB
testcase_28 AC 129 ms
41,472 KB
testcase_29 AC 131 ms
41,336 KB
testcase_30 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextInt();
		long b = sc.nextInt();
		if (isBlind(a) && isBlind(b)) {
		    System.out.println(a /10 * b);
		} else if (a * b < -99999999 || a * b > 99999999) {
		    System.out.println("E");
		} else {
		    System.out.println(a * b);
		}
	}
	
	static boolean isBlind(long x) {
	    while (Math.abs(x) > 9) {
	        if (x % 10 != 0) {
	            return false;
	        }
	        x /= 10;
	    }
	    return true;
	}
}
0