Posts by Quintec
Japt, 12 bytes ÊÆgX *VpXÃr+ Loops through the range of integers 0 to n-1, calculates each term, and sums. Try it
Japt, 1 byte u Japt, more like JABT (just another builtin) :P Try it
APL (Dyalog Classic), 7 bytes ⎕+∘÷⍣=1 Well, rak is probably not going to answer this, so I might as well ;p Try it online!
Japt, 1 byte w Uh... yeah. Probably similar solutions for many other golf langs. Try it
It's for non-challenge questions. These might be general tips questions, questions about how to golf specific pieces of code, common golf paradigms, etc. Here are some examples from SE that might ...
Regarding because the vast majority of all programs that were posted & highly up-voted there won't even compile on the most basic, compliant compiler for that language. Code Golf allows f...
Given an array of numbers, output the length of the longest increasing (not necessarily contiguous) subsequence. It is guaranteed that there are no duplicates in the array. For example, if the inpu...
Recently a flag came to my attention on this post: https://codegolf.codidact.com/posts/280372/281943#answer-281943 It is a well-intentioned answer to the challenge, but unfortunately it is wrong, ...
Japt, 26 25 bytes ;Bg4mUqL În10,2 ùT8 qT Îl Try it Long and unwieldy, I'm rusty. Looks at the first 0 in the bitstring of the first octet.
Use higher versions of Java Seriously, it's crazy what sort of features have been added since Java 8. I hardly recognize the language anymore... Examples: Constructing Lists Before, you had to ...
The Rules In this game, each round, every player faces off against every other player in a round robin format. In each match, players pick 3 positive integers that sum to 360. Let's say player 1 p...
Define a cool number as a number whose proper divisors (all except for the number itself) have an integral mean. Define a really cool number as a number whose divisors (including itself) are all co...
Japt -R, 28 bytes Lõ@"Fizz"pXv3)+"Buzz"pXv5)ªX I spent a long time playing with wizardry string/array slicing. It did not work out. This solution just repeats "Fizz" and "Buzz" if divisible. T...
Given a musical key, output its number and letter on the Camelot Wheel (shown below). Input A musical key as a string, as shown on the wheel. The words "Sharp" and "Flat" may be replaced with s...
Laser, 9 bytes c⌜ps \U# My own language's showcase time! This is a 2D language with an instruction pointer initially pointing to the right. It takes implicit input as an array of characters. ...
Japt -P, 7 2 bytes Õc Takes input as character arrays. -5 bytes thanks to @Shaggy Try it
APL (Dyalog Classic), 20 18 17 16 bytes ⊢/,+.×⍣⎕⍨∘.+⍨⌽⍳2 Matrix implementation, requires ⎕IO←0. Thanks to @Razetime for the idea, -3 bytes by me Try it online! APL (Dyalog Classic), 19 18 byt...
Japt, 11 bytes `HÁM, Wld! Just using Japt's builtin compression. Test it
What is random defined as on this site? How are answers allowed to handle random chance?
Python 3, 39 bytes f=lambda x:x if x<2else 2*f(x-1)+f(x-2) Generic recursive implementation Try it online!
The "Uppers" def oneup(data, history): if len(history) > 0: prev = history[-1] if prev[2] > 1: better = [prev[0] + 1, prev[1] + 1, prev[2] - 2] elif prev[1] > 1: better...
Canvas, 9 7 bytes #*⌐⤢n↔n -2 bytes thanks to @Razetime Uh I don't really know how to use Canvas - what I think this does is create the vertical wall, then half the horizontal one, then concatn...
Japt -Q, 15 12 bytes à üÊËx_×*JpE -3 bytes thanks to @Shaggy Uses Vieta's. Try it
Japt, 1 byte ½ Test it Jelly, Vyxal, 1 byte . Try it online! Yeah, golf langs still kind of kill this challenge.
- ← Previous
- 1
- 2
- 3
- Next →