結果

問題 No.143 豆
ユーザー regeregeregerege
提出日時 2016-06-21 11:03:59
言語 F#
(F# 4.0)
結果
AC  
実行時間 87 ms / 1,000 ms
コード長 190 bytes
コンパイル時間 3,213 ms
コンパイル使用メモリ 156,572 KB
実行使用メモリ 24,796 KB
最終ジャッジ日時 2023-09-30 16:46:53
合計ジャッジ時間 5,595 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
24,796 KB
testcase_01 AC 84 ms
20,668 KB
testcase_02 AC 85 ms
22,872 KB
testcase_03 AC 84 ms
22,784 KB
testcase_04 AC 84 ms
22,748 KB
testcase_05 AC 85 ms
22,728 KB
testcase_06 AC 85 ms
22,912 KB
testcase_07 AC 84 ms
22,820 KB
testcase_08 AC 85 ms
22,728 KB
testcase_09 AC 86 ms
22,860 KB
testcase_10 AC 86 ms
24,772 KB
testcase_11 AC 84 ms
22,840 KB
testcase_12 AC 84 ms
20,688 KB
testcase_13 AC 86 ms
20,692 KB
testcase_14 AC 87 ms
22,812 KB
testcase_15 AC 86 ms
22,696 KB
testcase_16 AC 85 ms
22,728 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let i() = stdin.ReadLine().Split(' ') |> Array.map int
let a = i()|> function
    | [|a;b;_|]-> a*b
    | _ -> failwith ""
let b = i() |> Array.sum
if b > a then -1 else a-b
|> printfn "%d"
0