結果

問題 No.722 100×100=1000
ユーザー ribenngeribennge
提出日時 2018-08-23 16:53:11
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 639 bytes
コンパイル時間 3,094 ms
コンパイル使用メモリ 74,776 KB
実行使用メモリ 54,144 KB
最終ジャッジ日時 2024-04-20 15:24:31
合計ジャッジ時間 7,624 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
41,596 KB
testcase_01 AC 128 ms
41,288 KB
testcase_02 AC 132 ms
41,160 KB
testcase_03 AC 114 ms
41,296 KB
testcase_04 AC 127 ms
41,660 KB
testcase_05 AC 129 ms
41,256 KB
testcase_06 AC 128 ms
41,416 KB
testcase_07 WA -
testcase_08 AC 125 ms
41,452 KB
testcase_09 AC 128 ms
41,560 KB
testcase_10 AC 127 ms
41,424 KB
testcase_11 AC 123 ms
41,688 KB
testcase_12 AC 114 ms
41,568 KB
testcase_13 AC 124 ms
41,328 KB
testcase_14 AC 113 ms
41,596 KB
testcase_15 AC 129 ms
41,316 KB
testcase_16 AC 133 ms
41,524 KB
testcase_17 AC 129 ms
41,028 KB
testcase_18 AC 121 ms
40,056 KB
testcase_19 AC 130 ms
41,400 KB
testcase_20 AC 120 ms
40,028 KB
testcase_21 AC 115 ms
41,188 KB
testcase_22 AC 127 ms
41,080 KB
testcase_23 AC 123 ms
39,976 KB
testcase_24 AC 127 ms
41,264 KB
testcase_25 AC 128 ms
41,564 KB
testcase_26 AC 124 ms
41,368 KB
testcase_27 AC 124 ms
41,316 KB
testcase_28 AC 125 ms
41,424 KB
testcase_29 AC 121 ms
40,040 KB
testcase_30 AC 129 ms
41,308 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class No_722{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		
		int n = 0;
		int m = 0;
		int al = Math.abs(a);
		int bl = Math.abs(b);
		
		for(int i= 0;al >= 10;i++){
		al /= 10;
		n++;
		}
		
		for(int i = 0;bl >= 10;i++){
		bl /= 10;
		m++;
		}
		
		if((n >= 2&&a % Math.pow(10,n) == 0)&&(m >= 2&&b % Math.pow(10,m) == 0)) {
			System.out.println((long)a * b / 10);
		}else if(a * b < -99999999 || a * b > 99999999) {
			System.out.println("E");
		}else {
			System.out.println(a * b);
		}
	}
}
0