![]() XX XXXXX XXXXXXXXXXXX VV XXXXXXXXXXXX XXXXX XX XXXXXXXXXXXXXXXXXXXX VVVV XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX VVVVVV XXXXXXXXXXXXXXXXXXXXXX XXXXXX XXXXXXXXXXXXXX VVVVVVVV XXXXXXXXXXXXXX XXXXXX XXXXXXXXXXX XXXX VVVVVVVVVVVV XXXX XXXXXXXXXXX XXXXXXXXXXXXXXXX XXXVVVVVVVVVVVVVVXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXVVVVVVVVVVVVVVVVXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX VVVVVVVVVVVVVVVVVV XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX VVVVVVVVVVVVVVVVVVVV XXXXXXXXXXXXXXXX XXXXXXXXXXXXX VVVVVVVVVVVVVVVVVVVVVV XXXXXXXXXXXXX XXXXXXXXXXX VVVVVVVVVVVVVVVVVVVVVVVV XXXXXXXXXXX XXXXXX VVVVVVVVVVVVVVVVVVVVVVVVVV XXXXXXX No doubt some scary person can turn this into a much shorter sed script.◾Heart ◾Middle Finger ◾Thumbs Up ◾Emoticons ◾Cute ◾Funny ◾Birthday ◾Word ◾Hacker ◾Guy ◾Girls ◾Gun ◾Sniper ◾Swords ◾Pistol ◾Rifle ◾Fight ◾Animals ◾Cat ◾Bunny ◾Dog ◾Wolf ◾Bear ◾Fish ◾Bird ◾Dragons ◾Unicorn ◾Horse ◾Camel ◾Dinosaur ◾Monkey ◾Fox ◾Bow ◾Gun To Head ◾Computer ◾Insults ◾Roses ◾Flower ◾Crown ◾Suicide ◾Star ◾Skull ◾MonaLisa ◾Wall ◾Butt ◾Music ◾Discord ◾Christmas ◾Facebook ◾Twitch ◾One Line ◾Small ◾Font ◾Lol ◾Rock ◾Do It ◾New Year ◾Valentines ◾Fist ◾Finger ◾Single ◾Clash Of Clans ◾Sexy ◾Boobs ◾Black Heart ◾Corazon ◾Star Wars ◾Pikachu ◾Batman ◾Okay ![]() In a sense I'm cheating by using $b as a counter in the intermediate loop - I could instead append whitespace in the loop over $a and then use regex replaces for that loop too - but I'm going to allow that slight deviation from a pure-regex solution. # Prepare and print the line containing second horizontal line Y/-/ / # Only relevant first time round the loop S/-x/S|/ # Only relevant first time round the loop S/ /S /g # First time round: left + -> / subsequent times move / left # Read from stdin and set up the initial line # Subroutine to substitute, print, and unsubstitute as described above Because two of the characters used (+ and /) are special characters and turn up a lot in the regexes, it's worthwhile using other characters and substituting them to print. The basic idea is to do everything with regex substitutions. a.outīut other odd sizes are reasonable: $ echo 3 |. Thankfully the spec doesn't say what size one should look like: $ echo 1 |. It could be reduce by using freeform input. Obviously they help but don't add up to enough to kill the wordiess of the language. I tried fortran because of the inline for loops provided by the write statement. And note that markdown doesn't get along well with the indent requirements. No real point in providing a "unobsfucated" version. Since some people asked how long the entries of our contestants were:Īs well as our own solutions (not ranked with the others): I will update the accepted answer when a shorter one comes along. Trailing whitespace on the lines is ignored.ĮTA: I now accepted the shortest solution. The output is a cube on standard output following above rules. The input, given on standard input, is a single positive, even number n (2 ≤ n ≤ 30) that gives the length of the vertical lines of the cube. Corners are not counted for the length of an edge as detailed above (see examples below as well).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |