Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- def p(x):
- """ Calculates maximum allowed difference in team size
- x is the current size of the smallest team """
- if x == 0:
- print x, 1
- elif x <= 12:
- print x, int(math.ceil(0.15*x))
- else:
- print x , int(math.ceil(math.log(x)))
- print 'Smallest Team Size, Allowed Team Difference'
- for i in range(0,75):
- p(i)
- Output:
- Smallest Team Size, Allowed Team Difference
- 0 1
- 1 1
- 2 1
- 3 1
- 4 1
- 5 1
- 6 1
- 7 2
- 8 2
- 9 2
- 10 2
- 11 2
- 12 2
- 13 3
- 14 3
- 15 3
- 16 3
- 17 3
- 18 3
- 19 3
- 20 3
- 21 4
- 22 4
- 23 4
- 24 4
- 25 4
- 26 4
- 27 4
- 28 4
- 29 4
- 30 4
- 31 4
- 32 4
- 33 4
- 34 4
- 35 4
- 36 4
- 37 4
- 38 4
- 39 4
- 40 4
- 41 4
- 42 4
- 43 4
- 44 4
- 45 4
- 46 4
- 47 4
- 48 4
- 49 4
- 50 4
- 51 4
- 52 4
- 53 4
- 54 4
- 55 5
- 56 5
- 57 5
- 58 5
- 59 5
- 60 5
- 61 5
- 62 5
- 63 5
- 64 5
- 65 5
- 66 5
- 67 5
- 68 5
- 69 5
- 70 5
- 71 5
- 72 5
- 73 5
- 74 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement