結果

問題 No.143 豆
ユーザー hum_ophum_op
提出日時 2016-04-14 20:33:33
言語 F#
(F# 4.0)
結果
AC  
実行時間 86 ms / 1,000 ms
コード長 351 bytes
コンパイル時間 4,710 ms
コンパイル使用メモリ 167,304 KB
実行使用メモリ 24,792 KB
最終ジャッジ日時 2023-09-30 16:44:36
合計ジャッジ時間 6,363 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
22,700 KB
testcase_01 AC 71 ms
22,220 KB
testcase_02 AC 85 ms
24,792 KB
testcase_03 AC 86 ms
22,852 KB
testcase_04 AC 86 ms
22,804 KB
testcase_05 AC 70 ms
24,368 KB
testcase_06 AC 70 ms
22,192 KB
testcase_07 AC 70 ms
22,292 KB
testcase_08 AC 71 ms
22,424 KB
testcase_09 AC 86 ms
22,816 KB
testcase_10 AC 69 ms
22,300 KB
testcase_11 AC 86 ms
22,768 KB
testcase_12 AC 86 ms
24,780 KB
testcase_13 AC 86 ms
22,952 KB
testcase_14 AC 86 ms
22,912 KB
testcase_15 AC 84 ms
20,752 KB
testcase_16 AC 85 ms
22,752 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

open System

let No143 () =
    let IN = Console.ReadLine().Split(' ')
    let B = (Int32.Parse IN.[0]) * (Int32.Parse IN.[1])
    let last n = 
        if B - n < 0 then
            printfn "-1"
        else
            printfn "%d" (B - n)

    Console.ReadLine().Split(' ')
    |> Array.map Int32.Parse
    |> Array.sum
    |> last
    ()

No143 ()
0