Skip to main content
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

C, 35 bytes

f(char*s){while(35^*s++);return*s;}

Same idea as PragmaticProgrammer's answerPragmaticProgrammer's answer: find the first #, and output what comes after it -- # for "right", and <space> for "left".

C (loophole), 16 bytes

According to the test cases, it looks like the left road is always exactly one space from the left margin. So...

#define f(s)2[s]

C, 35 bytes

f(char*s){while(35^*s++);return*s;}

Same idea as PragmaticProgrammer's answer: find the first #, and output what comes after it -- # for "right", and <space> for "left".

C (loophole), 16 bytes

According to the test cases, it looks like the left road is always exactly one space from the left margin. So...

#define f(s)2[s]

C, 35 bytes

f(char*s){while(35^*s++);return*s;}

Same idea as PragmaticProgrammer's answer: find the first #, and output what comes after it -- # for "right", and <space> for "left".

C (loophole), 16 bytes

According to the test cases, it looks like the left road is always exactly one space from the left margin. So...

#define f(s)2[s]
Source Link
Quentin
  • 1.2k
  • 7
  • 15

C, 35 bytes

f(char*s){while(35^*s++);return*s;}

Same idea as PragmaticProgrammer's answer: find the first #, and output what comes after it -- # for "right", and <space> for "left".

C (loophole), 16 bytes

According to the test cases, it looks like the left road is always exactly one space from the left margin. So...

#define f(s)2[s]