Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Saved 0.6% bytes by eliminated quotes.
Source Link
Engineer Toast
  • 9.6k
  • 1
  • 25
  • 54

Taxi [Taxi], 1698(削除) 1698 (削除ここまで) 1678 bytes

No need to wrap single-byte plan names in quote marks. 0.6% byte reduction!

Go to Post Office:w 1 l 1 r 1 l.Pickup a passenger going to Chop Suey.Pickup a passenger going to The Babelfishery.Go to The Babelfishery:s 1 l 1 r.Pickup a passenger going to Addition Alley.1 is waiting at Starchild Numerology.Go to Starchild Numerology:n 1 l 1 l 1 l 2 l. Pickup a passenger going to Addition Alley.Go to Addition Alley:w 1 r 3 r 1 r 1 r.Pickup a passenger going to The Underground.Go to Chop Suey:n 1 r 2 r.[1]Switch to plan "2"2 if no one is waiting.Pickup a passenger going to Narrow Path Park.Go to Narrow Path Park:n 1 l 1 r 1 l.Go to Chop Suey:e 1 r 1 l 1 r.Switch to plan "1"1.[2]Go to Narrow Path Park:n 1 l 1 r 1 l.Switch to plan "3"3 if no one is waiting.Pickup a passenger going to Chop Suey.Go to Chop Suey:e 1 r 1 l 1 r.Switch to plan "2"2.[3]Go to Chop Suey:e 1 r 1 l 1 r.[a]Go to The Underground:s 1 r 1 l.Switch to plan "b"b if no one is waiting.Pickup a passenger going to The Underground.Go to Fueler Up:s.Go to Chop Suey:n 3 r 1 l.Pickup a passenger going to Chop Suey.Switch to plan "a"a.[b]Go to Chop Suey:n 2 r 1 l.[4]Switch to plan "5"5 if no one is waiting.Pickup a passenger going to Narrow Path Park.Go to Narrow Path Park:n 1 l 1 r 1 l.Go to Chop Suey:e 1 r 1 l 1 r.Switch to plan "4"4.[5]Go to Narrow Path Park:n 1 l 1 r 1 l.[c]Switch to plan "d"d if no one is waiting.Pickup a passenger going to KonKat's.Go to KonKat's:e 1 r.Pickup a passenger going to KonKat's.Go to Narrow Path Park:n 2 l.Switch to plan "c"c.[d]Go to KonKat's:e 1 r.Pickup a passenger going to The Babelfishery.Go to The Babelfishery:s.Pickup a passenger going to The Babelfishery.Go to KonKat's:n.Go to The Babelfishery:s.Pickup a passenger going to Post Office.Go to Post Office:n 1 l 1 r.

Try it online! Try it online!

[ Pick up the inputs, add 1 to the second, and chop the first into pieces. ]
Go to Post Office:w 1 l 1 r 1 l.
Pickup a passenger going to Chop Suey.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery:s 1 l 1 r.
Pickup a passenger going to Addition Alley.
1 is waiting at Starchild Numerology.
Go to Starchild Numerology:n 1 l 1 l 1 l 2 l. 
Pickup a passenger going to Addition Alley.
Go to Addition Alley:w 1 r 3 r 1 r 1 r.
Pickup a passenger going to The Underground.
Go to Chop Suey:n 1 r 2 r.
[ Reverse the order the charaters are stored in so we can right-shift instead of left-shift. ]
[1]
Switch to plan "2"2 if no one is waiting.
Pickup a passenger going to Narrow Path Park.
Go to Narrow Path Park:n 1 l 1 r 1 l.
Go to Chop Suey:e 1 r 1 l 1 r.
Switch to plan "1"1.
[2]
Go to Narrow Path Park:n 1 l 1 r 1 l.
Switch to plan "3"3 if no one is waiting.
Pickup a passenger going to Chop Suey.
Go to Chop Suey:e 1 r 1 l 1 r.
Switch to plan "2"2.
[3]
Go to Chop Suey:e 1 r 1 l 1 r.
[ Loop the required times, rotating the passengers at Chop Suey each time. ]
[a]
Go to The Underground:s 1 r 1 l.
Switch to plan "b"b if no one is waiting.
Pickup a passenger going to The Underground.
Go to Fueler Up:s.
Go to Chop Suey:n 3 r 1 l.
Pickup a passenger going to Chop Suey.
Switch to plan "a"a.
[b]
Go to Chop Suey:n 2 r 1 l.
[ Reverse the character order again. ]
[4]
Switch to plan "5"5 if no one is waiting.
Pickup a passenger going to Narrow Path Park.
Go to Narrow Path Park:n 1 l 1 r 1 l.
Go to Chop Suey:e 1 r 1 l 1 r.
Switch to plan "4"4.
[5]
Go to Narrow Path Park:n 1 l 1 r 1 l.
[ Concatenate the passengers at Narrow Path Park. ]
[c]
Switch to plan "d"d if no one is waiting.
Pickup a passenger going to KonKat's.
Go to KonKat's:e 1 r.
Pickup a passenger going to KonKat's.
Go to Narrow Path Park:n 2 l.
Switch to plan "c"c.
[ Convert to a number to remove leading zeros and then back to a string so the Post Office can handle it. ]
[d]
Go to KonKat's:e 1 r.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery:s.
Pickup a passenger going to The Babelfishery.
Go to KonKat's:n.
Go to The Babelfishery:s.
Pickup a passenger going to Post Office.
Go to Post Office:n 1 l 1 r.

