You are viewing a single comment's thread. Return to all comments →
Golang solution
func bonAppetit(bill []int32, k int32, b int32) { bill[k] = 0 var total int32 for _,v := range bill { total += v } refund := total/2 if refund == b { fmt.Println("Bon Appetit") } else { fmt.Println(b - refund) } }
Seems like cookies are disabled on this browser, please enable them to open this website
Bill Division
You are viewing a single comment's thread. Return to all comments →
Golang solution