結果

問題 No.143 豆
ユーザー regerege
提出日時 2016-06-21 10:54:04
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 250 bytes
コンパイル時間 10,682 ms
コンパイル使用メモリ 190,656 KB
実行使用メモリ 35,000 KB
最終ジャッジ日時 2024-10-11 18:17:03
合計ジャッジ時間 14,823 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9 WA * 8
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (409 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/

ソースコード

diff #

let f (s:System.String) = s.Split(' ') |> Seq.map int
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 -1
else m%s
|> printfn "%d"
0