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

Commonmark migration
Source Link

#05AB1E , (削除) 38 (削除ここまで)(削除) 37 (削除ここまで)(削除) 32 (削除ここまで)(削除) 31 (削除ここまで) 30 bytes

05AB1E , (削除) 38 (削除ここまで)(削除) 37 (削除ここまで)(削除) 32 (削除ここまで)(削除) 31 (削除ここまで) 30 bytes

#05AB1E , (削除) 38 (削除ここまで)(削除) 37 (削除ここまで)(削除) 32 (削除ここまで)(削除) 31 (削除ここまで) 30 bytes

05AB1E , (削除) 38 (削除ここまで)(削除) 37 (削除ここまで)(削除) 32 (削除ここまで)(削除) 31 (削除ここまで) 30 bytes

added 249 characters in body
Source Link
Kevin Cruijssen
  • 136.2k
  • 14
  • 154
  • 394

#05AB1E, (削除) 38 (削除ここまで) (削除) 37 (削除ここまで) (削除) 32 (削除ここまで) 31 (削除) 31 (削除ここまで) 30 bytes

žeD2‹žf12QP'@ú€...[ÿ]Dg25Ÿ«¦žeD2‹žf‹P'@ú€...[ÿ]Dg25Ÿ«¦.r5ô»

-56 bytes thanks to @Grimmy.

Try it online Try it online or try it online with own specified month / day try it online with own specified month / day.

že # Push the current day
 D # Duplicate it
 2‹ # Check if it's smaller than 26
 žf # Push the current month
 12QÂ  # CheckBifurcate it (short for Duplicate & Reverse copy)
 ‹ # And check if it'sthis equalis tosmaller than the month itself
  # (this will check 1-9 < 1-9 (falsey); 10 < 01 (falsey); 11 < 11 (falsey);
 # and 12 < 21 (thustruthy) - so this will only be truthy for 12 / December)
 P # Take the product of the day and both checks,
 # which result in either the day, or 0 if either check was falsey
'@ '# Push character "@"
 ú # Pad it with the earlier number amount of spaces
 € # Map over each of these characters:
 ...[ÿ] # Push string "[ÿ]", where the `ÿ` is automatically filled with the character
Dg # Duplicate the list, and pop and push its length
 25Ÿ # Create a list in the range [length, 25]
 « # And merge it to the earlier created list
¦ # Then remove the first item (either a "[ ]", or the "[@]" if the checks
 # were falsey)
 .r # Randomly shuffle the list
 5ô # Split the list into sublists of size 5
 » # Join each inner list by spaces, and these strings by newlines
 # (after which the result is output implicitly)

#05AB1E, (削除) 38 (削除ここまで) (削除) 37 (削除ここまで) (削除) 32 (削除ここまで) 31 bytes

žeD2‹žf12QP'@ú€...[ÿ]Dg25Ÿ«¦.r5ô»

-5 bytes thanks to @Grimmy.

Try it online or try it online with own specified month / day.

že # Push the current day
 D # Duplicate it
 2‹ # Check if it's smaller than 26
 žf # Push the current month
 12Q # Check if it's equal to 12 (thus December)
 P # Take the product of the day and both checks,
 # which result in either the day, or 0 if either check was falsey
'@ '# Push character "@"
 ú # Pad it with the earlier number amount of spaces
 € # Map over each of these characters:
 ...[ÿ] # Push string "[ÿ]", where the `ÿ` is automatically filled with the character
Dg # Duplicate the list, and pop and push its length
 25Ÿ # Create a list in the range [length, 25]
 « # And merge it to the earlier created list
¦ # Then remove the first item (either a "[ ]", or the "[@]" if the checks
 # were falsey)
 .r # Randomly shuffle the list
 5ô # Split the list into sublists of size 5
 » # Join each inner list by spaces, and these strings by newlines
 # (after which the result is output implicitly)

#05AB1E, (削除) 38 (削除ここまで) (削除) 37 (削除ここまで) (削除) 32 (削除ここまで) (削除) 31 (削除ここまで) 30 bytes

žeD2‹žf‹P'@ú€...[ÿ]Dg25Ÿ«¦.r5ô»

-6 bytes thanks to @Grimmy.

Try it online or try it online with own specified month / day.

že # Push the current day
 D # Duplicate it
 2‹ # Check if it's smaller than 26
 žf # Push the current month
 Â  # Bifurcate it (short for Duplicate & Reverse copy)
 ‹ # And check if this is smaller than the month itself
  # (this will check 1-9 < 1-9 (falsey); 10 < 01 (falsey); 11 < 11 (falsey);
 # and 12 < 21 (truthy) - so this will only be truthy for 12 / December)
 P # Take the product of the day and both checks,
 # which result in either the day, or 0 if either check was falsey
'@ '# Push character "@"
 ú # Pad it with the earlier number amount of spaces
 € # Map over each of these characters:
 ...[ÿ] # Push string "[ÿ]", where the `ÿ` is automatically filled with the character
Dg # Duplicate the list, and pop and push its length
 25Ÿ # Create a list in the range [length, 25]
 « # And merge it to the earlier created list
