Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # coffeescript solution to codeabbey challenge 72
- INP1 = [22, 1838911]
- INP2 = [3, 5, 5, 4, 6, 8, 8, 5, 3, 5, 4, 7, 6, 4, 3, 5, 5, 7, 7, 5, 8, 6]
- CON = 'bcdfghjklmnprstvwxz'
- VOW = 'aeiou'
- A = 445
- C = 700001
- M = 2097152
- XN = INP1[1]
- LI = 0
- RSP = []
- for wl, j in INP2
- WORD = ''
- for i in [1..wl]
- XN = (A*XN + C) % M
- if i % 2 == 0
- LI = XN % 5
- WORD += VOW[LI]
- else
- LI = XN % 19
- WORD += CON[LI]
- RSP.push WORD
- console.log(RSP.join(" "))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement