Top new questions this week:
|
I have a number like this: n = 548915381 The output should be the sum of every second number. In this case 26: 4+9+5+8 = 26 …
|
Sometimes when you’re playing Wordle, you get to your fifth guess and you can’t figure out the word any more, so you start mentally running through the list of remaining iterations, both sensical and …
|
A neat trick is if you ever need a nine-sided die, it is possible to make one using two six-sided dice using the numbers below. This is assuming you either have a way to rewrite the faces on the dice, …
|
Given a positive integer n. Generate a JSON array (can be a string, or your language’s built-in JSON representation as long as we can get valid JSON, (your code …
|
Part of Code Golf Advent Calendar 2022 event. See the linked meta post for details. It’s Hanukkah! Unfortunately, it appears some of the candles in your menorah have been blown out. You’ve got a …
|
Each element on the periodic table of the elements has an atomic weight. For example, boron (element 5) has an atomic weight of 10.81. Your challenge is to write a program which takes as input the …
|
Part of Code Golf Advent Calendar 2022 event. See the linked meta post for details. As soon as the Elves get bored with the last week’s game, Bin comes up with a new game. The rules are similar, …
|
Greatest hits from previous weeks:
|
Fizz Buzz is a common challenge given during interviews. The challenge goes something like this: Write a program that prints the numbers from 1 to n. If a number is divisible by 3, write Fizz instead….
|
Write a program that prints “Hello, World!”. But also, if you take only the first, third, fifth, etc. characters of your program, the resulting program should still print “Hello, World!”. If your …
|
You are to write a program that will output source code that is Larger than the original program (character wise) Will print another program larger than itself when run (i.e. the new program is also …
|
Challenge: In the programming language of your choice, shut down the machine that your code was executed on. Rules No shutting down by resource exhaustion (e.g.: forkbomb to force shutdown) You are …
|
Matthias Goergens has a 25,604-character (down from the original 63,993-character) regex to match numbers divisible by 7, but that includes a lot of fluff: redundant parentheses, distribution (…
|
Challenge I need help building a brick wall! Throw together some code for me using no input and produce the following output wall shown below: …
|
Note: a 1000 point bounty is still available for this challenge, which I will create and award if anyone takes the top score without using built-in compression. Below is a …
|