結果

問題 No.722 100×100=1000
ユーザー xsdxsd
提出日時 2020-06-21 19:31:44
言語 OCaml
(5.1.0)
結果
TLE  
実行時間 -
コード長 433 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 21,576 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-04-17 09:02:51
合計ジャッジ時間 3,898 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
10,752 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 2 ms
5,376 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 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

Scanf.scanf "%d %d" (fun a b ->
    let judge k =
        let rec loop a =
            if a mod 10 = 0 then loop (a / 10) else abs a >= 1 && abs a <= 9
        in
        loop k
    in
    if a mod 100 = 0 && b mod 100 = 0 && judge a && judge b then
        Printf.printf "%d\n" (a * b / 10)
    else
        let q = a * b in
        if q >= -99999999 && q <= 99999999 then Printf.printf "%d\n" q
            else print_endline "E"
)
0