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, 26 25 20 bytes ;Bg4mUn ¤Í¤ùT8 qT ÎÊ Try it -5 bytes thanks to @Shaggy
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...
Japt, 1 byte u Japt, more like JABT (just another builtin) :P Try it
Japt, 1 byte w Uh... yeah. Probably similar solutions for many other golf langs. Try it
Japt -R, 14 13 bytes ;Bãê kb'A û ê Test it Takes all substrings of the alphabet, palindromizes them, and then takes only the ones starting with A and centers and mirrors that too. -1 byte tha...
You have an army of size $n$ that you need to split up to fight $k$ battles simultaneously against an opposing army $A$. In each battle, the army with the most troops present wins - no one wins a t...
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, ...
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, 14 11 8 bytes £¯YÄ è¥X Try it -3 bytes thanks to @Shaggy
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. ...
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...
Japt -P, 7 2 bytes Õc Takes input as character arrays. -5 bytes thanks to @Shaggy Try it
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...
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...
What is random defined as on this site? How are answers allowed to handle random chance?
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
With equally great hesitation, I'll also throw my hat in the ring if Jo King does not respond. (If he does, I'd rather Chris be the second moderator.) I was on the PPCG SE site for a relatively lo...
Japt, 1 byte ½ Test it Jelly, Vyxal, 1 byte . Try it online! Yeah, golf langs still kind of kill this challenge.
Japt, 11 bytes `HÁM, Wld! Just using Japt's builtin compression. Test it
- ← Previous
- 1
- 2
- 3
- Next →