Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Vowels
- # Bit table: 000001000001000001000100010 (2130466)
- [ 2r^ 2130466r/ 2% lv+ sv ]sV # vowels += vowel_table lookup bit
- # Bad strings
- # Bit table: 110111111101111111111110101 (117374965)
- [ d2r^ 117374965r/ 2% lb* sb ] sB # bad *= bad_table lookup bit
- # Doubles
- [ 1sd ] sD # mark double flag
- [ 1+ ] sS # score string
- 0 # count = 0
- ?
- [
- 0dsdsv 1sb # init flags
- # Process string (note: arrives backwards)
- [
- dlVx # vowel check
- rd3R- # c1 -> difference (c1-c2)
- d0=D # check doubles
- _1=B # check bad strings
- z 2<L # leave: last-char count
- ] dsLx
- lVxlv # check last-char for vowel
- lb ld ** 3!>S # num vowels * bad (0|1) * doubles (1|0)
- ? z 1<M
- ] dsMx
- p
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement