Skip to content

Instantly share code, notes, and snippets.

@Shaunwei
Last active March 22, 2016 06:10
通过努力获得offer!
import random
class :
def __init__(本我, 愿意付出的时间):
本我.愿意付出的时间 = 愿意付出的时间
本我.武力值 = 5
def 学习(本我, 宝典):
本我.武力值 += 1
def 练习武功(本我):
本我.愿意付出的时间 -= 1
def 思考武功(本我):
return random.randint(1, 3)
class 某个面试:
def __init__(self, 难度):
self.难度 = 难度
def 获得SuperX心法武功():
return '少林长拳'
def 获得生长观点():
return '生长观点'
def 获得面试():
return map(某个面试, range(100, 200))
##
# 获得offer的计算公式!
def 拿到很多offer():
少林长拳秘笈 = 获得SuperX心法武功()
生长的观点 = 获得生长观点()
.学习(少林长拳秘笈)
.学习(生长的观点)
while .愿意付出的时间:
.练习武功()
.武力值 += .思考武功()
面试表 = 获得面试()
offers = 0
for 面试 in 面试表:
if .武力值 >= 面试.难度:
offers += 1
return offers
print('恭喜你!你经过努力拿到了 %d 个offer' % 拿到很多offer((愿意付出的时间=50)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment