b186. 97七區資訊學科1(改編) -- 97學年度彰雲嘉區資訊學科能力競賽
#coding:utf-8 try : while True: cookie,chocolate,cake = map(float,input().split()) Chocolate_addlist = [cookie//10, cake//2] if cookie >= 10 and cake >= 2: print("%d 個餅乾,%d 盒巧克力,%d 個蛋糕。" % (cookie, chocolate + min(Chocolate_addlist),cake)) else: print("%d 個餅乾,%d 盒巧克力,%d 個蛋糕。" % (cookie, chocolate ,cake)) except EOFError: pass