Skip to main content
deleted 619 characters in body
Source Link
user100947
user100947

Bash, 117120 71 bytes

for i ino=(. $1;do
case=0 $[`wc++ -c<<<$i`/11]- in*=2 1)x=0;;2)x=$[x+1];;3)x=$[x-1];;4)x=$[x*2];;5)x=$[x/2];;6=2)echo $x;;esac
done

Try it online!

Bash, 120 bytes

for i in $1;doi;do
y=("" 0 $[x+1] $[x-1] $[x*2] $[x/2] $x)
q=$[`wc -c<<<$i`(x${o[n=${#i}/11]
x=${y[q]}
if [ $q = ,n-6 ];then echo))||echo $x;fi$x
done

Try it online!Try it online!

Credits

  • Saved 4 bytes from both answers thanks to @Neil
  • Saved 49 bytes thanks to @DigitalTrauma

Bash, 117 bytes

for i in $1;do
case $[`wc -c<<<$i`/11] in 1)x=0;;2)x=$[x+1];;3)x=$[x-1];;4)x=$[x*2];;5)x=$[x/2];;6)echo $x;;esac
done

Try it online!

Bash, 120 bytes

for i in $1;do
y=("" 0 $[x+1] $[x-1] $[x*2] $[x/2] $x)
q=$[`wc -c<<<$i`/11]
x=${y[q]}
if [ $q = 6 ];then echo $x;fi
done

Try it online!

Credits

  • Saved 4 bytes from both answers thanks to @Neil

Bash, 120 71 bytes

o=(. =0 ++ -- *=2 /=2)
for i;do
((x${o[n=${#i}/11]},n-6))||echo $x
done

Try it online!

Credits

  • Saved 4 bytes from both answers thanks to @Neil
  • Saved 49 bytes thanks to @DigitalTrauma
added 42 characters in body
Source Link
user100947
user100947

Bash, 121117 bytes

x=0
for i in $1;do
case $[`wc -c<<<$i`/11] in 1)x=0;;2)x=$[x+1];;3)x=$[x-1];;4)x=$[x*2];;5)x=$[x/2];;6)echo $x;;esac
done

Try it online!Try it online!

Bash, 124120 bytes

x=0
for i in $1;do
y=("" 0 $[x+1] $[x-1] $[x*2] $[x/2] $x)
q=$[`wc -c<<<$i`/11]
x=${y[q]}
if [ $q = 6 ];then echo $x;fi
done

Try it online!Try it online!

Credits

  • Saved 4 bytes from both answers thanks to @Neil

Bash, 121 bytes

x=0
for i in $1;do
case $[`wc -c<<<$i`/11] in 1)x=0;;2)x=$[x+1];;3)x=$[x-1];;4)x=$[x*2];;5)x=$[x/2];;6)echo $x;;esac
done

Try it online!

Bash, 124 bytes

x=0
for i in $1;do
y=("" 0 $[x+1] $[x-1] $[x*2] $[x/2] $x)
q=$[`wc -c<<<$i`/11]
x=${y[q]}
if [ $q = 6 ];then echo $x;fi
done

Try it online!

Bash, 117 bytes

for i in $1;do
case $[`wc -c<<<$i`/11] in 1)x=0;;2)x=$[x+1];;3)x=$[x-1];;4)x=$[x*2];;5)x=$[x/2];;6)echo $x;;esac
done

Try it online!

Bash, 120 bytes

for i in $1;do
y=("" 0 $[x+1] $[x-1] $[x*2] $[x/2] $x)
q=$[`wc -c<<<$i`/11]
x=${y[q]}
if [ $q = 6 ];then echo $x;fi
done

Try it online!

Credits

  • Saved 4 bytes from both answers thanks to @Neil
added 1 character in body
Source Link
user100947
user100947

Bash, 120121 bytes

x=0
for i in $1;do
case $[`wc -c<<<$i`%6]c<<<$i`/11] in 61)x=0;;5x=0;;2)x=$[x+1];;4x=$[x+1];;3)x=$[x-1];;31];;4)x=$[x*2];;2x=$[x*2];;5)x=$[x/2];;12];;6)echo $x;;esac
done

Try it online!Try it online!

Bash, 124 bytes

x=0
for i in $1;do
y=("" 0 $[x+1] $[x-1] $[x*2] $[x/2] $x)
q=$[`wc -c<<<$i`/11]
x=${y[q]}
if [ $q = 6 ];then echo $x;fi
done

Try it online!

Bash, 120 bytes

x=0
for i in $1;do
case $[`wc -c<<<$i`%6] in 6)x=0;;5)x=$[x+1];;4)x=$[x-1];;3)x=$[x*2];;2)x=$[x/2];;1)echo $x;;esac
done

Try it online!

Bash, 121 bytes

x=0
for i in $1;do
case $[`wc -c<<<$i`/11] in 1)x=0;;2)x=$[x+1];;3)x=$[x-1];;4)x=$[x*2];;5)x=$[x/2];;6)echo $x;;esac
done

Try it online!

Bash, 124 bytes

x=0
for i in $1;do
y=("" 0 $[x+1] $[x-1] $[x*2] $[x/2] $x)
q=$[`wc -c<<<$i`/11]
x=${y[q]}
if [ $q = 6 ];then echo $x;fi
done

Try it online!

Source Link
user100947
user100947
Loading