結果
| 問題 |
No.143 豆
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-06-21 10:57:38 |
| 言語 | F# (F# 4.0) |
| 結果 |
AC
|
| 実行時間 | 343 ms / 1,000 ms |
| コード長 | 253 bytes |
| コンパイル時間 | 6,854 ms |
| コンパイル使用メモリ | 191,212 KB |
| 実行使用メモリ | 35,140 KB |
| 最終ジャッジ日時 | 2024-07-23 10:31:41 |
| 合計ジャッジ時間 | 13,722 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (236 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
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"