結果

問題 No.722 100×100=1000
ユーザー tentententen
提出日時 2020-09-02 10:19:43
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 728 bytes
コンパイル時間 2,445 ms
コンパイル使用メモリ 71,516 KB
実行使用メモリ 56,484 KB
最終ジャッジ日時 2023-08-28 16:02:40
合計ジャッジ時間 7,541 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
56,108 KB
testcase_01 AC 118 ms
56,136 KB
testcase_02 AC 122 ms
55,696 KB
testcase_03 AC 122 ms
55,440 KB
testcase_04 AC 121 ms
55,876 KB
testcase_05 AC 121 ms
55,856 KB
testcase_06 AC 120 ms
55,788 KB
testcase_07 AC 121 ms
55,924 KB
testcase_08 AC 121 ms
55,840 KB
testcase_09 AC 120 ms
55,716 KB
testcase_10 AC 121 ms
56,160 KB
testcase_11 AC 122 ms
56,060 KB
testcase_12 AC 121 ms
53,952 KB
testcase_13 AC 123 ms
56,176 KB
testcase_14 AC 121 ms
56,012 KB
testcase_15 AC 121 ms
55,836 KB
testcase_16 AC 124 ms
55,520 KB
testcase_17 AC 120 ms
55,904 KB
testcase_18 AC 122 ms
55,640 KB
testcase_19 AC 120 ms
55,900 KB
testcase_20 AC 123 ms
56,484 KB
testcase_21 AC 121 ms
55,748 KB
testcase_22 AC 119 ms
55,784 KB
testcase_23 AC 120 ms
55,520 KB
testcase_24 AC 121 ms
56,072 KB
testcase_25 AC 119 ms
55,440 KB
testcase_26 AC 114 ms
55,356 KB
testcase_27 AC 120 ms
56,472 KB
testcase_28 AC 120 ms
55,864 KB
testcase_29 AC 120 ms
55,768 KB
testcase_30 AC 120 ms
55,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextInt();
        long b = sc.nextInt();
        if (check(a) && check(b)) {
            System.out.println(a * b / 10);
        } else if (a * b >= -99999999 && a * b <= 99999999) {
            System.out.println(a * b);
        } else {
            System.out.println("E");
        }
    }
    
    static boolean check(long x) {
        if (x == 0) {
            return false;
        }
        long y = Math.abs(x);
        int count = 0;
        while (y % 10 == 0) {
            count++;
            y /= 10;
        }
        return (y < 10 && count >= 2);
    }
    
}
0