import sys chouma,cishu = map(int,input().split()) d = 0 for i inrange(cishu): n1,b,t,n2 = map(int,input().split()) if chouma >= t: if b == 0: if n2<n1: chouma += t print('Win {}! Total = {}.'.format(t,chouma)) else: chouma -= t print('Lose {}. Total = {}.'.format(t,chouma)) if chouma == 0: print('Game Over.') sys.exit() else: if n2>n1: chouma += t print('Win {}! Total = {}.'.format(t,chouma)) else: chouma -= t print('Lose {}. Total = {}.'.format(t,chouma)) if chouma == 0: print('Game Over.') sys.exit() else: print('Not enough tokens. Total = {}.'.format(chouma))
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.