Consider the \$4\$ divisors of \$6\$: \$1, 2, 3, 6\$. We can calculate the harmonic mean of these numbers as
$$\frac 4 {\frac 1 1 + \frac 1 2 + \frac 1 3 + \frac 1 6} = \frac 4 {\frac {12} 6} = \frac 4 2 = 2$$
However, if we take the \$6\$ divisors of \$12\$ (\$1, 2, 3, 4, 6, 12\$) and calculate ...
I was pondering today about how many characters it would take in each language to throw an exception, and noticed there wasn't any existing collection of answers, so:
The task
Throw an exception in the least amount of characters. If your language does not have exceptions, then a panic is valid. A...
My sister has an Amazon Echo in her room, which she now has playing christmas music 24/7. I now have found a new hobby: sneaking into her room and making it play MCR's cover of "All I want for Christmas Is You" on loop :p
Third idea: place remote controlled audio recording of you saying "alexa play <however you get mcr songs to play idk it's been a while since I last used my echo dot>" and you can just play it every now and again when you think she won't notice
My class has a "song of the week" thing, where everyone requests things and a random one gets chosen. And this week... Well, you can guess exactly what got chosen.
Worst case of Slowsort code-golf sequence sorting
Background
Slowsort is an in-place, stable sorting algorithm that has worse-than-polynomial time complexity. The pseudocode for Slowsort looks like this:
procedure slowsort(A[], i, j) // Sort array range A[i ... j] in-place.
if i ≥ j ...
This question may not be that creative, but I believe that it is different enough to pose a new challenge.
The Challenge
Your challenge is to write the shortest program possible that can take any valid expression in Reverse Polish Notation and convert it to infix notation that obeys the order o...
Infix notation is a method of printing mathematical expressions where each operator sits between its two arguments, such as \$ \left(5 \cdot 4\right) + 3 \$.
Prefix notation is a method of printing expressions where operators sit before their arguments. The equivalent of the above is +*543. It's ...
Try to develop this code with as little characters as possible.
The low-cost plane and air taxi airline VOLASO operates in multiple airports throughout
length and width of the world.
The company, although it offers ridiculous prices on its ultra-small flights, has
with an expensive baggage check-...
You probably want to add a timeout on the server - It's currently printing millions upon millions of A to STDOUT with no sign of stopping anytime soon. — emanresu A5 mins ago
Because it apparently puts substantial load on their server :P (Why? No idea.) You can just use a userscript, and there's several longstanding meta proposals.
The task is to create a program which displays a golf score as text. It takes 2 numbers as input, separated by space or new line: The first number is the par of t...
Task :
Wonky numbers are 3-or-more digit numbers that meet one or more of the following criteria:
Any digit followed by all zeros: 100, 70000
Same digit throughout the entirety of the number : 1111, 777777777
The digits are in ascending order : 1234, 1234567890
The digits are in descending order...
So, normally, this is a forbidden loophole to fetch the desired output from an external source. But this challenge is an exception ! In this challenge you will have to fetch data from the internet and output it to the SDTOUT.
The task
For the purpose of this challenge, you'll be the owner of the...
@thejonymyster though i will say that i have a sneaking suspicion that there also just arent that many, since most people nerdy enough to include a programming language in their fictional work would just write a real one since it isnt that hard
@pxeger doesnt that depend largely on the language?
also is this like one of those situations where it can be 1 or 0 but you know which bit it will be, or like is it just some binary number and you need to get rid of the largest power of 2, whichever it ends up being
like do you have a bunch of 8 bit numbers you need to turn to 7 bit numbers no matter what it does to the number, or do you have a bunch of n bit numbers that you need to make n-1*bit numbers
It was lying in a drawer and looked like it'd just been stomped on by a large animal, and somehow it works now
The first time I tried to boot it up it said some sort of weird checksum had failed (and it surprised me the thing didn't just catch on fire), but after a reboot it worked
CMC: Given positive integer n, output the number of ways to put letters labelled 1 to n into envelopes labelled 1 to n such that no letter goes to the matching envelope
Some questions like this are obviously off-topic, but some what sees on-topic but not on this site (CCGC)?
Like:
“
What programming language is?
+[.+]
Prints ascii table. but what programming language is?
”
Is off-topic in CCGC but why?
Edit:
not including cops-and-robbers
@emanresuA no, round behaves differently on values that end in .5, but given that e is irrational and the factorial function always produces an integer, that 5-byter is valid anyway
round is Banker's Rounding, where odd number + 0.5 rounds up but even number + 0.5 rounds down
@DJMcMayhem Will Mego's content also be deleted? Has SE ever deleted a user's content before? Anyway, if SE doesn't fix its Monica debacle, then I'm not going to run.
> because I do not believe the network has the best interests of its users in mind. So, I am following in the footsteps of Dennis and resigning as a moderator, effective immediately.
This and the resulting messages, every day, count as noise to me. Announce it starting in 10, then start comparing scores once it's open adn you're done
@RedwolfPrograms apparently, this is what it does:
1. Find all tiles that have no edges.
2. Find all tiles that have an edge that is adjacent to a tile that has an edge.
3. Find all tiles that have an edge that is adjacent to a tile that has an edge and that tile has an edge adjacent to a tile that has an edge.
4. Find all tiles that have an edge that is adjacent to a tile that has an edge and that tile has an edge adjacent to a tile that has an edge and that tile has an edge adjacent to a tile that has an edge.
5. Find all tiles that have an edge that is adjacent to a tile that has an edge and that tile has an edge adjacent to a tile that …
(Has to be, no way you could bully a human into reading that lol)
This year I'm going to focus on readability and a large variety of useful functions, instead of packing a bunch of functions into one or two letter names