結果

問題 No.722 100×100=1000
ユーザー ribenngeribennge
提出日時 2018-08-23 17:46:03
言語 Java19
(openjdk 21)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 629 bytes
コンパイル時間 2,591 ms
コンパイル使用メモリ 72,064 KB
実行使用メモリ 56,532 KB
最終ジャッジ日時 2023-08-28 15:52:37
合計ジャッジ時間 7,317 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
56,244 KB
testcase_01 AC 122 ms
56,364 KB
testcase_02 AC 120 ms
56,020 KB
testcase_03 AC 127 ms
56,032 KB
testcase_04 AC 122 ms
56,120 KB
testcase_05 AC 125 ms
56,112 KB
testcase_06 AC 122 ms
53,924 KB
testcase_07 AC 120 ms
55,924 KB
testcase_08 AC 122 ms
55,760 KB
testcase_09 AC 122 ms
55,852 KB
testcase_10 AC 122 ms
55,848 KB
testcase_11 AC 122 ms
55,968 KB
testcase_12 AC 121 ms
55,808 KB
testcase_13 AC 121 ms
56,088 KB
testcase_14 AC 123 ms
56,436 KB
testcase_15 AC 123 ms
56,132 KB
testcase_16 AC 120 ms
55,828 KB
testcase_17 AC 120 ms
55,844 KB
testcase_18 AC 118 ms
56,532 KB
testcase_19 AC 118 ms
56,076 KB
testcase_20 AC 119 ms
55,976 KB
testcase_21 AC 117 ms
56,012 KB
testcase_22 AC 125 ms
54,272 KB
testcase_23 AC 123 ms
55,760 KB
testcase_24 AC 123 ms
55,576 KB
testcase_25 AC 122 ms
55,896 KB
testcase_26 AC 123 ms
55,756 KB
testcase_27 AC 123 ms
55,916 KB
testcase_28 AC 122 ms
55,840 KB
testcase_29 AC 122 ms
55,936 KB
testcase_30 AC 123 ms
55,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class No_722{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		
		int n = 0;
		int m = 0;
		long al = Math.abs(a);
		long 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(a * b / 10);
		}else if(Math.abs(a * b) <= 99999999) {
			System.out.println(a * b);
		}else {
			System.out.println("E");
		}
	}
}
0