結果
問題 | No.722 100×100=1000 |
ユーザー | kohaku_kohaku |
提出日時 | 2018-08-03 23:08:55 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 653 bytes |
コンパイル時間 | 3,497 ms |
コンパイル使用メモリ | 79,856 KB |
実行使用メモリ | 47,444 KB |
最終ジャッジ日時 | 2024-04-20 15:02:52 |
合計ジャッジ時間 | 9,116 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 132 ms
46,556 KB |
testcase_01 | AC | 128 ms
41,372 KB |
testcase_02 | AC | 131 ms
41,136 KB |
testcase_03 | AC | 118 ms
40,228 KB |
testcase_04 | AC | 121 ms
40,260 KB |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 133 ms
41,364 KB |
testcase_08 | AC | 131 ms
41,328 KB |
testcase_09 | AC | 132 ms
41,104 KB |
testcase_10 | AC | 135 ms
41,240 KB |
testcase_11 | AC | 122 ms
40,280 KB |
testcase_12 | AC | 132 ms
41,380 KB |
testcase_13 | TLE | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
ソースコード
package test; import java.util.Scanner; public class main { public static void main (String[]args) { Scanner sc = new Scanner(System.in); long a = sc.nextLong(); long b = sc.nextLong(); solve(a,b); } static private void solve(long a, long b) { long ans = a * b; if(check(a) && check(b)) { System.out.println(ans/10); } else { if(ans >= -99999999 && ans <= 99999999) { System.out.println(ans); } else { System.out.println("E"); } } } static private boolean check(long num) { while(num%10 == 0) { num /= 10; } num = Math.abs(num); if(num >= 1 && num <= 9) { return true; } return false; } }