You are viewing a single comment's thread. Return to all comments →
Python one-liner logic:
n, k = map(int, input().strip().split(' ')) c = [int(x) for x in input().strip().split(' ')] b = int(input().strip()) print('Bon Appetit' if (sum(c) - c[k]) // 2 == b else c[k] // 2)
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 →
Python one-liner logic: