Skip to main content
Commonmark migration
Source Link

#Retina, 144 bytes

Retina, 144 bytes

Input and output are in unary.

The 2nd-to-last line contains a space, and the two middle lines and the last line are empty.

{`(\b|)11+$
$&¶$&
m-1=`^(?=^(11)*(1?)).*$
$&,$2
(1+),1$
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,

m-1=`^
1:
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1
 

Try it online

###Explanation

Explanation

{`(\b|)11+$                 # Loop, Duplicate last line
$&¶$&
m-1=`^(?=^(11)*(1?)).*$     # Append ,n%2 to that line (number modulo 2)
$&,$2
(1+),1$                     # Cube that number if odd
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,                         # (Last stage of cubing number)

m-1=`^                      # Integer square root of that number, 
1:                          #   borrowed and modified from another user's answer
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1
 

Integer square root in Retina, by Digital Trauma

#Retina, 144 bytes

Input and output are in unary.

The 2nd-to-last line contains a space, and the two middle lines and the last line are empty.

{`(\b|)11+$
$&¶$&
m-1=`^(?=^(11)*(1?)).*$
$&,$2
(1+),1$
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,

m-1=`^
1:
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1
 

Try it online

###Explanation

{`(\b|)11+$                 # Loop, Duplicate last line
$&¶$&
m-1=`^(?=^(11)*(1?)).*$     # Append ,n%2 to that line (number modulo 2)
$&,$2
(1+),1$                     # Cube that number if odd
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,                         # (Last stage of cubing number)

m-1=`^                      # Integer square root of that number, 
1:                          #   borrowed and modified from another user's answer
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1
 

Integer square root in Retina, by Digital Trauma

Retina, 144 bytes

Input and output are in unary.

The 2nd-to-last line contains a space, and the two middle lines and the last line are empty.

{`(\b|)11+$
$&¶$&
m-1=`^(?=^(11)*(1?)).*$
$&,$2
(1+),1$
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,

m-1=`^
1:
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1
 

Try it online

Explanation

{`(\b|)11+$                 # Loop, Duplicate last line
$&¶$&
m-1=`^(?=^(11)*(1?)).*$     # Append ,n%2 to that line (number modulo 2)
$&,$2
(1+),1$                     # Cube that number if odd
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,                         # (Last stage of cubing number)

m-1=`^                      # Integer square root of that number, 
1:                          #   borrowed and modified from another user's answer
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1
 

Integer square root in Retina, by Digital Trauma

replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

#Retina, 144 bytes

Input and output are in unary.

The 2nd-to-last line contains a space, and the two middle lines and the last line are empty.

{`(\b|)11+$
$&¶$&
m-1=`^(?=^(11)*(1?)).*$
$&,$2
(1+),1$
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,

m-1=`^
1:
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1
 

Try it online

###Explanation

{`(\b|)11+$                 # Loop, Duplicate last line
$&¶$&
m-1=`^(?=^(11)*(1?)).*$     # Append ,n%2 to that line (number modulo 2)
$&,$2
(1+),1$                     # Cube that number if odd
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,                         # (Last stage of cubing number)

m-1=`^                      # Integer square root of that number, 
1:                          #   borrowed and modified from another user's answer
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1
 

Integer square root in RetinaInteger square root in Retina, by Digital Trauma

#Retina, 144 bytes

Input and output are in unary.

The 2nd-to-last line contains a space, and the two middle lines and the last line are empty.

{`(\b|)11+$
$&¶$&
m-1=`^(?=^(11)*(1?)).*$
$&,$2
(1+),1$
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,

m-1=`^
1:
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1
 

Try it online

###Explanation

{`(\b|)11+$                 # Loop, Duplicate last line
$&¶$&
m-1=`^(?=^(11)*(1?)).*$     # Append ,n%2 to that line (number modulo 2)
$&,$2
(1+),1$                     # Cube that number if odd
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,                         # (Last stage of cubing number)

m-1=`^                      # Integer square root of that number, 
1:                          #   borrowed and modified from another user's answer
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1
 

Integer square root in Retina, by Digital Trauma

#Retina, 144 bytes

Input and output are in unary.

The 2nd-to-last line contains a space, and the two middle lines and the last line are empty.

{`(\b|)11+$
$&¶$&
m-1=`^(?=^(11)*(1?)).*$
$&,$2
(1+),1$
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,

m-1=`^
1:
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1
 

Try it online

###Explanation

{`(\b|)11+$                 # Loop, Duplicate last line
$&¶$&
m-1=`^(?=^(11)*(1?)).*$     # Append ,n%2 to that line (number modulo 2)
$&,$2
(1+),1$                     # Cube that number if odd
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,                         # (Last stage of cubing number)

m-1=`^                      # Integer square root of that number, 
1:                          #   borrowed and modified from another user's answer
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1
 

Integer square root in Retina, by Digital Trauma

added 48 characters in body
Source Link
mbomb007
  • 23.5k
  • 7
  • 63
  • 135

#Retina, 144 bytes

Input and output are in unary.

The 2nd-to-last line contains a space, and the two middle lines and the last line are empty.

{`(\b|)11+$
$&¶$&
m-1=`^(?=^(11)*(1?)).*$
$&,$2
(1+),1$
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,

m-1=`^
1:
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1
 

Try it online

###Explanation

{`(\b|)11+$                  # Loop, Duplicate last line
$&¶$&
m-1=`^(?=^(11)*(1?)).*$         # Append ,n%2 to that line (number modulo 2)
$&,$2
(1+),1$                     # Cube that number if odd
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,                         # (Last stage of cubing number)

m-1=`^                      # Integer square root of that number, 
1:                          #   borrowed and modified from another user's answer
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1
 

Integer square root in Retina, by Digital Trauma

#Retina, 144 bytes

Input and output are in unary.

The 2nd-to-last line contains a space, and the two middle lines and the last line are empty.

{`(\b|)11+$
$&¶$&
m-1=`^(?=^(11)*(1?)).*$
$&,$2
(1+),1$
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,

m-1=`^
1:
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1
 

Try it online

###Explanation

{`(\b|)11+$                  # Duplicate last line
$&¶$&
m-1=`^(?=^(11)*(1?)).*$         # Append ,n%2 to that line
$&,$2
(1+),1$
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,

m-1=`^
1:
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1
 

#Retina, 144 bytes

Input and output are in unary.

The 2nd-to-last line contains a space, and the two middle lines and the last line are empty.

{`(\b|)11+$
$&¶$&
m-1=`^(?=^(11)*(1?)).*$
$&,$2
(1+),1$
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,

m-1=`^
1:
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1
 

Try it online

###Explanation

{`(\b|)11+$                 # Loop, Duplicate last line
$&¶$&
m-1=`^(?=^(11)*(1?)).*$     # Append ,n%2 to that line (number modulo 2)
$&,$2
(1+),1$                     # Cube that number if odd
$1;,
1(?=1*;)
$%_
1+;
$%_
;|,                         # (Last stage of cubing number)

m-1=`^                      # Integer square root of that number, 
1:                          #   borrowed and modified from another user's answer
+`(1+):(11\1)
1 $2:
1+:$|:1+

-1=`(1+\b)
$#1
 

Integer square root in Retina, by Digital Trauma

Post Undeleted by mbomb007
added 48 characters in body
Source Link
mbomb007
  • 23.5k
  • 7
  • 63
  • 135
Loading
Post Deleted by mbomb007
Source Link
mbomb007
  • 23.5k
  • 7
  • 63
  • 135
Loading