¦ # Then remove the first item (either a "[ ]", or the "[@]" if the checks
 # were falsey)
 .r # Randomly shuffle the list
 5ô # Split the list into sublists of size 5
 » # Join each inner list by spaces, and these strings by newlines
 # (after which the result is output implicitly)
deleted 178 characters in body
Source Link
Kevin Cruijssen
  • 136.2k
  • 14
  • 154
  • 394

#05AB1E, (削除) 38 (削除ここまで) 37(削除) 37 (削除ここまで)(削除) 32 (削除ここまで) 31 bytes

25L.ržf12Qže2‹*iε...[ ]...[@])yžežeD2‹žf12QP'@ú€...[ÿ]Dg25Ÿ«¦.SÌè]5ô»r5ô»

Try it online -5 bytes thanks to @Grimmy.

Try it online or try it online with own specified month / day try it online with own specified month / day.

25L že # Push a list in the rangecurrent [1,25]day
 .r  D # Duplicate it
 # Randomly shuffle2‹ it
 žf # Check if it's smaller than 26
 žf # Push the current month
 12Q # Check if it's equal to 12 (thus December)
 že  P # Take the #product Pushof the current day and both checks,
 2‹ # which result in either the day, #or Check0 if it'seither smallercheck thanwas 26falsey
'@ *i '# Push character "@"
 ú # And if both are truthy:
  # Pad it with the earlier number amount εof spaces
  # Map each valueover ineach theof listthese tocharacters:
 ...[@] ...[ÿ] # Push string "[@]"
 ...[ ] "[ÿ]", where the #`ÿ` is automatically Pushfilled stringwith "[the ]"character
Dg )  # Wrap all three intoDuplicate athe list: [value,"[@]","[ ]"]
  y # and pop Pushand thepush valueits `y`length
 25Ÿ že # Create a Pushlist in the currentrange day[length, again25]
 « .S # Compare the two values (-1 ifAnd y<day;merge 0it ifto y==day;the 1earlier ifcreated y>day)list
¦ Ì # Then Increaseremove itthe byfirst 2item (1either ifa y<day;"[ 2]", ifor y==day;the 3"[@]" if y>day)
  the checks
 è # Use it to (0-based) index into the list (with wraparound,
  #  so the 3 results in the firstwere itemfalsey)
 ]  .r # Close theRandomly mapshuffle andthe if-statementlist
 5ô # Split the list into sublists of size 5
 » # Join each inner list by spaces, and these strings by newlines
 # (after which the result is output implicitly)

#05AB1E, (削除) 38 (削除ここまで) 37 bytes

25L.ržf12Qže2‹*iε...[ ]...[@])yže.SÌè]5ô»

Try it online or try it online with own specified month / day.

25L  # Push a list in the range [1,25]
 .r  # Randomly shuffle it
 žf # Push the current month
 12Q # Check if it's equal to 12 (thus December)
 že  # Push the current day 2‹ # Check if it's smaller than 26
 *i # And if both are truthy:
  ε # Map each value in the list to:
 ...[@] # Push string "[@]"
 ...[ ]  # Push string "[ ]"
 )  # Wrap all three into a list: [value,"[@]","[ ]"]
  y #  Push the value `y`
 že # Push the current day again
 .S # Compare the two values (-1 if y<day; 0 if y==day; 1 if y>day)
 Ì # Increase it by 2 (1 if y<day; 2 if y==day; 3 if y>day)
  è # Use it to (0-based) index into the list (with wraparound,
  #  so the 3 results in the first item)
 ]  # Close the map and if-statement
 5ô # Split the list into sublists of size 5
 » # Join each inner list by spaces, and these strings by newlines
 # (after which the result is output implicitly)

#05AB1E, (削除) 38 (削除ここまで) (削除) 37 (削除ここまで)(削除) 32 (削除ここまで) 31 bytes

žeD2‹žf12QP'@ú€...[ÿ]Dg25Ÿ«¦.r5ô»

-5 bytes thanks to @Grimmy.

Try it online or try it online with own specified month / day.

že # Push the current day
 D # Duplicate it
 2‹ # Check if it's smaller than 26
 žf # Push the current month
 12Q # Check if it's equal to 12 (thus December)
 P # Take the product of the day and both checks,
 # which result in either the day, or 0 if either check was falsey
'@ '# Push character "@"
 ú # Pad it with the earlier number amount of spaces
  # Map over each of these characters:
 ...[ÿ] # Push string "[ÿ]", where the `ÿ` is automatically filled with the character
Dg # Duplicate the list, and pop and push its length
 25Ÿ # Create a list in the range [length, 25]
 « # And merge it to the earlier created list
¦ # Then remove the first item (either a "[ ]", or the "[@]" if the checks
 # were falsey)
 .r # Randomly shuffle the list
 5ô # Split the list into sublists of size 5
 » # Join each inner list by spaces, and these strings by newlines
 # (after which the result is output implicitly)
Fixed December 26th-31st
Source Link
Kevin Cruijssen
  • 136.2k
  • 14
  • 154
  • 394
Loading
added 18 characters in body
Source Link
Kevin Cruijssen
  • 136.2k
  • 14
  • 154
  • 394
Loading
Source Link
Kevin Cruijssen
  • 136.2k
  • 14
  • 154
  • 394
Loading

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