milardovich

map problem

Oct 11th, 2013
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.23 KB | None | 0 0
  1. obj = [34773, 28566, 31509, 24366, 32891, 32230, 29208, 24501, 32027, 31359, 27217, 31430, 28049, 35981, 34471, 33724, 30934, 35097, 29596, 31871, 31603, 33786, 33399]
  2. total = 718588
  3.  
  4. list = obj.map{ | x | 1-(x/total) }
  5. print list
Advertisement
Add Comment
Please, Sign In to add comment