Try it online! Try it online!

Taxi, 1698 bytes

Go to Post Office:w 1 l 1 r 1 l.Pickup a passenger going to Chop Suey.Pickup a passenger going to The Babelfishery.Go to The Babelfishery:s 1 l 1 r.Pickup a passenger going to Addition Alley.1 is waiting at Starchild Numerology.Go to Starchild Numerology:n 1 l 1 l 1 l 2 l. Pickup a passenger going to Addition Alley.Go to Addition Alley:w 1 r 3 r 1 r 1 r.Pickup a passenger going to The Underground.Go to Chop Suey:n 1 r 2 r.[1]Switch to plan "2" if no one is waiting.Pickup a passenger going to Narrow Path Park.Go to Narrow Path Park:n 1 l 1 r 1 l.Go to Chop Suey:e 1 r 1 l 1 r.Switch to plan "1".[2]Go to Narrow Path Park:n 1 l 1 r 1 l.Switch to plan "3" if no one is waiting.Pickup a passenger going to Chop Suey.Go to Chop Suey:e 1 r 1 l 1 r.Switch to plan "2".[3]Go to Chop Suey:e 1 r 1 l 1 r.[a]Go to The Underground:s 1 r 1 l.Switch to plan "b" if no one is waiting.Pickup a passenger going to The Underground.Go to Fueler Up:s.Go to Chop Suey:n 3 r 1 l.Pickup a passenger going to Chop Suey.Switch to plan "a".[b]Go to Chop Suey:n 2 r 1 l.[4]Switch to plan "5" if no one is waiting.Pickup a passenger going to Narrow Path Park.Go to Narrow Path Park:n 1 l 1 r 1 l.Go to Chop Suey:e 1 r 1 l 1 r.Switch to plan "4".[5]Go to Narrow Path Park:n 1 l 1 r 1 l.[c]Switch to plan "d" if no one is waiting.Pickup a passenger going to KonKat's.Go to KonKat's:e 1 r.Pickup a passenger going to KonKat's.Go to Narrow Path Park:n 2 l.Switch to plan "c".[d]Go to KonKat's:e 1 r.Pickup a passenger going to The Babelfishery.Go to The Babelfishery:s.Pickup a passenger going to The Babelfishery.Go to KonKat's:n.Go to The Babelfishery:s.Pickup a passenger going to Post Office.Go to Post Office:n 1 l 1 r.

Try it online!

[ Pick up the inputs, add 1 to the second, and chop the first into pieces. ]
Go to Post Office:w 1 l 1 r 1 l.
Pickup a passenger going to Chop Suey.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery:s 1 l 1 r.
Pickup a passenger going to Addition Alley.
1 is waiting at Starchild Numerology.
Go to Starchild Numerology:n 1 l 1 l 1 l 2 l. 
Pickup a passenger going to Addition Alley.
Go to Addition Alley:w 1 r 3 r 1 r 1 r.
Pickup a passenger going to The Underground.
Go to Chop Suey:n 1 r 2 r.
[ Reverse the order the charaters are stored in so we can right-shift instead of left-shift. ]
[1]
Switch to plan "2" if no one is waiting.
Pickup a passenger going to Narrow Path Park.
Go to Narrow Path Park:n 1 l 1 r 1 l.
Go to Chop Suey:e 1 r 1 l 1 r.
Switch to plan "1".
[2]
Go to Narrow Path Park:n 1 l 1 r 1 l.
Switch to plan "3" if no one is waiting.
Pickup a passenger going to Chop Suey.
Go to Chop Suey:e 1 r 1 l 1 r.
Switch to plan "2".
[3]
Go to Chop Suey:e 1 r 1 l 1 r.
[ Loop the required times, rotating the passengers at Chop Suey each time. ]
[a]
Go to The Underground:s 1 r 1 l.
Switch to plan "b" if no one is waiting.
Pickup a passenger going to The Underground.
Go to Fueler Up:s.
Go to Chop Suey:n 3 r 1 l.
Pickup a passenger going to Chop Suey.
Switch to plan "a".
[b]
Go to Chop Suey:n 2 r 1 l.
[ Reverse the character order again. ]
[4]
Switch to plan "5" if no one is waiting.
Pickup a passenger going to Narrow Path Park.
Go to Narrow Path Park:n 1 l 1 r 1 l.
Go to Chop Suey:e 1 r 1 l 1 r.
Switch to plan "4".
[5]
Go to Narrow Path Park:n 1 l 1 r 1 l.
[ Concatenate the passengers at Narrow Path Park. ]
[c]
Switch to plan "d" if no one is waiting.
Pickup a passenger going to KonKat's.
Go to KonKat's:e 1 r.
Pickup a passenger going to KonKat's.
Go to Narrow Path Park:n 2 l.
Switch to plan "c".
[ Convert to a number to remove leading zeros and then back to a string so the Post Office can handle it. ]
[d]
Go to KonKat's:e 1 r.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery:s.
Pickup a passenger going to The Babelfishery.
Go to KonKat's:n.
Go to The Babelfishery:s.
Pickup a passenger going to Post Office.
Go to Post Office:n 1 l 1 r.

Try it online!

[Taxi], (削除) 1698 (削除ここまで) 1678 bytes

No need to wrap single-byte plan names in quote marks. 0.6% byte reduction!

Go to Post Office:w 1 l 1 r 1 l.Pickup a passenger going to Chop Suey.Pickup a passenger going to The Babelfishery.Go to The Babelfishery:s 1 l 1 r.Pickup a passenger going to Addition Alley.1 is waiting at Starchild Numerology.Go to Starchild Numerology:n 1 l 1 l 1 l 2 l. Pickup a passenger going to Addition Alley.Go to Addition Alley:w 1 r 3 r 1 r 1 r.Pickup a passenger going to The Underground.Go to Chop Suey:n 1 r 2 r.[1]Switch to plan 2 if no one is waiting.Pickup a passenger going to Narrow Path Park.Go to Narrow Path Park:n 1 l 1 r 1 l.Go to Chop Suey:e 1 r 1 l 1 r.Switch to plan 1.[2]Go to Narrow Path Park:n 1 l 1 r 1 l.Switch to plan 3 if no one is waiting.Pickup a passenger going to Chop Suey.Go to Chop Suey:e 1 r 1 l 1 r.Switch to plan 2.[3]Go to Chop Suey:e 1 r 1 l 1 r.[a]Go to The Underground:s 1 r 1 l.Switch to plan b if no one is waiting.Pickup a passenger going to The Underground.Go to Fueler Up:s.Go to Chop Suey:n 3 r 1 l.Pickup a passenger going to Chop Suey.Switch to plan a.[b]Go to Chop Suey:n 2 r 1 l.[4]Switch to plan 5 if no one is waiting.Pickup a passenger going to Narrow Path Park.Go to Narrow Path Park:n 1 l 1 r 1 l.Go to Chop Suey:e 1 r 1 l 1 r.Switch to plan 4.[5]Go to Narrow Path Park:n 1 l 1 r 1 l.[c]Switch to plan d if no one is waiting.Pickup a passenger going to KonKat's.Go to KonKat's:e 1 r.Pickup a passenger going to KonKat's.Go to Narrow Path Park:n 2 l.Switch to plan c.[d]Go to KonKat's:e 1 r.Pickup a passenger going to The Babelfishery.Go to The Babelfishery:s.Pickup a passenger going to The Babelfishery.Go to KonKat's:n.Go to The Babelfishery:s.Pickup a passenger going to Post Office.Go to Post Office:n 1 l 1 r.

