Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- '''
- 1000000 trees per day
- 3% in day 3 to 33% in day 70
- none during winter
- autumn lasts for 20 days 1-20
- winter lasts for 16 days 21-36
- spring lasts for 20 days 37-56
- summer lasts for 16 days 57-72
- winter = (day%72)>=21&&(day%72)<=36
- '''
- def isWinter(d):
- d = ((d-1)%72)+1
- return (d>=21) and (d<=36)
- day = 3
- poisoned = 0
- cut = 2000000
- perc = 0.03
- maxp = 33224202171613280406600885863289624718
- yearlycut = 0
- yearlypoison = 0
- while True:
- if day <= 70:
- perc = 0.03+(0.33-0.03)/(70-3)*(day-3)
- else:
- perc = 0.33
- cut += 1000000
- if not isWinter(day):
- if poisoned + int(1000000 * perc) > maxp:
- #print cut
- #print poisoned
- dif = (maxp - poisoned) + 1
- cut += (dif * 100) // 33
- poisoned += int(((dif * 100) // 33) * 0.33)
- cut += 1
- #print dif
- break
- if day <= 72:
- poisoned += 1000000 * perc
- else:
- poisoned += int(1000000 * perc)
- if day == 72:
- poisoned = int(poisoned)
- if day >= 73 and day <= 144:
- yearlycut += 1000000
- if not isWinter(day):
- yearlypoison += int(1000000 * perc)
- if day == 145:
- #print yearlycut
- #print yearlypoison
- poisoned = int(poisoned)
- years = int((maxp-poisoned) // yearlypoison)
- poisoned += int(yearlypoison * years)
- cut += int(yearlycut * years)
- day += int(72 * years)
- if poisoned >= maxp:
- break
- day = day + 1
- #print poisoned
- #print cut
- #print hex(cut)[2:-1]
- print hex(cut)[2:-1].decode("hex")
- '''l a s a c t f { a b 0 u 7 _ 7 r 3 3 _ f 1 f 7 y }'''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement