#!/usr/bin/env python #encoding=utf-8 """ bdx """ def bdx_agent(x=500,y=100,lost=0,i=0): i=i+1 print "第%s轮:压%s,压triple:%s,赢1:%s 赢2:%s,lost:%s"%(i,x,y,x*2-y-x+lost,y*24-x-y+lost,-x-y+lost) lost = -x-y+lost return (x,y,lost,i)
def dox(bound=10): i = 0 x = 500 y = 100 lost = 0 while i < bound: rx,ry,rlost,ri = bdx_agent(x,y,lost,i) x=rx*2 y=ry+100 lost=rlost print "lost:",lost i=ri if __name__ == "__main__":
|