Try it online!

[ Pick up the inputs, add 1 to the second, and chop the first into pieces. ]
Go to Post Office:w 1 l 1 r 1 l.
Pickup a passenger going to Chop Suey.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery:s 1 l 1 r.
Pickup a passenger going to Addition Alley.
1 is waiting at Starchild Numerology.
Go to Starchild Numerology:n 1 l 1 l 1 l 2 l. 
Pickup a passenger going to Addition Alley.
Go to Addition Alley:w 1 r 3 r 1 r 1 r.
Pickup a passenger going to The Underground.
Go to Chop Suey:n 1 r 2 r.
[ Reverse the order the charaters are stored in so we can right-shift instead of left-shift. ]
[1]
Switch to plan 2 if no one is waiting.
Pickup a passenger going to Narrow Path Park.
Go to Narrow Path Park:n 1 l 1 r 1 l.
Go to Chop Suey:e 1 r 1 l 1 r.
Switch to plan 1.
[2]
Go to Narrow Path Park:n 1 l 1 r 1 l.
Switch to plan 3 if no one is waiting.
Pickup a passenger going to Chop Suey.
Go to Chop Suey:e 1 r 1 l 1 r.
Switch to plan 2.
[3]
Go to Chop Suey:e 1 r 1 l 1 r.
[ Loop the required times, rotating the passengers at Chop Suey each time. ]
[a]
Go to The Underground:s 1 r 1 l.
Switch to plan b if no one is waiting.
Pickup a passenger going to The Underground.
Go to Fueler Up:s.
Go to Chop Suey:n 3 r 1 l.
Pickup a passenger going to Chop Suey.
Switch to plan a.
[b]
Go to Chop Suey:n 2 r 1 l.
[ Reverse the character order again. ]
[4]
Switch to plan 5 if no one is waiting.
Pickup a passenger going to Narrow Path Park.
Go to Narrow Path Park:n 1 l 1 r 1 l.
Go to Chop Suey:e 1 r 1 l 1 r.
Switch to plan 4.
[5]
Go to Narrow Path Park:n 1 l 1 r 1 l.
[ Concatenate the passengers at Narrow Path Park. ]
[c]
Switch to plan d if no one is waiting.
Pickup a passenger going to KonKat's.
Go to KonKat's:e 1 r.
Pickup a passenger going to KonKat's.
Go to Narrow Path Park:n 2 l.
Switch to plan c.
[ Convert to a number to remove leading zeros and then back to a string so the Post Office can handle it. ]
[d]
Go to KonKat's:e 1 r.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery:s.
Pickup a passenger going to The Babelfishery.
Go to KonKat's:n.
Go to The Babelfishery:s.
Pickup a passenger going to Post Office.
Go to Post Office:n 1 l 1 r.

Try it online!

Source Link
Engineer Toast
  • 9.6k
  • 1
  • 25
  • 54

Taxi, 1698 bytes

Go to Post Office:w 1 l 1 r 1 l.Pickup a passenger going to Chop Suey.Pickup a passenger going to The Babelfishery.Go to The Babelfishery:s 1 l 1 r.Pickup a passenger going to Addition Alley.1 is waiting at Starchild Numerology.Go to Starchild Numerology:n 1 l 1 l 1 l 2 l. Pickup a passenger going to Addition Alley.Go to Addition Alley:w 1 r 3 r 1 r 1 r.Pickup a passenger going to The Underground.Go to Chop Suey:n 1 r 2 r.[1]Switch to plan "2" if no one is waiting.Pickup a passenger going to Narrow Path Park.Go to Narrow Path Park:n 1 l 1 r 1 l.Go to Chop Suey:e 1 r 1 l 1 r.Switch to plan "1".[2]Go to Narrow Path Park:n 1 l 1 r 1 l.Switch to plan "3" if no one is waiting.Pickup a passenger going to Chop Suey.Go to Chop Suey:e 1 r 1 l 1 r.Switch to plan "2".[3]Go to Chop Suey:e 1 r 1 l 1 r.[a]Go to The Underground:s 1 r 1 l.Switch to plan "b" if no one is waiting.Pickup a passenger going to The Underground.Go to Fueler Up:s.Go to Chop Suey:n 3 r 1 l.Pickup a passenger going to Chop Suey.Switch to plan "a".[b]Go to Chop Suey:n 2 r 1 l.[4]Switch to plan "5" if no one is waiting.Pickup a passenger going to Narrow Path Park.Go to Narrow Path Park:n 1 l 1 r 1 l.Go to Chop Suey:e 1 r 1 l 1 r.Switch to plan "4".[5]Go to Narrow Path Park:n 1 l 1 r 1 l.[c]Switch to plan "d" if no one is waiting.Pickup a passenger going to KonKat's.Go to KonKat's:e 1 r.Pickup a passenger going to KonKat's.Go to Narrow Path Park:n 2 l.Switch to plan "c".[d]Go to KonKat's:e 1 r.Pickup a passenger going to The Babelfishery.Go to The Babelfishery:s.Pickup a passenger going to The Babelfishery.Go to KonKat's:n.Go to The Babelfishery:s.Pickup a passenger going to Post Office.Go to Post Office:n 1 l 1 r.

Try it online!

I chose to get fired rather than sacrifice the bytes required to return to the garage at the end. I have checked both very long inputs and very long rotations and the net gain is positive so you never run out of gas.


Formatted for legibility and with comments:

[ Pick up the inputs, add 1 to the second, and chop the first into pieces. ]
Go to Post Office:w 1 l 1 r 1 l.
Pickup a passenger going to Chop Suey.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery:s 1 l 1 r.
Pickup a passenger going to Addition Alley.
1 is waiting at Starchild Numerology.
Go to Starchild Numerology:n 1 l 1 l 1 l 2 l. 
Pickup a passenger going to Addition Alley.
Go to Addition Alley:w 1 r 3 r 1 r 1 r.
Pickup a passenger going to The Underground.
Go to Chop Suey:n 1 r 2 r.
[ Reverse the order the charaters are stored in so we can right-shift instead of left-shift. ]
[1]
Switch to plan "2" if no one is waiting.
Pickup a passenger going to Narrow Path Park.
Go to Narrow Path Park:n 1 l 1 r 1 l.
Go to Chop Suey:e 1 r 1 l 1 r.
Switch to plan "1".
[2]
Go to Narrow Path Park:n 1 l 1 r 1 l.
Switch to plan "3" if no one is waiting.
Pickup a passenger going to Chop Suey.
Go to Chop Suey:e 1 r 1 l 1 r.
Switch to plan "2".
[3]
Go to Chop Suey:e 1 r 1 l 1 r.
[ Loop the required times, rotating the passengers at Chop Suey each time. ]
[a]
Go to The Underground:s 1 r 1 l.
Switch to plan "b" if no one is waiting.
Pickup a passenger going to The Underground.
Go to Fueler Up:s.
Go to Chop Suey:n 3 r 1 l.
Pickup a passenger going to Chop Suey.
Switch to plan "a".
[b]
Go to Chop Suey:n 2 r 1 l.
[ Reverse the character order again. ]
[4]
Switch to plan "5" if no one is waiting.
Pickup a passenger going to Narrow Path Park.
Go to Narrow Path Park:n 1 l 1 r 1 l.
Go to Chop Suey:e 1 r 1 l 1 r.
Switch to plan "4".
[5]
Go to Narrow Path Park:n 1 l 1 r 1 l.
[ Concatenate the passengers at Narrow Path Park. ]
[c]
Switch to plan "d" if no one is waiting.
Pickup a passenger going to KonKat's.
Go to KonKat's:e 1 r.
Pickup a passenger going to KonKat's.
Go to Narrow Path Park:n 2 l.
Switch to plan "c".
[ Convert to a number to remove leading zeros and then back to a string so the Post Office can handle it. ]
[d]
Go to KonKat's:e 1 r.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery:s.
Pickup a passenger going to The Babelfishery.
Go to KonKat's:n.
Go to The Babelfishery:s.
Pickup a passenger going to Post Office.
Go to Post Office:n 1 l 1 r.

Try it online!

AltStyle によって変換されたページ (->オリジナル) /