instruction
stringlengths
34
53.1k
task Your task is to build a structure with \$n\$ cubes. The volume of cubes follow the following sequence (bottom -> top) \$n^3, (n-1)^3, (n-2)^3,...,1^3\$ input The total volume of the structure (\$V\$). output value of (\$n\$), i.e : The total number of cubes. \$V = n^3 + (n-1)^3 + .... + 1^3\$ notes Input will a...
Given a non-negative integer, \$n\$, yield the \$(n^2)^\text{th } n\$-gonal number. Further Detail: The \$x\$-gonal numbers, or polygonal numbers, are also known as the two-dimensional figurate numbers. Many people will be familiar with the triangular numbers, these are the \$3\$-gonal numbers: $$F(3,n)=\sum_{i=1}^{n}(...
Find the runs inside an array A run is defined as three or more numbers that increment from the previous with a constant step. For example [1,2,3] would be a run with step 1, [1,3,5,7] would be a run with step 2, and [1,2,4,5] is not a run. We can express these runs by the notation i to j by s where i is the first numb...
Challenge Train a single perceptron with 2 inputs and 1 output. Step 1: Initialize the weights Step 2: Calculate the output For inputs: [i1, i2, ..., in] and weights: [w1, w2, ..., wn] the output is: i1 * w1 + i2 * w2 + ... + in * wn Step 3: Apply activation function on the output (i.e sigmoid) Step 4: Update the we...
Textbattles Textbattles is is strategy game about, well, text. It consists of a 10x10 grid, where each player has a position on the grid. When it is a player's turn, they can decide whether to move a step in any direction on the grid, or just stay where they are. If a player moves into another player's spot, they are ...
I have a colleague at work that works from home every Tuesday and Thursday. At around 8:00 AM he sends us a message with the following text: Hello today I'm working from home In order to relieve him from the burden of doing this every day he stays at home, we would like to automate this task for him. The challenge Wr...
While I was traveling in the future, I noticed a funny game among kids circa 2275. When they don't want their great-great-great-great-grand parents to understand what they're saying, they use the BIBABOBU speak. Obviously, I couldn't understand anything either with my pre-cyborg era brain and I felt (or technically: I ...
You run a political website, and have determined that people have a better intuitive understanding when the chance of winning or losing an election is expressed as a ratio ("5 in 7") than when it is expressed as a percentage ("71%"). But you also don't want to display confusing ratios like "58 in 82", you'd like them ...
Challenge Write a program or a function that returns or prints a square-random-symmetrical matrix. Input N: The size of the matrix i.e 6 x 6 Output The matrix. You can either print it, return it as string (with the newlines) or as a list/array of lists/arrays. Rules You need to use at least N different characters, ...
Challenge Giving a valid arithmetic sum with some missing numbers, output the full expression. Example: 1#3 123 + 45# => + 456 -------- -------- 579 579 Input Expression format can be an array ["1#3", "45#", "579"], a string "1#3+45#=579", or 3 inputs f...
You are writing a screen scraper application monitoring a text-only chat window. Text is added at the bottom of the window. The application takes screenshot of the chat window. If a change has occurred since last screenshot (new_screenshot != old_screenshot), the screenshot is saved. After X time, all images are merg...
The Triforce is a fictional artifact in The Legend of Zelda, made of three identical-looking equilateral triangles representing power, wisdom and courage. Several games in the saga include an animation when the three parts finally join together. The purpose of this challenge is to draw a single 2D frame of such a simpl...
Challenge Given a grid size, obstacles' positions, player position and target position your task is to find a path for the player to get to the target and avoid the obstacles at the same time (if necessary). Input N: Grid size N x N P: Player's position [playerposx, playerposy] T: Target's position [targetposx, targ...
Challenge For a given positive integer \$n\$: Repeat the following until \$n < 10\$ (until \$n\$ contains one digit). Extract the last digit. If the extracted digit is even (including 0) multiply the rest of the integer by \$2\$ and add \$1\$ ( \$2n+1\$ ). Then go back to step 1 else move to step 4. Divide the rest of...
Your task is to write a program or function that determines whether a number is divisible by another. The catch is that it should give an answer as soon as possible, even if not all digits of the number have been given. Your program should take an integer D ≥ 2 and then a series of digits as input. These represent the ...
Vowels rhyme: Apples and Bananas There is a traditional children's song that repeats the same text over and over, only each time every vowel is replaced with a random vowel, but constant across the current stanza. Challenge The objective is to propose the shortest code that performs such a transformation on an input te...
Challenge Given a number width, number height, hours and minutes print the time using the following format style: ------ - ------ ------ - - ------ ------ ------ ------ ------ | | | | | | | | | | | | | | | | | ------ ------ ------ ------ ------ | ...
Write a program which can encode text to avoid reusing characters, and convert back. Both normal and encoded forms are restricted to a particular character set: the space character with code point 32, the tilde character ~ with code point 126, and all characters between. This is 95 total characters. It's a printable s...
You will be given 3 integers as input. The inputs may or may not be different from each other. You have to output 1 if all three inputs are different from each other, and 0 if any input is repeated more than once. This is code-golf, so make your code as short as possible!
Given an N-dimensional orthogonal (non-ragged) array of non-negative integers, and an indication of which dimensions to reverse, return the array but reversed along those dimensions. The indication may be given as a Boolean list of length N or a list of a subset of the first N dimensions indexed from 0 or 1. Please sta...
I hate hashes because they remind me of hashtags, help me find them in the input Input A piece of text This is an #example text, #designed for demo #purposes, #to demonstrate the challenge.# You may add a optional newline character at the end of the input if your program requires this You may assume that there will ...
Introduction: Inspired by this comment of @MagicOctopusUrn on @Emigna's 05AB1E answer for my "It was just a bug" challenge: 8F9ÝÀNð×ý}».∊ I done did made a spaceship maw! And I was all excited about suggesting a 12-byte edit. – Magic Octopus Urn Jul 17 '17 at 20:10 Which is a 05AB1E (legacy) program resulting in this...
Imagine you have an array of integers, whose non-negative values are pointers to other positions in the same array, only that those values represent tunnels, so if the value in position A is positive and points to position B, then the value in position B must be also positive and point to position A to represent both e...
A nondeterministic finite automaton is a finite state machine where a tuple \$(state,symbol)\$ is mapped to multiple states. Ie. we replace the usual \$\delta : Q \times \Sigma \to Q\ \$ transition function of a DFA with another function \$\Delta : Q \times \Sigma \to \mathcal{P}(Q)\$. If you know what an NFA is you mi...
Definition Given a matrix \$M\$ of non-negative integers and a non-negative integer \$k\$, we define \$F_k\$ as the "chop-off" function that removes all rows and all columns in \$M\$ that contain \$k\$. Example: $$\begin{align}M=\pmatrix{\color{red}6&\color{red}1&\color{white}{\bbox[red,1pt]{5}}\\1&2&\color{red}8\\\col...
Your task is to write a non-empty computer program comprised of some sequence of bytes. If we choose a particular byte in the program and remove all instances of it from the program, the modified program should output the removed byte. For example if our program were aabacba Then bcb would output a, aaaca would need ...
A few days ago, I came up with a fun card game to play with my friends. We were having fun playing it, when I thought, "Why not make this a KoTH?" So, here it is! Overview In this game, the objective is to get the most points. Your bot starts with 0 points and 20 energy. Every turn (500 in a game), both bots play one c...
ALERT: IN CASE YOU DOUBT, NO PUN ON "QUINE" IS INTENDED In regulated horse-racing for gambling, bets called Quinella bets exist and in which a person bet on the first two places of a race. In racecourses, usually there is a display which shows the odds of a specific combination as below: (This picture is a cropped p...
It is 20th anniversary of Casio's S-VPAM calculators and it is worth celebrating. Task: Process input string as Casio S-VPAM calculator does. The infix notation and precedence of mathematical operations must be followed. Angle values are expected in radians. Since there were multiple updates, sin 15, sin15 and sin(15 a...
I noticed a certain game had a peculiar life counter, which instead of stopping at 999, gained a new digit – the next number was crown hundred or 00. After 99 came crown hundred crownty (0) and the last number, after 9, was crown hundred crownty crown or , which would be 1110 in decimal. Your task is to write a program...
Unlike many C&R challenges, this does not require a separate robbers post; the goal of the robbers is to crack the previous answer and then post a new one as a cop. As answerers, you will write a series of polyglots that look like this (each column is a language, and each entry is the output of the answer in that langu...
This challenge is based on this Stackoverflow question. With a positive number as input, output it as the sum of each digit multiplied by its power-of-10 representation. Input A number, as an integer, a string or a list of digits/characters. The number will be strictly positive. If you accept the number as a string or...
All those busy beavers made quite a mess. They wrote all over the tape. At this rate, our neighbour will stop lending us unbounded tapes. We need a new way to play the busy beaver game, one that doesn't ruin every tape we use. The Rules Brainfuck only. Memory tape is unbounded both ways. Input instruction will always r...
The Game You will be playing an (almost) standard game of Connect-4. Unfortunately, it is a correspondence game and someone has placed black tape on every second row starting from the bottom, so that you cannot see any of your opponent's moves within these rows. Any moves within already-full columns will count as passi...
Let \$n=42\$ (Input) Then divisors are : 1, 2, 3, 6, 7, 14, 21, 42 Squaring each divisor : 1, 4, 9, 36, 49, 196, 441, 1764 Taking sum (adding) : 2500 Since \$50\times 50=2500\$ therefore we return a truthy value. If it is not a perfect square, return a falsy value. Examples : 42 ---> true 1 ---> true 246 ---> true 1...
The Dihedral group \$D_3\$ represents the symmetries of an equilateral triangle, using the identity (represented by id), rotations (represented by r1 and r2), and reflections (represented by s0, s1, and s2). Your task is to compute the composition \$yx\$ of the elements \$x, y \in D_3 \$. They are given by the Cayley ...
Introduction: I think everyone knows what a Lava Lamp is, but in case they do not: (Image source) They're basically glass tubes that contain wax in a translucent liquid. The bottom part is heated when the lamp is turned on, causing a change in density and thus the wax floats to the top. When it cools down, it falls do...
Reversible computation refers to computation in which little or no information is deleted. Reversible computation a major component of quantum computation, and reversible computation is potentially many times more energy efficient than conventional computation. I want to know how easy it is to compute the conjugacy of ...
A shape is chiral if no amount of rotation can make it look like it's mirror image. In this puzzle we will be writing chiral computer programs. For this puzzle we will think of a program as a rectangular matrix of characters. As such all solutions to this challenge must be rectangular (that is all lines must be of th...
My colleague recently sent me the following piece of JavaScript as a joke: let butScript = (nrOfButs) => { for(var i = 0; i < nrOfButs; i++){ if(i % 3 == 0){ console.log("Yeah") } if(i % 2 == 0){ console.log("But") } if(i % 3 == 1){ console...
Given a 2D array of integers, let's sort its rows and columns in blocks. This means that you only have to sort a given row or column, but applying the transformations needed for sorting it to every other row or column in the 2D array. Rules Input will be a 2D array of integers and a 1-indexed integer. This integer wil...
NOTE: The winner of this competition is Jack!!!. No more submissions will be accepted. Here is the chat room for this king-of-the-hill challenge. This is my first one so I'm open to suggestions! Reaper is a game concept developed by the Art of Problem Solving which involves patience and greed. After modifying the game ...
ASCII art is fun. Modern text editors are very good at manipulating text. Are modern programming languages up to the task? One common task in ASCII art manipulation is to crop text to a rectangle between two characters. This is the task you must implement in this challenge. Details Your program will take 3 inputs: t...
An isolated character is a character (other than a newline) that doesn't have an adjacent character of the same type. Adjacent characters can be to the left, the right above or below, but not diagonals. For example in the following text H is isolated: Ybb YH% %%%% All the other characters are not isolated because ea...
Consider the following number sequence: \$ 0, \frac{1}{2}, \frac{1}{4}, \frac{3}{4}, \frac{1}{8}, \frac{3}{8}, \frac{5}{8}, \frac{7}{8}, \frac{1}{16}, \frac{3}{16}, \frac{5}{16}, \frac{7}{16}, \frac{9}{16}, \frac{11}{16}, \frac{13}{16}, \frac{15}{16}, \frac{1}{32}, \frac{3}{32}, \frac{5}{32}, \dots \$ It enumerates a...
Create a bot to choose the smallest unique number. (Based on a psychology experiment I heard about many years ago but haven't been able to track down again.) Rules Each game will consist of 10 randomly selected bots playing 1000 rounds. Each round, all bots select an integer from 1 to 10 (inclusive). Any bots that ch...
Consider this file path: C:/Users/Martin/Desktop/BackupFiles/PC1/images/cars/new.png Your goal is to write a program that will return the file path starting from the folder after the last folder that contains a number till the filename. So, for the above file path, the program should return images/cars/new.png. One or...
This is the cops' thread, the robbers' thread is here A polyglot is a program, that without modification, can run in multiple languages. Allowed languages Any language that was made before the challenge and isn't made for the purpose of the challenge, it is allowed, though discouraged, to use languages that are easy t...
This is the robbers' thread, the cops' thread is here A polyglot is a program, that without modification, can run in multiple languages. Robbers' Challenge First, find a vulnerable cop's answer, then try to find languages that the submission works in, if you found any that weren't listed by the cop, then you just cra...
Inspired by Nicola Sap's Challenge Goal Your challenge is to simply produce π with 232-1 digits. However today's twist, like the title implies, is to produce it without using any numbers or any π constants in your source-code. Input/Output Your program will not be provided usable input. It can output in any reasonable ...
Introduction In mathematics, the hyperoperation sequence is an infinite sequence of arithmetic operations (called hyperoperations) that starts with the unary operation of successor (n = 0), then continues with the binary operations of addition (n = 1), multiplication (n = 2), and exponentiation (n = 3), after which th...
Introduction For the purposes of this challenge, we will define the neighbours of an element \$E\$ in a square matrix \$A\$ (such that \$E=A_{i,j}\$) as all the entries of \$A\$ that are immediately adjacent diagonally, horizontally or vertically to \$E\$ (i.e. they "surround" \$E\$, without wrapping around). For peda...
The problem with the Caesar cipher is the resulting words are often unpronounceable. The problem with Pig Latin is that it is easy to decode. Why not combine them? Input A word consisting of the 26 english letters. Output First, change every consonant in the word to the next consonant in the alphabet. So, b goe...
Challenge: Given a positive integer, output the longest single-digit subsequence that occurs at least twice, AND has boundaries of another digit (or the start/end of the integer). An example: Input: 7888885466662716666 The longest subsequence of a single digit would be 88888 (7[88888]5466662716666) with a length of 5. ...
Make a program that takes the word you input, and adds that word to the back of itself minus its first letter, then repeats until all letters are gone. For example, cat would become catatt, and hello would become helloellolloloo. Input Any of the 26 letters of the English alphabet. There may be multiple words separat...
pylint has no lower bound on the scores it will give your code. It uses the following metric to score code, with the maximum score being 10: 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) With python 3.6, try and write a program that: Outputs "Hello World" when run from the command lin...
Introduction Brainstract, a newly created dialect of Brainfuck adds a bit more elements to the syntax. In addition to the normal Brainfuck syntax, there are macros. To define a macro: {macro_name ++++} Then use it: {macro_name} Adds 4 to the current cell Challenge Your challenge is to take a valid Brainstract progra...
The least weird fact about the US presidency right now is that there have been two unrelated presidents whose last names start with T-R-U-M. That made me think, how many US presidents share other combinations of characters? There are obviously two presidents that share the characters "BUSH", and "ROOSEVELT". But did yo...
Input A non-empty shuffled string consisting of ASCII characters in the range \$[32..126]\$. Output The output is obtained by applying successive rotations to the input string. For each letter ([a-zA-Z]) in the input string, going from left to right: if the letter is in upper case, rotate all characters before it by o...
Today's challenge is simple: Without taking any input, output any valid sudoku board. In case you are unfamiliar with sudoku, Wikipedia describes what a valid board should look like: The objective is to fill a 9×9 grid with digits so that each column, each row, and each of the nine 3×3 subgrids that compose the grid (...
I'm sure most of us have heard of zip bombs and similar decompression bomb tricks, where a maliciously crafted input creates a massively disproportionate output. We even had a question on here to do that to a compiler at one point. Well, it occurs to me that Markdown is a compression format of sorts, replacing bulky H...
Edit: I haven't played D&D before so when I initially made this question I didn't properly research it. I apologize for this, and I'm making a few edits that might invalidate answers to stay as true as possible to the dnd 5e rules. Sorry. A D&D fan from a recent Hot Network Question seems to have some trouble working ...
I have a combinatorics problem that I'd like to put on the OEIS—the problem is that I don't have enough terms. This code challenge is to help me compute more terms, and the winner will be the user with the submission containing the greatest number of terms. The Problem Suppose I give you a triangular array of light bu...
Your goal is simple: to fail everything. More precisely, you should write the shortest code that triggers a compilation/interpretation error, or a runtime error. What does not count Failing with symbols that are not covered by the language syntax and are meant to appear only in string literals, comments and other ways...
We've all seen the pictures captioned "How many squares are in this image? 98% will not get this right!" Well, here's your chance to laugh at that 98%. Input A rectangular block made of only 2 characters. In a general form, this is defined by m lines, each containing n characters. Example: 0000xxx 00x00xx 00000xx xxxxx...
Background Puzzlang is a derivative of Brainfuck, where the symbol X executes a BF command based on three characters on top of it, and anything else does nothing. The following is the translation table for Puzzlang, where X is the literal X and . stands for anything else: > < + - . , [ ...
This proposal had few attention for 8 months (though an answer was posted in the sandbox at that time), so I decided to post it anyway. Introduction Napier's bones is a calculation tool, which helps speeding up the calculation of multiplication, division and digit-by-digit square root extraction by turning n-digit-by...
This challenge was inspired by Yeah But No But Yeah. maxb´s colleague recently sent him the following piece of JavaScript as a joke: let butScript = (nrOfButs) => { for(var i = 0; i < nrOfButs; i++){ if(i % 3 == 0){ console.log("Yeah") } if(i % 2 == 0){ console.log("...
Definitions Quadratic residues An integer \$r\$ is called a quadratic residue modulo \$n\$ if there exists an integer \$x\$ such that: $$x^2\equiv r \pmod n$$ The set of quadratic residues modulo \$n\$ can be simply computed by looking at the results of \$x^2 \bmod n\$ for \$0 \le x \le \lfloor n/2\rfloor\$. The challe...
The goal is to simplify sentences containing multiple negatives. Like with multiplying negative numbers, two negative words annihilate each other until at most one is left (doesn't matter which one). While some words disappear without a trace, other leave behind a positive part The affected words are: no not couldn't ...
The ChatRoom is here I love playing the card game BS, but sometimes, it just doesn't have enough oomph for my short attention span. Instead, let's play some Russian BS. Rules Here is a quick guide to the rules. The game begins with a random player declaring the card type of the round (out of 14 options: A,2,3...10,J,Q...
Game In this challenge you will play a made-up turn-based game. The game is made up of the following elements: A 8x8 grid with each spot containing nothing (space), a robot (*), a wall (#), or HP (@) A public stack Robots In this challenge, you will be playing as a robot. Each robot has health (starts at 10HP and ca...
I am quite surprised that a variant of linear regression has been proposed for a challenge, whereas an estimation via ordinary least squares regression has not, despite the fact the this is arguably the most widely used method in applied economics, biology, psychology, and social sciences! For details, check out the W...
Let n be a positive integer then n = a + b + c for some a, b, and c that are palindrome integers. What is the largest possible integer a for k = 1 to 1_000_000? Golf this or have the fastest running time. NOTE: it's NOT the same as this question as I am asking for the largest palindrome component. The question just ask...
Introduction Today we're gonna take care of the bane of first-year linear algebra students: matrix definiteness! Apparently this doesn't yet have a challenge so here we go: Input A \$n\times n\$ symmetric Matrix \$A\$ in any convenient format (you may also of course only take the upper or the lower part of the matrix)...
Challenge Your task is to encode an integer as a string of ASCII characters, then successfully decode it after said string has been randomly shuffled. You will write two programs/functions, which will be referred to as Encoder and Decoder. Encoder Input: an integer \$n\$ in the range \$[0,2^{31}-1]\$. Output: a string...
Tomorrow is the Mid-Autumn festival, and in the spirit of that holiday, I will introduce a gambling game that we (people from Xiamen) play during the holiday! Rules The game is played with six 6-sided dice. Different combinations of numbers have different ranks, with a special emphasis on fours and ones. Your job is to...
True color (24-bit) at Wikipedia is described in pertinent part as 24 bits almost always uses 8 bits of each of R, G, B. As of 2018 24-bit color depth is used by virtually every computer and phone display and the vast majority of image storage formats. Almost all cases where there are 32 bits per pixel mean that...
Requirement: Write a program (in any language) that counts the number of lines of code in files matching *.sh in the directory tree starting from the directory that the program is executed in, excluding lines that are empty, only contain whitespace, or are just single-line comments (a line which the first character tha...
Awhile back I encountered a simple programming puzzle to determine whether a string was a pangram, or a perfect pangram. (Although it's worth noting that this particular challenge gave a different meaning than the standard definition of a "perfect pangram," to mean any sentence where every letter appears n times for so...
The idea for this code-challenge is simple: given a matrix of integers, let's sort it by applying Rubik-style movements. This means that you can select a single row or column and rotate its elements in any direction: [1, 3, 2, 4] => [3, 2, 4, 1] (rotate left for rows/up for columns) [1, 3, 2, 4] => [4, 1, 3, 2] (rota...
Description The task of this challenge is to devise a program or function that tracks a given object in an \$n×n\$ space. I/O Your program will be given 3 inputs, which may be taken in any sensible way: n will be the size of the plane's side. (so, for \$n=5\$, your plane will be \$5×5\$). You may assume n will always b...
Write a function or program that accepts a date (as a string in YYYY-MM-DD format) as input and returns a truthy value if that date is "alphabetical," and a falsey value if it isn't. An alphabetical date is a date whose month, day and year are in alphabetical order when expressed as a string (and when considered speci...
Given a word, treat every letter as its number in English alphabet (so a becomes 1, b becomes 2, z becomes 26 and so on), and check if all of them, including duplicates, are pairwise coprime. The input is exactly one word of lowercase English letters. The output is the fact if the word is coprime: any truthy/falsey val...
We all know of different fancy sorting algorithms, but none of these give us numbers in a way that's easy to pronounce. To remedy this, I propose using PronunciationSort™, the most natural way to sort lists of numbers. Pronunciation The official rules for pronouncing numbers (in this challenge) is that the digits are p...
In this task your code will be given an integer \$n\$ as input. Your code should then output the greatest number of multiples of \$3\$ that can be concatenated (in base \$10\$) to form \$3n\$ (with no leading zeros). For example if you were given \$26042\$ as input, \$26042\times3=78126\$ and \$78126\$ can be made ...
Your task here is simple: Given a list of integer sets, find the set union. In other words, find the shortest list of integer sets that contain all the elements in the original list of sets (but no other elements). For example: [1,5] and [3,9] becomes [1,9] as it contains all of the elements in both [1,5] and [3,9] [...
Given a value x find the smallest numerical value greater than y that is capable of being multiplied and divided by x while retaining all original digits. The new numbers do not lose digits. The new numbers do not gain digits. For example: Input: x = 2, y = 250000 Original: 285714 Division: 142857 Multiplicat...
We've recently reached the threshold of 10,000 questions on PPCG. Hooray! Let's celebrate this with a simple challenge. Input Two integers \$A\$ and \$B\$, both in \$[1..9999]\$, such that \$A+B<10000\$. Task Your task is to add one single digit to one of these integers or one single digit to both of them such that \$A...
We have a challenge to output your own score, but it seems like all the answers there just hardcode the output and that's boring1. So lets have a new challenge. Your program must output its own length in bytes followed by the string " bytes", but in order to prevent hardcoded solutions if we reduce its size by removi...
Challenge You are given an array \$a\$ of integers. With a move you can increase or decrease an element of the array by 1. Your task is to equalize the array, that is make all the elements of the array equal by performing some moves. But that's not enough! You also want to make as few moves as possible. Input A non-em...
In this challenge, you will write a bot that play's the prisoner's dilemma. Here's the catch: you will not have access to the history of previous games. Instead, you will have access to the opponent itself. In this version, both players get +2 points if they both cooperate, +1 points if they both defect, and if one coo...
Problem Given a value n, imagine a mountain landscape inscribed in a reference (0, 0) to (2n, 0). There musn't be white spaces between slopes and also the mountain musn't descend below the x axis. The problem to be solved is: given n (which defines the size of the landscape) and the number k of peaks (k always less tha...
I just had a genius idea for making the work-life easier - a countdown to a specific date which only counts workdays. The basic task is to create a countdown to a specific date which only includes the workdays in the countdown. As workday counts Monday, Tuesday, Wednesday, Thursday and Friday. The Input should be a sp...
You have 2 numbers, both stored separate as numeric data type. First number is always 6 digits long. Second number can vary between 1 and 4 digits. If it's less than 4 digits, it needs to be padded with numeric value 0. End result always needs to be 10 digits number. Order has to be respected. n1|n2 Example #1: n1 = 11...
Using the word “conemon” print each character 2 times more than the last. The first letter, “c”, should be printed 10 times, the second 12 and so on. Each repeated-letter-string should be printed on a new line. So the end-result becomes: cccccccccc oooooooooooo nnnnnnnnnnnnnn eeeeeeeeeeeeeeee mmmmmmmmmmmmmmmmmm ooooooo...
This challenge is created in celebration of my first esoteric language, Backhand! Backhand is a one dimensional language with a non-linear pointer flow. The pointer moves three steps at a time, only executing every third instruction. The program 1..1..+..O..@ will add 1+1 and output 2 before terminating. The intermedia...
Display numbers from one to one-hundred (in increasing order), but number 2 shouldn’t appear anywhere in the sequence. So, for example, the numbers two (2) or twenty-three (23) shouldn't be in the sequence. Here is an example output, with newlines separating the numbers: 1 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 30 31...
Final Standings +----------------------------------+---------+---------+---------+----------------------------+ | Name | Score | WinRate | TieRate | Elimination Probability | +----------------------------------+---------+---------+---------+----------------------------+ | 1. SarcomaBo...
Letters of the words want fairness. They decided to appear same number of times in a sentence equally. Example: Priorities Will become: Ppprrioooritttieeesss Each letter appears 3 times, as the most common letter was i, appearing 3 times. It does not matter where you put the repeated letters, as long as they are next...