Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- #
- # Usage:
- #
- # (0) Choose your games and check all
- # three mutators
- #
- # (1) Enter the amount under "you save"
- # (money, not percentage) into YOUSAVE1
- #
- # (2) Enter the cost of a single mutator
- # into SINGLE_MUTATOR
- #
- # (3) Click CHECKOUT NOW
- #
- # (4) Enter the amount under "you save"
- # into YOUSAVE2
- #
- # (5) Run script through Python interpreter
- #
- # Your amounts may differ due to local currency
- # (mine are in Euro, sorry about that).
- YOUSAVE1=13.20
- SINGLE_MUTATOR=1.59
- YOUSAVE2=33.10
- PRECISION=1e-6
- from collections import Counter
- from sets import Set
- def combo(val):
- (i,j,k)=val
- print("%.2f=%.2f+%.2f+%.2f"%(i+j+k,i,j,k))
- for i in range(3):
- print;
- print("Possible game #%d:"%(i+1))
- for j in a:
- if a[j]==val[i]:
- print("%s"%j)
- def printkeys(n):
- for i in a:
- if a[i]==n:
- print(i,"\n")
- a={'Megarace 1+2': 4.79,
- 'Cannon Fodder 2': 4.79,
- 'Banished': 15.89,
- 'Sword of the Samurai': 4.79,
- 'Rex Nebular': 4.79,
- 'Capitalism 2': 7.99,
- 'King of Dragon Pass': 4.79,
- 'Wing Commander 1+2': 4.79,
- 'Influx': 7.99,
- 'Fist Puncher': 7.99,
- 'Democracy 3': 19.89,
- 'Divinity: Dragon Commander Imperial Edition': 35.69,
- 'Blackwell Bundle': 11.89,
- 'Legend of Grimrock': 11.89,
- 'Eador: Genesis': 4.79,
- 'Hotline Miami': 7.99,
- 'Raven': 19.89,
- 'Dark Eye: Chains of Satinav': 15.89,
- 'Trine: Enchanted Edition': 11.89}
- vals=a.values()
- set=Set([])
- mv=float(YOUSAVE2-YOUSAVE1+SINGLE_MUTATOR*3)
- for i in vals:
- for j in vals:
- for k in vals:
- if (i<=j and j<=k and abs(mv-i-j-k)<PRECISION):
- set.add((i,j,k))
- for val in set:
- combo(val)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement