結果
問題 |
No.722 100×100=1000
|
ユーザー |
![]() |
提出日時 | 2019-11-12 00:32:15 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 155 ms / 2,000 ms |
コード長 | 640 bytes |
コンパイル時間 | 2,298 ms |
コンパイル使用メモリ | 74,148 KB |
実行使用メモリ | 41,524 KB |
最終ジャッジ日時 | 2024-12-29 19:49:07 |
合計ジャッジ時間 | 8,110 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 27 |
ソースコード
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) { if (x > -100 && x < 100) { return false; } while (Math.abs(x) > 9) { if (x % 10 != 0) { return false; } x /= 10; } return true; } }