結果

問題 No.149 碁石の移動
ユーザー tsuchinaga
提出日時 2019-02-25 18:41:11
言語 Go
(1.23.4)
結果
WA  
実行時間 -
コード長 264 bytes
コンパイル時間 16,750 ms
コンパイル使用メモリ 230,844 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-28 01:25:18
合計ジャッジ時間 14,723 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 12 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
	"fmt"
	"math"
)

func main() {
	var aw, ab, bw, bb, c, d int
	_, _ = fmt.Scan(&aw, &ab, &bw, &bb, &c, &d)

	if c-d > 0 {
		if c > ab {
			aw -= c - ab
			bw += c - ab
		}
	}
	aw += int(math.Min(float64(bw), float64(d)))

	fmt.Println(aw)
}
0