Instantly share code, notes, and snippets.

@Ginden /wiki.aaa.js
Last active Jul 11, 2018

Embed
What would you like to do?
liczbaOsob = [0.7, 2.6, 1].map(e => e/100).reduce((a,b) => a*b)*38*1000*1000;
liczbaProb = 100;
Array.from({length: liczbaProb}, () => Object.entries(Array.from({length: liczbaOsob})
.map(e => Math.random()*70*365)
.map(Math.floor)
.reduce((obj, k) => (obj[k] = (obj[k]|0)+1, obj), {}))
.filter(([,v]) => v > 1).length)
.reduce((a,b)=>a+b)/liczbaProb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment