結果

問題 No.149 碁石の移動
ユーザー regeregeregerege
提出日時 2016-06-26 19:56:24
言語 F#
(F# 4.0)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 234 bytes
コンパイル時間 4,407 ms
コンパイル使用メモリ 156,316 KB
実行使用メモリ 24,964 KB
最終ジャッジ日時 2023-08-25 17:45:04
合計ジャッジ時間 6,514 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
22,876 KB
testcase_01 AC 76 ms
22,796 KB
testcase_02 AC 74 ms
22,848 KB
testcase_03 AC 72 ms
22,908 KB
testcase_04 AC 72 ms
22,784 KB
testcase_05 AC 72 ms
24,920 KB
testcase_06 AC 72 ms
22,900 KB
testcase_07 AC 72 ms
22,964 KB
testcase_08 AC 72 ms
22,896 KB
testcase_09 AC 73 ms
22,900 KB
testcase_10 AC 74 ms
20,936 KB
testcase_11 AC 75 ms
24,964 KB
testcase_12 AC 75 ms
22,788 KB
testcase_13 AC 77 ms
22,916 KB
testcase_14 AC 71 ms
22,868 KB
testcase_15 AC 77 ms
22,796 KB
testcase_16 AC 76 ms
22,852 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let I() = let a = stdin.ReadLine().Split(' ') |> Array.map int in a.[0], a.[1]
let Aw,Ab = I()
let Bw,Bb = I()
let C,D = I()
let m0 = if C>=Ab then C-Ab else 0
let Bw2 = Bw+m0
let m1 = if Bw2>=D then D else Bw2
printfn "%d" (Aw-m0+m1)
0