ooooooooooooooooh python香

shao 发表于 4年前 · 关联问题 一鸣师姐与阿枯城

class Ym: def __init__(self,h,ark,k,kh): self.h = h self.ark = ark self.k = k self.kh = kh class Bs: def __init__(self,h,ark,t): self.h = h self.ark = ark self.t = t flag = True def fuck(): global flag flag = False print('My Milk!') def win(): global flag flag = False print('Mission Complete.') ym = Ym(*[int(i) for i in input().strip().split()]) bs = [] ymh = ym.h n = int(input()) for _ in range(n): bs.append(Bs(*[int(i) for i in input().strip().split()])) tnn = 0 tt = 0 bss = [] for t in range(0,3100): for i in bs: if i.t == t: bss.append(i) tnn += 1 if len(bss) > 1: fuck() break elif len(bss) == 1: tt = 0 bss[0].h -= ym.ark ym.h -= bss[0].ark if bss[0].h <= 0: del bss[0] if ym.h <= 0: fuck() break else: tt += 1 if tt == ym.k: ym.h += ym.kh if ym.h > ymh: ym.h = ymh if tnn >= n: win() break if(flag): win()