結果

問題 No.722 100×100=1000
ユーザー koi_kotyakoi_kotya
提出日時 2018-08-03 22:43:19
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 248 bytes
コンパイル時間 200 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 30,720 KB
最終ジャッジ日時 2024-04-20 14:59:34
合計ジャッジ時間 4,950 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
17,664 KB
testcase_01 AC 75 ms
12,288 KB
testcase_02 AC 75 ms
12,288 KB
testcase_03 AC 75 ms
12,160 KB
testcase_04 AC 74 ms
12,160 KB
testcase_05 AC 76 ms
12,160 KB
testcase_06 AC 77 ms
12,288 KB
testcase_07 AC 75 ms
12,288 KB
testcase_08 AC 80 ms
12,288 KB
testcase_09 AC 80 ms
12,160 KB
testcase_10 AC 76 ms
12,288 KB
testcase_11 WA -
testcase_12 AC 75 ms
12,160 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 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

a,b = gets.chomp.split(" ").map(&:to_i)
i,j = 0,0
while a%(10**(i+1)) == 0
  i += 1
end
while b%(10**(j+1)) == 0
  j += 1
end
if i > 1 && j > 1 && a/(10**i) < 10 && b/(10**j) < 10
  puts a*b/10
elsif (a*b).abs < 10**8
  puts a*b
else
  puts "E"
end
0