Week 15 - Task 4
Portals everywhere!
LRRLRRLLRLRLRRRLLRRLLRLRLRRRLRLRRRLLRLRRRRLLRRLRLRRLLRLRLRRRLLRLRLRRRLRRLRRRLRLLLRRLRRLRLLRRLRRRLLRLRLRLRLRRLRLRRLLRLRRLRLRLLRRRLRRLLRLRRLRLRLRRRLRLRRRLRRRLRLRLRLLRRLLRRLRLRLRRLRRRRLRLRLRRLLLRLRRLRLRLRLRLRLRLRLRLRRRLRLRLRLRLRRLLRLRLRLLRRRLRRRRLRLRLRRLRRRRRLRLRLRRLRRLLRLRRRLRLRLRRLLRRLRLRRLRRRLRLRLRLRLRLRLLRRRRLRLLRRLRLLRRLRLRLLRRLRLRRLLRRLRRLRRLRLRLRRRLRLRRLRLRLRL
SANTA as entered portal mode! He can only move between 0 and 10. After that there are portals that throws SANTA to the beginning or the end!
- He starts at position 0
- If "L" he goes left and position is decreased by 1
- If "R" he goes left and position is increased by 1
- If SANTA goes too far left (less than 0) he hits a portal that takes him back to the end position (10)
- If SANTA goes too far left (greater than 10) he hits a portal that takes him back to the start position (0)
Where is SANTA ending up? The answer is an integer between 0 and 10.