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

added 64 characters in body
Source Link
Digital Trauma
  • 73.7k
  • 10
  • 116
  • 268

Bash + GNU utilities, 70

date -f- +%u<<<"1ドル/1+1month-1day
1ドル/1"|dc -e??sad8*la-55-rla+8-d*64*+p

Input is formatted as YYYY/MM.

Output is numeric, as follows:

  • less than 0: centrally symmetric
  • exactly 0: symmetric
  • greater than 0: asymmetric

I assume this output format is acceptable for this question.

Try it online!

Bash + GNU utilities, 70

date -f- +%u<<<"1ドル/1+1month-1day
1ドル/1"|dc -e??sad8*la-55-rla+8-d*64*+p

Input is formatted as YYYY/MM.

Output is numeric, as follows:

  • less than 0: centrally symmetric
  • exactly 0: symmetric
  • greater than 0: asymmetric

Try it online!

Bash + GNU utilities, 70

date -f- +%u<<<"1ドル/1+1month-1day
1ドル/1"|dc -e??sad8*la-55-rla+8-d*64*+p

Input is formatted as YYYY/MM.

Output is numeric, as follows:

  • less than 0: centrally symmetric
  • exactly 0: symmetric
  • greater than 0: asymmetric

I assume this output format is acceptable for this question.

Try it online!

deleted 9 characters in body
Source Link
Digital Trauma
  • 73.7k
  • 10
  • 116
  • 268

Bash + coreutils GNU utilities, 8070

d()(date -d1ドル +%u)
a=`d 1ドル/1`
b=`df- 1ドル+%u<<<"1ドル/1+1month-1day`1day
echo1ドル/1"|dc $[(a-1||be??sad8*la-7)+(a+b!=8)]55-rla+8-d*64*+p

Input is formatted as YYYY/MM.

Output is numeric, as follows:

  • less than 0: centrally symmetric
  • 1exactly 0: centrally symmetric
  • 2greater than 0: asymmetric

Try it online! Try it online!

Bash + coreutils, 80

d()(date -d1ドル +%u)
a=`d 1ドル/1`
b=`d 1ドル/1+1month-1day`
echo $[(a-1||b-7)+(a+b!=8)]

Input is formatted as YYYY/MM.

Output is numeric, as follows:

  • 0: symmetric
  • 1: centrally symmetric
  • 2: asymmetric

Try it online!

Bash + GNU utilities, 70

date -f- +%u<<<"1ドル/1+1month-1day
1ドル/1"|dc -e??sad8*la-55-rla+8-d*64*+p

Input is formatted as YYYY/MM.

Output is numeric, as follows:

  • less than 0: centrally symmetric
  • exactly 0: symmetric
  • greater than 0: asymmetric

Try it online!

Source Link
Digital Trauma
  • 73.7k
  • 10
  • 116
  • 268

Bash + coreutils, 80

d()(date -d1ドル +%u)
a=`d 1ドル/1`
b=`d 1ドル/1+1month-1day`
echo $[(a-1||b-7)+(a+b!=8)]

Input is formatted as YYYY/MM.

Output is numeric, as follows:

  • 0: symmetric
  • 1: centrally symmetric
  • 2: asymmetric

Try it online!

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