instruction_seed stringlengths 29 40.5k | source stringclasses 6
values |
|---|---|
Ordinal numbers, also referred to as ordinal numerals, function as linguistic representations indicating position or rank within a sequential hierarchy.
Drawing from Wikipedia, your task entails developing two distinct programs utilizing two different programming languages to generate the ordinal sequence commencing f... | evolcodegolf |
Confidant Numbers in Arbitrary Bases
Let x be an integer represented in a specific base system, with D denoting an array that encompasses its digits. An integer x qualifies as a Confidant Number if, for every integer n ranging from 1 to the length of D, the condition D[n+1] = D[n] + D[n-1] + ... + D[1] + n holds true.
... | evolcodegolf |
Given a non-uniform nested list structure, for instance,
[[4, 7], [5, 3, [], [6, [2]]]]
Your objective is to reorganize solely the numerical values contained within it. For illustration, applying this to the provided example would yield
[[2, 3], [4, 5, [], [6, [7]]]]
It is imperative that the overall configurat... | evolcodegolf |
In accordance with the principles articulated by TIO, it can be observed that each letter of the Latin alphabet finds representation across various programming languages. For every distinct letter, there exists at least one programming language whose designation initiates with that specific letter. Your challenge is to... | evolcodegolf |
Input: A timestamp (formatted as HH:mm:ss). You may also provide three separate integers or a time-object if your programming environment permits.
Output: Each component (HH, mm, ss) individually reversed and then adjusted to the nearest valid time within a 24-hour format. For example (in the format HH:mm:ss):
15:4... | evolcodegolf |
As part of the Advent of Code Golf 2021 event, and in connection with the AoC2016 Day 1, Part 1 challenge, you find yourself unexpectedly airdropped near the elusive Easter Bunny Headquarters within a city whose layout defies typical expectations. The provided Easter Bunny Recruiting Document, intercepted by the Elves,... | evolcodegolf |
Your objective is to transform an expression representing a square root, such as the following:
√12
into a simplified radical form, exemplified by:
2√3
For the purposes of this exercise, we only require you to return the coefficient of the radical expression:
2
Test cases to consider:
4 -> 2
9 -> 3
12 -> 2
13 -... | evolcodegolf |
Your objective is to develop a program that generates an OEIS sequence, including the designation of the sequence in the code (A______). While this task seems straightforward, there is an additional requirement: your implementation must also yield a distinct sequence when the sequence name in the code is altered to cor... | evolcodegolf |
Design a program that generates an ASCII representation of a hollow diamond shape made with a specified character. Challenge: This program will accept two inputs: a positive integer n and a character c. The output should be a hollow diamond of height 2n-1, where the width at its widest point matches the height and is a... | evolcodegolf |
Given (in any structure; flat list, two lists of lists, a tuple of matrices, a 3D array, complex numbers,…) the coordinates for two non-degenerate triangles ABC=[[Ax,Ay],[Bx,By],[Cx,Cy]] and PQR=[[Px,Py],[Qx,Qy],[Rx,Ry]], determine if they are similar, that is,
they both have the same shape, or one has the same shape... | evolcodegolf |
Designing a finite state machine that efficiently identifies multiples of 9 is straightforward: it requires maintaining a cumulative digit sum (mod 9) and adding each incoming accepted digit accordingly. This FSM operates with merely 9 states, making it a rather simplistic construct! Due to the established relationship... | evolcodegolf |
Given two integers m and n, return the first m digits of sqrt(n), ensuring the decimal point is included and formatted correctly. They will be provided with a space in between. You only have to produce m digits: for instance, if m=5 and n=500, the output should be 22.360, not 22.36067. Additionally, restrict your solut... | evolcodegolf |
Consider a scenario in which the current date aligns with the festive occasion of Christmas Eve. As such, it is imminent that Christmas will unfold the following day, while the day prior marked the occasion known as Christmas Eve Eve. If one delves into the temporal context, it is revealed that in two days, we shall be... | evolcodegolf |
Construct a visual representation of a unique doubling pattern of slash squares and rectangles, based on a specified positive integer N. For N=1, the foundational element appears as follows:
```
/\
\/
```
For N=2, an additional square is incorporated in the downward right quadrant, resulting in:
```
/\
... | evolcodegolf |
In this intricate challenge, various bots (comprised of JavaScript functions) maneuver within an infinite factory (playfield), endeavoring to gather characters. These characters can be utilized to construct worker bots or discarded for other bots to retrieve. Additionally, each bot must maintain a unique score-reducing... | evolcodegolf |
Task - The title pretty much sums it up: raise an integer x to power x, where 0 < x, and ensure that the implementation also returns the result as a string formatted to include commas for large numbers.
Restrictions:
Use of exponentiation, exp(), ln(), and any other powers-related language built-ins, like pow(), x... | evolcodegolf |
Devise a robust program or function that accepts a pair of positive integers, specifying a width and a height, to meticulously construct an ASCII art representation of a houndstooth grid pattern corresponding to those dimensions. Utilize the provided 25×26 character grid as the foundational cell template, formatted as ... | evolcodegolf |
Given any of the following characters (or a newline):
`1234567890-=~!@#$%^&*()_+qwertyuiop[]\QWERTYUIOP{}|asdfghjkl;'ASDFGHJKL:"zxcvbnm,./ZXCVBNM<>?
Your program must output the row that it is on the keyboard, ensuring that it correctly identifies and handles multiple consecutive inputs as a single output.
Because my... | evolcodegolf |
(Meaning: Convert English to Bleet)
For many years, we have revered goats as divine beings. However, without the capability to translate English into 'Bleet,' the sacred dialect of the Goat God, meaningful communication with them remains elusive. To bridge this gap, we conducted extensive research into caprine behavior... | evolcodegolf |
In this intricate challenge, you will be tasked with receiving a positive integer input, converting it to its hexadecimal representation, performing a series of transformations, and ultimately producing the final output. Due to the constraints of hexadecimal, where each representation is limited to 16 characters, your ... | evolcodegolf |
In celebration of Bacon Day, characterized by the quirky nomenclature of the event's hat as "Mmmm Bacon", it is only fitting to revel in the creation of whimsical 2D matrices inspired by bacon strips! A singular 1 by 1 bacon strip is depicted as follows:
-----
)===)
(===(
)===)
-----
Your task is to accept two coord... | evolcodegolf |
Construct a solution inspired by a challenging inquiry posed on Stack Overflow.
Given a non-empty array of integers denoted as x, along with a positive integer n, your task is to compute the cumulative sum of every sliding block of length n traversing the array x. This operation should be performed in a circular mann... | evolcodegolf |
Your program will be provided with a specific integer as input. The task at hand is to generate and return all integers ranging from 2 to 100 inclusive that maintain a co-prime relationship with the supplied integer, adhering to the principle that two numbers are deemed co-prime if their greatest common divisor (GCD) i... | evolcodegolf |
Could the Given Tune be Played on the Faulty Keyboard?
Explanation
A malfunctioning musical keyboard features keys labeled with positive integers and exhibits two major defects:
1. The delay in note production is significant: pressing the key marked with the number \$n\$ results in a wait of \$n\$ seconds before the c... | evolcodegolf |
A positive integer \$k\$ qualifies as a Loeschian number if it can be expressed in the form of \$i^2 + j^2 + i \times j\$ where \$i\$ and \$j\$ are integers.
To illustrate, the initial positive Loeschian numbers include: \$1\$ (\$i=1, j=0\$); \$3\$ (\$i=j=1\$); \$4\$ (\$i=2, j=0\$); \$7\$ (\$i=2, j=1\$); \$9\$ (\$i=-3... | evolcodegolf |
The following intricate puzzle was posed in a puzzling SE forum and is particularly challenging to solve manually, as each answer intricately depends on others. For instance, if every response is A, it creates a contradiction between question 7 and question 8. A suggestion from a participant on puzzling SE proposed dev... | evolcodegolf |
The non-negative integers, feeling quite unchallenged by their routine of always being flanked by the same two neighbouring values, have decided to engage in a bit of reorganization within their ranks. However, their inherent laziness propels them to remain as near as feasible to their original positions. Thus, they de... | evolcodegolf |
Let us delve into an exploration of a conventional iterative structure, typically executing exactly 8 iterations, formulated as follows:
for (int x=0; x<8; ++x);
Your objective is to transform this into an infinite loop!
This challenge serves as a competitive arena for programming languages that facilitate such const... | evolcodegolf |
A recent inquiry on Stack Overflow seeks an efficient method, ideally a succinct one-liner, to produce a comprehensive list of integers alongside their negative equivalents in the Python programming language. Given two integers where \$1≤a≤b\$, the task is to systematically generate all integers \$x\$ such that \$a≤|x|... | evolcodegolf |
Your task is to reproduce the text of Martin Niemöller's poignant poem, "First they came...", ensuring that the formatting—including newlines and empty lines—remains precise. This is a code-golf challenge, thus your solution must achieve the shortest possible code in bytes. You are permitted to use additional whitespac... | evolcodegolf |
Organize the Textbook Collection
As the academic year approaches, it's crucial to arrange our textbook collection effectively. Instead of manually sorting the books in alphabetical order—which can be labor-intensive—you opt to devise a program to automate the process.
Examples
Input:
_
| | _
|F| | |
|o|_|P|
|... | evolcodegolf |
Given the subsequent parameters to the application:
Collection of initiating block symbols
Collection of terminating block symbols
A string designated for formatting
Structure the string by enclosing it within the specified blocks, delineated by the two sets of characters with appropriate indentation. The indenta... | evolcodegolf |
Key Links
Dwarf question
Chat room
Game
Controller Interface
Troll league table
<script src="https://ajfaraday.github.io/Thud/dist/data/tables.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><table> <thead> <tr> <th>Client</th> <th>Wins</th><th>Loses</th> <th>Sco... | evolcodegolf |
Evaluate a word or string with a specified length \(n\), which is composed solely of the characters A-Z and a-z. A word/string qualifies as a double prime word if, and only if, the length \(n\) itself is a prime number and the cumulative sum of the letters, denoted as \(s\), also represents a prime number. This sum is ... | evolcodegolf |
**Scenario**
You are a curator of a museum, and your management is considering restructuring the exhibition spaces due to an influx of artifacts. This is inspired by a complex problem presented at a recent international conference.
**Task**
You are tasked with determining the maximum number of artifacts displayed ... | evolcodegolf |
The WPA2 protocol, which currently represents the encryption standard ensuring security across modern wireless networks, has unfortunately been compromised. However, the focus of this task diverges from the means by which the WPA2 was breached; instead, it centers on the intricate computation of the 64-digit hexadecima... | evolcodegolf |
I have developed a novel programming language named Brussels-Sprout. This language operates on an array consisting of 256 boolean values, all set to zero upon initialization, accompanied by a singular instruction pointer and a designated "bit index".
Upon execution of each (non-branching) instruction, the instruction... | evolcodegolf |
Challenge
Your task is to generate a string utilizing this intricate sequence:
1,1,2,1,1,2,3,2,1,1,3,2,4,2,3,1,....
Which can be comprehended more effectively in this format:
1
1 2 1
1 2 3 2 1
1 3 2 4 2 3 1
1 4 3 2 5 2 3 4 1
The underlying pattern systematically increases the number of digits in the... | evolcodegolf |
Imagine the popular game, The Six Degrees of Kevin Bacon, which posits that every actor in Hollywood is linked to Kevin Bacon through no more than six co-starring relationships. Consequently, he is purportedly the most interconnected individual in this conceptual graph. Your challenge is to identify the actor who serve... | evolcodegolf |
An interesting variant of the classic Egyptian fraction representation can be constructed using odd integers instead of the general set of distinct positive integers. For any positive integer \$ n \geq 1 \$, there exists at least one Egyptian fraction formed by the sum of distinct unit fractions whose denominators are ... | evolcodegolf |
Consider the formulation of a function \$f\$ which, when provided with a positive integer \$x\$, computes and returns the aggregate of:
\$x\$
the least significant digit extracted from the decimal representation of \$x\$
the most significant digit present in the decimal representation of \$x\$ (which might coincide ... | evolcodegolf |
Implement a pendulum encoding mechanism, given a string input (in any suitable format your language permits). The test cases, which are delineated into distinct items (unquoted for clarity), provide a visually coherent demonstration of the encoding process. What steps must I undertake to achieve this?
The iteration in... | evolcodegolf |
Consider the definition of a particular sequence where we denote \$a(n)\$ as the minimal integer, \$x\$, exhibiting the following characteristics:
1. The integer \$x\$ is co-prime to \$n\$ (i.e., they do not share any prime factors).
2. The integer \$x\$ has not been previously included in the sequence.
3. The absolut... | evolcodegolf |
Robbers' challenge thread has officially commenced.
Cops' challenge: Conceive a programming language that, at first glance, appears entirely impractical for any form of programming, yet permits computation (or at least achieves task completion) via a mechanism that is not immediately apparent. Your task involves craf... | evolcodegolf |
Background
The Zundoko Kiyoshi function finds its inspiration from a tweet by kumiromilk. Translated from Japanese, it conveys roughly the following:
The exam for my Java lecture featured a challenge that stated, "Implement and describe your own function." I opted to create one that continuously outputs either "zun"... | evolcodegolf |
Context
From Wikipedia:
A polyomino is a plane geometric figure formed by joining one or more equal squares edge to edge. One-sided polyominoes are distinct when none is a translation or rotation of another (pieces that cannot be flipped over). Translating or rotating a one-sided polyomino does not change its shape... | evolcodegolf |
The task involves devising an efficient strategy for arranging a set of specified geometric figures within a confined area. This challenge is reminiscent of the classic game of Tetris, where the objective is to align the assorted pieces as closely together as possible to minimize voids.
An effective arrangement entai... | evolcodegolf |
In the realm of integer-based computational mathematics, remarkable visual patterns emerge when these integers are systematically arranged on a two-dimensional grid. Even the simplest arithmetic operations can result in intricately beautiful designs!
Your challenge
Compose three concise Tweetable function bodies, each... | evolcodegolf |
Task
Construct a program that generates yet another unique program as its output, continuing this recursive generation process, while minimizing both the variety of distinct characters utilized and the total byte count involved. The initial program, designated as program 1, should produce program 2, and upon executio... | evolcodegolf |
Proposed by @Adám in chat, devise a mathematical function of the form \$y=mx+b\$ that effectively bisects a given set of an even number of finite points, ensuring equal distribution on either side.
Specifications
Utilize a collection of distinct coordinate pairs \$(x,y)\$ (alternatively, a separate list for x-coordi... | evolcodegolf |
Given a matrix of integers \$M\$ and a list of four integers \$L\$, determine the sub-matrix \$N\$ whose corners are dictated by \$L\$ and compute the sum of its elements while also ensuring that the sum is outputted as an absolute value. Suppose you're given the list \$L = [-8, -3, 2, 9]\$ and the following matrix \$M... | evolcodegolf |
This task is inspired by Monday Mini-Golf #6: Meeesesessess upp teeexexextext
Background
ETHproductions experiences significant difficulty when attempting to input text on his standard webpage. Whenever he utilizes digits or letters, the text becomes meeesesessessesseesseessedessed up. Your responsibility is to assist... | evolcodegolf |
Description
Your task is to process a given string by transforming the initial character of each word to uppercase while ensuring that all subsequent characters are in lowercase. Furthermore, consider potential edge cases such as punctuation, whitespace variations, and mixed casing that could influence the outcome. ... | evolcodegolf |
Initially proposed as part of a CMC for the preceding BMG event, this task presents a challenge involving a non-negative integer \$n\$. Your goal is to construct a 2D array of dimensions \$2^n × 2^n\$ following a specific generation method:
Firstly, segment the matrix into four distinct quadrants, each of size \$2^{n-... | evolcodegolf |
The assignment at hand involves the creation of a program or function designed to process a complex traffic intersection structure and subsequently generate a detailed sequence in which vehicles will navigate through. The output should adhere to a specific format comprising no more than four lines, each formatted as #.... | evolcodegolf |
The calculation of the determinant for a 2 by 2 matrix structured as follows:
a b
c d
is defined by the expression ad - bc. Now, for a given matrix composed of digits with dimensions 2n by 2n, where n is greater than or equal to 1, your task is to output the resultant value achieved by recursively determining th... | evolcodegolf |
Given two real numbers (positive or negative) in the limits of float-point number data types, i.e., (\$-3.4e38\$ to \$3.4e38\$) not inclusive, you should output the maximum of the two reversed numbers, ensuring that you account for leading zeroes in the output while maintaining a non-negative result if both inputs are ... | evolcodegolf |
At the time of composing this intricate puzzle, there are soon to be 269 puzzles pertaining to primes. To commemorate or lament this milestone (269 being a prime number), this challenge will delve into the concept of exploding primes. In preparation for this endeavor, I've acquired a permit (entirely legal, I assure yo... | evolcodegolf |
An emirp is a non-palindromic prime which, when reversed, is also prime.
The list of base 10 emirps can be found on OEIS. The first six are:
13, 17, 31, 37, 71, 73
However, due to the reversal rule, emirps are different in each base. For example, the first six binary emirps are:
Bin | 1011, 1101, 10111, 11101, 10100... | evolcodegolf |
A challenge has arisen regarding the establishment of a tennis court orientation, originally proposed by Daniel to align in the North-South direction. In response, I suggest considering the alternative of constructing a court oriented in the East-West direction as well. Your task is to generate a text representation of... | evolcodegolf |
Background
A Jordan matrix can be characterized as a block-diagonal matrix wherein each diagonal block adheres to the structure of
$$
\begin{bmatrix}
\lambda & 1 & 0 & \cdots & 0 \\
0 & \lambda & 1 & \cdots & 0 \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
0 & 0 & 0 & ... | evolcodegolf |
The Challenge
Develop a program that systematically dissects an input chemical formula (refer to the example below), producing an output that details each individual atom alongside its respective quantity in the format element: atom-count.
Input
Sample input:
H2O
Your program should be able to handle inputs containin... | evolcodegolf |
Background
Numerous esoteric programming languages lack intrinsic number literals, necessitating calculations at runtime; often, the representation of numbers in such languages can be intriguingly complex. Having previously tackled a challenge about representing numbers in Underload, this task focuses on the representa... | evolcodegolf |
A Friedman Number is defined as a positive integer that equals a non-trivial expression utilizing its own digits combined with various operations such as addition, subtraction, multiplication, division, exponentiation, parentheses, and concatenation. A Nice Friedman Number enhances this definition by ensuring that the ... | evolcodegolf |
Carry sort is an \$O(n)\$ "sorting" algorithm that effectively arranges elements in a sequence. The mechanism involves traversing a list from left to right while "carrying" the largest item encountered so far. Upon finding a larger item, it replaces the carried item with this new one, depositing the previously held ite... | evolcodegolf |
Given integers k and n, generate a sequence of n unique k-tuples of pairwise coprime integers, ensuring that the sum of the integers in each tuple is even. Every such tuple must occur once eventually, meaning that for any existing k-tuple of pairwise coprime integers, there exists some n that will ultimately generate i... | evolcodegolf |
Create a concise script characterized by minimal byte size that takes a single word as input, reverses its characters, and subsequently shifts each alphabetical character to its immediate successor in the English alphabet.
Examples:
input: hi
output: ji
input: hello
output: pmmfi
input: test
output: utf... | evolcodegolf |
Given an integer n, please compute and display the nth iteration of the Hilbert Curve represented in ASCII using the characters _ and |, ensuring that the output adheres to the specified formatting. Here are the first 4 iterations for reference:
n=1
_
| |
n=2
_ _
| |_| |
|_ _|
_| |_
n=3
_ _ _ _
| |_... | evolcodegolf |
Formulate a program that takes a positive integer n as input and generates an "isosceles" triangle composed of #'s, ensuring that the height of the triangle is exactly n and that each line is centered within a width equal to the base of the triangle, which is calculated as 2n-1.
Examples:
n=3
#
###
#####
n=1
#... | evolcodegolf |
Let's proceed with the ongoing series of challenges centered around Fibonacci sequences. The forthcoming task involves a multi-faceted approach:
**Task**
Construct an ASCII-art representation of a Fibonacci spiral consisting of n segments, starting from the initial term, adhering to the following detailed stipulatio... | evolcodegolf |
Transform a given two-dimensional array into a diamond-shaped representation, where the top-left element occupies the apex, the anti-diagonal delineates the central tier, and the bottom-right element resides at the base. For instance, examine the following numerical grid:
1 2 3
4 5 6
7 8 9
The diamond-shaped o... | evolcodegolf |
Design a program that generates a shuffled sequence of unique characters from a given string. Your input will consist of:
S, a string of distinct characters,
N, the desired length of the output sequence.
Output a new string containing N characters randomly selected from S, ensuring no character repeats. You must incl... | evolcodegolf |
Objective:
The aim is to compute the value of e raised to the power of a given real or imaginary number N (for instance, 2, -3i, 0.7, 2.5i, but excluding 3+2i). This challenge is framed within the context of code golf, so the shortest code (measured in bytes) is the goal.
For illustration:
N = 3, e^N = 20.085539... | evolcodegolf |
Task
Given a UTF-8 encoded string (which may be provided through various methods), determine and produce an equivalent list that indicates the precise number of bytes utilized to encode each respective character in the input string, ensuring to consider the complexities of multi-byte characters.
Examples
! → 1
... | evolcodegolf |
The task
This challenge presents a straightforward yet thought-provoking requirement.
Your input consists of a rectangular 2D array of integers, ensuring it has dimensions of at least 1×1.
This array can be provided in any reasonable format that accommodates such structures.
Your output must mirror the input array, alb... | evolcodegolf |
In a digital realm, players engage in an intricate numeral challenge called "Twist-Turn." The game involves a specified number of participants arranged in a spiral formation. Each player, in their turn, must assess:
1. What is the highest multiple of 9 that divides the current turn number?
2. How many occurrences of t... | evolcodegolf |
As you embark on your inaugural day at PPCG Inc., stepping into the role of our latest junior assistant document sorter, your principal task is to ensure that all incoming documents are meticulously archived in strict alphabetical order. While it may seem deceptively simple, akin to a monkey's task, we must inform you ... | evolcodegolf |
All credits to Adnan for devising this intriguing challenge.
My final challenge, prior to taking a break.
Task
Given a positive integer n, if n possesses the attribute of being odd, produce the character '/' repeated n times; conversely, if n has the property of being even, produce the character '\' repeated n ti... | evolcodegolf |
In this computational challenge, your task is to process an input image file by performing a cropping operation that transforms it into a square format, specifically retaining only the central segment of the original image. The solution must accommodate images in landscape, portrait, or square orientations. The output ... | evolcodegolf |
In chess, Forsyth-Edwards Notation, more commonly called "FEN", serves as a textual methodology for transcribing boards, detailing each of the eight rows (referred to as "ranks" in chess) from the top down, viewed from White's perspective. The notation employs the letters K (king), Q (queen), R (rook), B (bishop), N (k... | evolcodegolf |
The spooky season of Halloween is fast approaching, and I find myself in a bind as my home remains undecorated. Therefore, I require your assistance to creatively fulfill this task while also ensuring that each decorative element maintains a consistent aesthetic throughout the display.
Input
The input will be a lis... | evolcodegolf |
You may have encountered an intriguing contraption referred to as a "perpetual dice calendar":
Two 6-sided dice can be arranged and oriented in various ways. The first die features the integers 0, 1, 2, 3, 4, and 5, while the second die showcases the numbers 0, 1, 2, 6, 7, and 8. This ingenious setup allows for the r... | evolcodegolf |
Utilizing Practical Golf - US States as a reference point, your objective is to accurately determine the chemical symbol (abbreviation) of a specified element based on its full name, up to and including ununoctium (118). For reference, consult the periodic table available on Wikipedia. Thanks to the invaluable resource... | evolcodegolf |
Transform text into a DNA sequence
Objective
Translate the provided input into a corresponding DNA output.
Methodology
1. Convert the string into ASCII numerical representations (e.g., codegolf -> [99, 111, 100, 101, 103, 111, 108, 102])
2. Concatenate the ASCII values into a single string (e.g., 991111001011031... | evolcodegolf |
Fermat's Last Theorem, considered under modular arithmetic with respect to n
It is a well-established mathematical theorem that asserts for all prime integers \$p>2\$, there do not exist any positive integer solutions \$x, y, z>0\$ such that \$x^p+y^p=z^p\$. Nevertheless, this theorem does not hold universally when w... | evolcodegolf |
Welcome to the hackers' enclave. The defenders' vault is located here. Your mission is to dissect an encrypted file from the defenders' vault and unveil the untouched source code. Once you've decrypted their file, please leave a comment on the defender's post to share your discovery. | evolcodegolf |
The totient function, denoted as \$\phi(n)\$ and also referred to as Euler's totient function, is characterized by quantifying the total number of positive integers that are less than or equal to \$n\$ and exhibit the property of being relatively prime to \$n\$ itself, meaning they share no common factors with \$n\$ (w... | evolcodegolf |
Demonstrate the overzealousness of anti-virus software by crafting a program that merely opens, processes, and alphabetically sorts a CSV file, which nonetheless gets erroneously flagged as a virus (or malware, spyware, or any other form of threat) upon execution.
Your submission will be evaluated according to the fo... | evolcodegolf |
Consider a series of hexadecimal digits, such as
A B C 0 0 0 0 F 0 0 1 0 2 3 3 3 3 0 4 0
We define a contiguous subarray of length ≥ 4 as a segment if at least 75% of the digits are identical and both the first and last digits match the predominant digit. Additionally, a segment is considered maximal if it is not ... | evolcodegolf |
What intriguing results emerge when one amalgamates the structures of Pascal's Triangle and the Fibonacci sequence? Your task is to elucidate this relationship through mathematical construction.
Task
Devise a triangle that visually corresponds to the following arrangement:
1
1 1
2 2 ... | evolcodegolf |
Introduction
This technical exercise presents a formidable challenge involving extensive Document Object Model (DOM) manipulation and addressing various potential complexities associated with hierarchical data structures inherent in the DOM.
This task captivates interest due to the constraints which compel us to a... | evolcodegolf |
The majority of individuals present possess a foundational understanding of seven segment displays, which also play a role in solving matchstick puzzles. Below, you will find the graphical representation of the digits 0 through 9 and the letters a through z, excluding k, m, t, v, and w.
```
_ _ _ _ ... | evolcodegolf |
TeaScript, an advanced JavaScript golfing language developed by the StackExchange PPCG community member known as Downgoat, efficiently compiles to standard JavaScript while incorporating numerous advantageous features specifically tailored for code golfing.
Please provide a detailed enumeration of effective TeaScript ... | evolcodegolf |
The task is to exhibit any of the 128 possible states of a 7-segment display in a visually striking manner. Your program must accept a string of 7 characters ("bits") that are exclusively 0 or 1. The first bit of input corresponds to segment A in the following illustration, the second to B, and so forth (excluding dp):... | evolcodegolf |
In this challenge, you are a gardener tasked with connecting various plants to a central water source.
Challenge
The plants and water source are arranged on a grid.
You can connect a plant or water source to the nearest adjacent plant or water source to its north, south, east, and west.
The water source can have any n... | evolcodegolf |
Introduction
A quine is a program that outputs its own source code. For example, a well-known Python quine is _='_=%r;print(end=_%%_)';print(end=_%_). Running it outputs _='_=%r;print(end=_%%_)';print(end=_%_), therefore it is a valid quine. An error quine is similar to a regular quine; however, it must output to STD... | evolcodegolf |
Eliminate every instance of consecutive newline characters, meaning that each occurrence of two newline characters appearing adjacently should be removed, while single newline characters should remain unaffected.
Example:
echo -ne 'a\n\nb\nc\n\n\n\nd\n\n\n' | your-command
should produce the same result as
echo... | evolcodegolf |
Given a positive integer, your task involves a multi-step reasoning process to identify and output a comprehensive list representing each unique cuboid configuration that can be formed by the integer's factors.
Explanations
A cuboid's volume results from the multiplication of its three side lengths. For instance, for... | evolcodegolf |
I recently encountered this intriguing language during a challenge, and it piqued my interest greatly. Can anyone share specific strategies or insights for code-golfing effectively in MarioLANG while also considering potential pitfalls to avoid? Please ensure that you post one tip per response. | evolcodegolf |
While reflecting on my earlier programming endeavor, I considered the possibility of enhancing that specific challenge without altering the original. Thus, I present a new version below!
Challenge
Given a numerical input n,
create an ASCII art representation of a cake with n layers when viewed laterally,
featuring t... | evolcodegolf |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.