Skip to main content
Code Golf

Return to Answer

Commonmark migration
Source Link

#Stax , (削除) 26 (削除ここまで)(削除) 24 (削除ここまで) 18 bytes

Stax , (削除) 26 (削除ここまで)(削除) 24 (削除ここまで) 18 bytes

:u{m*_{y#m:u_hy#h*

Try it online!

(削除) Shortest solution so far that only uses printable ASCIIs (削除ここまで) Beaten by MATL.

Guess I was approaching the problem the wrong way. Repeating a working block is neither golfy nor interesting. Now at least it looks better ...

Explanation

:u{m* produces some garbage that does not affect the output.

_{y#m:u_hy#h*
_{y#m map each character to its number of occurences in the string
 :u all counts are equal (result 1)
 _hy# get the count of appearance for the first character
 h halve it and take the floor, so that 1 becomes 0(result 2)
 * multiply the two results

#Stax , (削除) 26 (削除ここまで)(削除) 24 (削除ここまで) 18 bytes

:u{m*_{y#m:u_hy#h*

Try it online!

(削除) Shortest solution so far that only uses printable ASCIIs (削除ここまで) Beaten by MATL.

Guess I was approaching the problem the wrong way. Repeating a working block is neither golfy nor interesting. Now at least it looks better ...

Explanation

:u{m* produces some garbage that does not affect the output.

_{y#m:u_hy#h*
_{y#m map each character to its number of occurences in the string
 :u all counts are equal (result 1)
 _hy# get the count of appearance for the first character
 h halve it and take the floor, so that 1 becomes 0(result 2)
 * multiply the two results

Stax , (削除) 26 (削除ここまで)(削除) 24 (削除ここまで) 18 bytes

:u{m*_{y#m:u_hy#h*

Try it online!

(削除) Shortest solution so far that only uses printable ASCIIs (削除ここまで) Beaten by MATL.

Guess I was approaching the problem the wrong way. Repeating a working block is neither golfy nor interesting. Now at least it looks better ...

Explanation

:u{m* produces some garbage that does not affect the output.

_{y#m:u_hy#h*
_{y#m map each character to its number of occurences in the string
 :u all counts are equal (result 1)
 _hy# get the count of appearance for the first character
 h halve it and take the floor, so that 1 becomes 0(result 2)
 * multiply the two results
added 13 characters in body
Source Link
Weijun Zhou
  • 3.7k
  • 15
  • 42

#Stax, (削除) 26 (削除ここまで) (削除) 24 (削除ここまで) 18 bytes

:u{m*_{y#m:u_hy#h*

Try it online!

Shortest solution so far that only uses printable ASCIIs (or not?)(削除) Shortest solution so far that only uses printable ASCIIs (削除ここまで) Beaten by MATL.

Guess I was approaching the problem the wrong way. Repeating a working block is neither golfy nor interesting. Now at least it looks better ...

Explanation

:u{m* produces some garbage that does not affect the output.

_{y#m:u_hy#h*
_{y#m map each character to its number of occurences in the string
 :u all counts are equal (result 1)
 _hy# get the count of appearance for the first character
 h halve it and take the floor, so that 1 becomes 0(result 2)
 * multiply the two results

#Stax, (削除) 26 (削除ここまで) (削除) 24 (削除ここまで) 18 bytes

:u{m*_{y#m:u_hy#h*

Try it online!

Shortest solution so far that only uses printable ASCIIs (or not?)

Guess I was approaching the problem the wrong way. Repeating a working block is neither golfy nor interesting. Now at least it looks better ...

Explanation

:u{m* produces some garbage that does not affect the output.

_{y#m:u_hy#h*
_{y#m map each character to its number of occurences in the string
 :u all counts are equal (result 1)
 _hy# get the count of appearance for the first character
 h halve it and take the floor, so that 1 becomes 0(result 2)
 * multiply the two results

#Stax, (削除) 26 (削除ここまで) (削除) 24 (削除ここまで) 18 bytes

:u{m*_{y#m:u_hy#h*

Try it online!

(削除) Shortest solution so far that only uses printable ASCIIs (削除ここまで) Beaten by MATL.

Guess I was approaching the problem the wrong way. Repeating a working block is neither golfy nor interesting. Now at least it looks better ...

Explanation

:u{m* produces some garbage that does not affect the output.

_{y#m:u_hy#h*
_{y#m map each character to its number of occurences in the string
 :u all counts are equal (result 1)
 _hy# get the count of appearance for the first character
 h halve it and take the floor, so that 1 becomes 0(result 2)
 * multiply the two results
added 1 character in body
Source Link
Weijun Zhou
  • 3.7k
  • 15
  • 42

#Stax, (削除) 26 (削除ここまで) (削除) 24 (削除ここまで) 18 bytes

:u{m*_{y#m:u_hy#h*

Try it online!

Shortest solution so far that only uses printable ASCIIs (or not?)

Guess I was approaching the problem the wrong way. Repeating a working block is neither golfy nor interesting. Now at least it looks better ...

Explanation

:u{m* produces some garbage that does not affect the output.

_{y#m:u_hy#h*
_{y#m map each character to its number of occurences in the string
 :u all counts are equal (result 1)
 _hy# get the count of appearance for the first character
 h halfhalve it and take the floor, so that 1 becomes 0(result 2)
 * multiply the two results

#Stax, (削除) 26 (削除ここまで) (削除) 24 (削除ここまで) 18 bytes

:u{m*_{y#m:u_hy#h*

Try it online!

Shortest solution so far that only uses printable ASCIIs (or not?)

Guess I was approaching the problem the wrong way. Repeating a working block is neither golfy nor interesting. Now at least it looks better ...

Explanation

:u{m* produces some garbage that does not affect the output.

_{y#m:u_hy#h*
_{y#m map each character to its number of occurences in the string
 :u all counts are equal (result 1)
 _hy# get the count of appearance for the first character
 h half it and take the floor, so that 1 becomes 0(result 2)
 * multiply the two results

#Stax, (削除) 26 (削除ここまで) (削除) 24 (削除ここまで) 18 bytes

:u{m*_{y#m:u_hy#h*

Try it online!

Shortest solution so far that only uses printable ASCIIs (or not?)

Guess I was approaching the problem the wrong way. Repeating a working block is neither golfy nor interesting. Now at least it looks better ...

Explanation

:u{m* produces some garbage that does not affect the output.

_{y#m:u_hy#h*
_{y#m map each character to its number of occurences in the string
 :u all counts are equal (result 1)
 _hy# get the count of appearance for the first character
 h halve it and take the floor, so that 1 becomes 0(result 2)
 * multiply the two results
added 70 characters in body
Source Link
Weijun Zhou
  • 3.7k
  • 15
  • 42
Loading
added 101 characters in body
Source Link
Weijun Zhou
  • 3.7k
  • 15
  • 42
Loading
added 237 characters in body
Source Link
Weijun Zhou
  • 3.7k
  • 15
  • 42
Loading
Source Link
Weijun Zhou
  • 3.7k
  • 15
  • 42
Loading

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