結果

問題 No.143 豆
ユーザー Nobita GomuNobita Gomu
提出日時 2017-09-26 22:26:02
言語 F#
(F# 4.0)
結果
AC  
実行時間 89 ms / 1,000 ms
コード長 311 bytes
コンパイル時間 3,813 ms
コンパイル使用メモリ 155,588 KB
実行使用メモリ 23,160 KB
最終ジャッジ日時 2023-09-30 17:08:07
合計ジャッジ時間 6,249 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
22,972 KB
testcase_01 AC 87 ms
22,848 KB
testcase_02 AC 86 ms
23,020 KB
testcase_03 AC 86 ms
22,996 KB
testcase_04 AC 87 ms
23,160 KB
testcase_05 AC 88 ms
23,036 KB
testcase_06 AC 89 ms
22,884 KB
testcase_07 AC 89 ms
22,972 KB
testcase_08 AC 87 ms
22,920 KB
testcase_09 AC 88 ms
23,048 KB
testcase_10 AC 88 ms
22,972 KB
testcase_11 AC 87 ms
23,144 KB
testcase_12 AC 87 ms
22,980 KB
testcase_13 AC 87 ms
23,140 KB
testcase_14 AC 86 ms
22,880 KB
testcase_15 AC 87 ms
22,916 KB
testcase_16 AC 87 ms
22,968 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let split (s:string) = s.Split ' '

let sum0 = split >> Array.map int >> fun (a:int[]) -> a.[0] * a.[1]
let sum1 = split >> Seq.map int >> Seq.sum

let count =
    match (stdin.ReadLine () |> sum0,
           stdin.ReadLine () |> sum1) with
    | (a, b) when a >= b -> a - b
    | _ -> -1

count |> printfn "%d"
0