Posts by xrs
AWK, 80 bytes {split("I V X L C D M 1 5 10 50 100 500 1000",d);for(;d[++i]!=$1;);print d[i+7]} Try it online! A quick map function. 'split' breaks the string into array elements. Find the stri...
AWK, 82 bytes {split($1,d,"");i=a=d[1];for(x in d){d[x]>a?a=d[x]:0;d[x]<i?i=d[x]:0}print a+i+$1} Try it online! Just pass your input, e.g.: echo "123" | awk '...'
K (oK), 9 bytes {x#0}'!10 Try it online! !10 / pass range your arbitrary number .' / treat those as a list, and evaluate each separately { } / main function...
AWK, 48 bytes ORS="";{l=split($0,d,"");for(;l>0;)print d[l--]} Try it online!
AWK, 62 61 60 56 bytes {for(;i++<$1;)print i%3?i%5?i:y="Buzz":i%5?x="Fizz":x y} {for(;i++<$0;)print i%15?i%5?i%3?i:"Fizz":"Buzz":"FizzBuzz"} {for(;i++<$0;x=""){i%3||x="Fizz";i%5||x=...
K (oK), 15 bytes "Hello, World!" Try it online! I'm terrible at K, but I've got that one down now.