結果

問題 No.722 100×100=1000
ユーザー tsunabittsunabit
提出日時 2019-07-01 21:40:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 951 bytes
コンパイル時間 4,035 ms
コンパイル使用メモリ 74,464 KB
実行使用メモリ 56,360 KB
最終ジャッジ日時 2023-08-28 15:57:56
合計ジャッジ時間 9,380 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
56,148 KB
testcase_01 AC 123 ms
54,348 KB
testcase_02 AC 122 ms
56,196 KB
testcase_03 AC 128 ms
56,268 KB
testcase_04 AC 123 ms
55,632 KB
testcase_05 AC 122 ms
56,184 KB
testcase_06 AC 132 ms
55,940 KB
testcase_07 AC 127 ms
56,112 KB
testcase_08 AC 126 ms
55,756 KB
testcase_09 AC 128 ms
56,252 KB
testcase_10 AC 128 ms
55,772 KB
testcase_11 AC 122 ms
56,024 KB
testcase_12 AC 121 ms
56,204 KB
testcase_13 AC 121 ms
55,808 KB
testcase_14 AC 122 ms
55,824 KB
testcase_15 AC 121 ms
54,312 KB
testcase_16 AC 123 ms
55,688 KB
testcase_17 AC 125 ms
55,796 KB
testcase_18 AC 125 ms
55,696 KB
testcase_19 AC 122 ms
55,932 KB
testcase_20 AC 121 ms
55,760 KB
testcase_21 AC 121 ms
56,164 KB
testcase_22 AC 121 ms
56,068 KB
testcase_23 AC 122 ms
56,060 KB
testcase_24 AC 121 ms
55,548 KB
testcase_25 AC 121 ms
56,108 KB
testcase_26 AC 121 ms
55,768 KB
testcase_27 AC 121 ms
56,044 KB
testcase_28 AC 122 ms
56,340 KB
testcase_29 AC 121 ms
56,360 KB
testcase_30 AC 122 ms
56,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;

public class No722 {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	BigDecimal a = new BigDecimal(sc.nextInt()), b = new BigDecimal(sc.nextInt());
    	BigDecimal j = new BigDecimal(10), z = new BigDecimal(0), m = new BigDecimal(-1), h = new BigDecimal(100);
    	
    	if(a.abs().toString().replaceAll("0", "").length() == 1 && b.abs().toString().replaceAll("0", "").length() == 1 &&
    	   a.remainder(j).equals(z) && b.remainder(j).equals(z) && a.toString().length() > 2 && b.toString().length() > 2) {
    		System.out.println(a.multiply(b).divide(j));
    	}else {
    		BigDecimal min = new BigDecimal(-99999999), max = new BigDecimal(99999999);
    		if(a.multiply(b).compareTo(min) >= 0 && a.multiply(b).compareTo(max) <= 0) {
    			System.out.println(a.multiply(b));
    		}else {
    			System.out.println("E");
    		}
    	}
    }
}
0