結果

問題 No.143 豆
ユーザー regeregeregerege
提出日時 2016-06-21 10:57:38
言語 F#
(F# 4.0)
結果
AC  
実行時間 87 ms / 1,000 ms
コード長 253 bytes
コンパイル時間 3,497 ms
コンパイル使用メモリ 155,788 KB
実行使用メモリ 25,068 KB
最終ジャッジ日時 2023-09-30 16:46:46
合計ジャッジ時間 5,796 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
22,980 KB
testcase_01 AC 86 ms
24,968 KB
testcase_02 AC 85 ms
20,884 KB
testcase_03 AC 84 ms
23,016 KB
testcase_04 AC 85 ms
25,064 KB
testcase_05 AC 84 ms
21,148 KB
testcase_06 AC 86 ms
20,824 KB
testcase_07 AC 86 ms
20,896 KB
testcase_08 AC 86 ms
25,068 KB
testcase_09 AC 84 ms
23,128 KB
testcase_10 AC 86 ms
22,864 KB
testcase_11 AC 85 ms
23,096 KB
testcase_12 AC 87 ms
24,980 KB
testcase_13 AC 85 ms
22,940 KB
testcase_14 AC 85 ms
22,988 KB
testcase_15 AC 85 ms
20,864 KB
testcase_16 AC 85 ms
22,932 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let f (s:System.String) = s.Split(' ') |> Seq.map int64
let m =
    stdin.ReadLine() |> f |> Seq.toList
    |> function
    | [k;n;f] -> k*n
    | _ -> failwith "error!"
let s = stdin.ReadLine() |> f |> Seq.sum
if s > m then -1L
else m-s
|> printfn "%d"
0