Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ +d ] sF # first = ord (+0)
- [ s. z3<L q ] sN # junk char, loop if more input
- 0 # sum
- ?
- [
- 0d # sum ... char2 char1 last first
- [
- 3R 48- # char1 -> ASCII ordinal - 48
- # d 1>N # next if <1 (ASSUME: no ASCII chars < '1')
- d 9<N # next if >9
- r d0=F # last ord first
- 3Rs. # last = ord (by junking old)
- z3<L
- ] dsLx
- rA*++ # sum += 10 * last + first (because string reversed)
- ? z1<M
- ] dsMx
- [Part 1: ]np
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement