instruction_seed stringlengths 29 40.5k | source stringclasses 6
values |
|---|---|
In this intriguing mathematical exercise, you are tasked with analyzing and computing values from a distinctive sequence defined by a specified operation on a nonnegative integer input. You are to begin by reversing the binary representation of this integer, ensuring that no leading zeroes are present in the input. Sub... | evolcodegolf |
Input
A string S of length between 2 and 30. The only letters in the string will be a or b.
Output
All strings within Levenshtein distance 2 of S, while ensuring that each output string maintains a distinct character count (i.e., no string should have more than one letter repeated consecutively). You must output... | evolcodegolf |
Imagine navigating a grid, but this time with a twist: you can only move along the boundaries of a polygon defined by a sequence of vertices. Your task is to create a program that takes a list of vertices representing the corners of a non-intersecting polygon and a starting point located at one of the vertices. The goa... | evolcodegolf |
Challenge Derived from an Academic Coding Competition
Although this task is designated as Day 0, the preceding challenge was relatively simplistic and could easily replicate another problem presented here.
Tetris, a classic video game that gained immense popularity during the 1980s, revolves around strategically p... | evolcodegolf |
As part of the Code Golf Advent Calendar 2022 event, which you can learn more about in the linked meta post, I find myself contemplating a curious numerical definition while on a flight to Hawaii for a well-deserved vacation, using a deck of cards labeled from 1 to \$n\$. Intrigued, I define what I refer to as the "mag... | evolcodegolf |
Engage in the exploration of the Mesoamerican calendar, specifically the Xiuhnelpilli as utilized by the Aztecs (or Mexica) for year designation. Each year is characterized by a sequential number paired with a specific sign, which is evident from the provided sequence. Examine the cyclical nature where each year number... | evolcodegolf |
Challenge:
Given a word, meticulously determine whether or not it qualifies as an isogram while adhering to specific format constraints.
What:
An isogram is defined as a word composed exclusively of letters without duplicates (case insensitive). It is important to note that the empty string is considered an isogram. F... | evolcodegolf |
Output/print this block of characters:
abcdefghij
klmnopqrst
uvwxyzABCD
EFGHIJKLMN
OPQRSTUVWX
YZabcdefg
hijklmnopq
rstuvwxyz
0123456789
0987654321
Acceptable formats include:
Trailing newlines/whitespace
List of strings
List of lists of characters
List of lists of integers
However, list of integers is not acceptable... | evolcodegolf |
Dynamic dungeon escape with evolving threats
Your challenge is to develop an algorithm that, given a two-dimensional array representing a dynamic dungeon environment, computes the maximum number of treasures the adventurer can collect without triggering the awakening of evolving guardians. The elements in this array i... | evolcodegolf |
A segment of your personnel is struggling with dysfunctional capslock keys, and budget constraints prevent you from acquiring replacements. Assist them by devising the most succinct code possible to rectify their text! The objective is to invert the case of each character in a provided string, shifting uppercase letter... | evolcodegolf |
Generate a sequence comprising the integers 1 through 16, or alternatively, any collection of 16 unique elements. Following this, engage in a process of repeatedly selecting and displaying a value at random from the previously generated set of 16 items. This selection should continue until a singular item has been disp... | evolcodegolf |
In the recently concluded contest, participants are invited to read the comments on blobs to assess their scores. This game of King of the Hill is inspired by Primer's Natural Selection Simulation, wherein your entity is a blob tasked with the critical objective of survival by consuming pellets to replenish energy, whi... | evolcodegolf |
Inspired by the peculiar incident where a unit test failed exclusively on Sundays, devise a program or function that intentionally raises an error whenever it detects that the current day is Sunday, while ensuring that it exits gracefully on any other day of the week, and additionally implement a logging mechanism to d... | evolcodegolf |
You are presented with four distinct integers: p1, p2, p3, and p4. The magic sum of these integers is computed as follows: magic_sum = |p1 - p2| + |p2 - p3| + |p3 - p4| + |p4 - p1|. Your task is to modify only one of these integer values (p1, p2, p3, or p4) in such a way that the magic sum reaches its minimum possible ... | evolcodegolf |
Numbers known as repdigits can be represented by the equation a * (10^n - 1)/9, where a ranges from -9 to 9 excluding 0 (examples include 111, -3333, and 66, which consist entirely of repetitions of a single digit).
Your task is to develop a program or function that takes a single positive integer N and systematicall... | evolcodegolf |
I seek either suggestions or illustrative examples of well-known proverbs or sayings transformed into code! Please provide a link to a website or database containing such examples, and share your personal favorite, accompanied by a brief explanation of why you find it noteworthy.
Examples:
while(!(succeed = try()))... | evolcodegolf |
I am attempting to utilize C# to determine the index of the initial occurrence of a 1 bit (traversing from right to left) within the binary format of a given integer. To illustrate, the binary representation of 100 is:
0b1100100
Thus, the first 1 appears at the third position from the right, resulting in an output of ... | evolcodegolf |
Given a positive integer \( n \), produce a numeric meter output formatted in a specific manner as illustrated below:
0 1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 2
In this scenario, the input integer is 20. More precisely, the decimal representations of the integers are organize... | evolcodegolf |
Monday Mini-Golf: A series of short code-golf challenges, posted (hopefully!) every Monday.
Numerous web applications (particularly social media platforms) are programmed to truncate extended passages of text to conform to specific formatting requirements within the application. In this intricate challenge, the task ... | evolcodegolf |
In a world where punctuation marks are often repurposed for unique tasks, a new challenge arises. Certain characters, such as @ and *, have been utilized as alternative delimiters. However, their ambiguous nature leads to confusion in interpretation. For example, the sequence:
@@@@
could signify:
{{}}
or
{}{}
Th... | evolcodegolf |
Using the 74 characters from the 2024 memory vault sequence
L@!*~^#`&?8|w`Z^(T!~_0%L~]o+P{`p%/7)B!~|K^+5R`~m:|!C<>~O.@k&y`!X%1n~)9|[
craft M distinct code snippets, all in the same programming language, where:
The 1st snippet computes and outputs 1.
The 2nd snippet computes and outputs 2.
The 3rd snippet computes ... | evolcodegolf |
In the spirit of creativity and self-expression, let’s take a journey into the world of love through the lens of code! For this task, you are invited to write a program that generates a series of intertwined hearts, with the option to customize their dimensions and colors. The user should be able to input a number that... | evolcodegolf |
The illustration presented above is referred to as a hexa-glyph. Hexa-glyphs are intricate geometric patterns I devised during my Differential Equations lecture. Here’s the detailed process to construct one:
First, consider the following array of coordinates, organized in the shape of a regular hexagram. The central h... | evolcodegolf |
Given a sequence of lowercase letters, perform the following intricate tasks:
For each character, ascertain the prime factorization corresponding to its index within the English alphabet. For every identified prime factor, denoted as p, construct a diamond shape with a side length of p and position the character at th... | evolcodegolf |
Imagine you are well-versed in the traditional game of snakes & ladders, which is quite common among players. Picture a 10x10 board structured as illustrated below:
=============================================================
| | | | | | | | | | |
| 100 | 99 | 98 | 97 | 96 |... | evolcodegolf |
Considering that June 2021 has designated Red as the Language of the Month, could you provide several insightful tips for engaging in golfing using the Red language? Each suggestion should demonstrate a clear relevance to Red's specific characteristics and nuances, ensuring that general advice (like "remove comments") ... | evolcodegolf |
The objective is to derive an exhaustive enumeration of all potential two-card combinations for Texas hold'em starting hands, ensuring efficiency in coding length while maintaining clarity. A legitimate hold'em hand is constituted by selecting two unique cards from a standard 52-card deck, where the specific order in w... | evolcodegolf |
Imagine a world where mathematical expressions are not just limited to simple operations, but also involve manipulating and transforming strings to represent intricate relationships.
The Challenge
Given a string that represents a series of operations, you will evaluate the result based on a unique evaluation system... | evolcodegolf |
Below are an enhanced set of requirements.
The following commands (for an interface to the game):
attack <target>, <move>
goto <place>
buy <item>
enum <
targets,
moves,
places,
items,
stats
>
The following player stats must be maintained:
HP
MP/SP (Mana/Stamina)
XP
Level
Gold
Items
Equipment
Sco... | evolcodegolf |
Craft a succinct script that outputs to standard output, or the equivalent in your programming language of choice, precisely 100 lines of syntactically correct Java code commencing with:
class Tuple1 {public Object _0;}
class Tuple2 {public Object _0,_1;}
class Tuple3 {public Object _0,_1,_2;}
class Tuple4 {public Obje... | evolcodegolf |
Create a sophisticated version of a FizzBuzz implementation using strings with additional complexity.
Given
1 word or phrase (string)
2 unique characters
1 minimum length requirement for the input string (greater than 3 characters)
Output
The word or phrase with each occurrence of the first character replaced with F... | evolcodegolf |
### Mirror-Reflective Numbers
**Definition**
A number is considered mirror-reflective if it appears the same when reflected in a vertical mirror. This means the number maintains its appearance when viewed from the left side.
**Task**
Given a number as the input, determine if it is mirror-reflective or not.
**Ex... | evolcodegolf |
Envision a scenario in which we possess a collection of polyominoes that require unique identification; however, given that these polyominoes are subject to rotation, utilizing a straightforward hashing method would not yield a consistent fingerprint for the original piece and its various rotations (generally up to fou... | evolcodegolf |
A captivating octagonal grid can be constructed using hexagons as building blocks, exemplified below:
_________
/ \
/ \
/ \
\ /
\ /
\_________/
The illustration above depicts a tiling of size 1 (where each hexagon’s borders comprise a single / or \). A versi... | evolcodegolf |
Input
Take a comprehensive list of paired values xi and keys yi.
[(x1, y1), (x2, y2), ...]
Output
Return a distinct list L that exclusively comprises values from the set {xi}.
The length of L must correspond precisely to the total number of unique keys k present in the set {yi}. For each unique key k, you m... | evolcodegolf |
Your objective is to create a series of n distinct programs (or functions, or bodies of functions devoid of parameter usage or explicit function names) all written in the same programming language. The kth program is required to output the cardinal number k in standard English, formatted in lowercase (optionally conclu... | evolcodegolf |
The Task
Your task is to create a program or a function that, given an input, outputs the input text with random letters capitalized, while preserving already capitalized letters in their original state. Additionally, ensure that the program includes a mechanism to exclude specific characters from being capitalized, ... | evolcodegolf |
The challenge is inspired by the idea of transforming numbers through specific operations. Your task today is to take an input value where \$3 \leq m \leq 150\$ and produce a series of a and b characters. The output for the number M represents a sequence of operations performed on the number 1, where 'a' denotes "add 3... | evolcodegolf |
Let's engage in a thoughtful exploration of string multiplication, where the primary goal is to take an input string along with a positive integer and perform a concatenation operation of that string based on the given integer value. In Haskell, the definitions can be expressed as follows:
0 * s = ""
n * s = s ++ ((n ... | evolcodegolf |
When I was a child, I loved playing a game called Last Letter Story. In this game, each player takes turns contributing a sentence to a story, but the twist is that each new sentence must start with the last letter of the previous sentence's last word. The goal is to create the longest, most coherent story possible wit... | evolcodegolf |
Can this pattern be constructed with dominoes?
Challenge
A grid of width \$w\$ and height \$h\$ is provided, populated with two distinct values represented by 1s and 0s (which you may substitute with any two consistent non-textual symbols of your choice). You are allowed to place a domino on the grid only if both ce... | evolcodegolf |
I recently delved into the fascinating realm of graph theory, particularly hypercubes, and pondered intriguing methodologies to construct pathways upon them. Here’s a synthesis of my findings.
As you're likely aware, one can engineer an n-dimensional hypercube by assembling all n-tuples composed of 1s and 0s as verti... | evolcodegolf |
In the sport of curling, two competing teams strive to maneuver granite stones towards the centroid of a circular target, optimizing their placements for maximum proximity. The victor of any curling end is determined by identifying the team whose stone resides closest to the centre; points are allocated equivalent to t... | evolcodegolf |
Introduction
Recently, a few acquaintances and I decided to engage in a card game, and one of them proposed 'Irish Snap', which inspired this challenge. However, I later discovered that the game comprises various rules, some of which are outlined here. The rules pertinent to this challenge are not present on that pag... | evolcodegolf |
You are presented with a collection of logical statements. Your task is to identify and eliminate any that directly contradict others, ensuring that the removal occurs in the most efficient manner possible (i.e., by discarding the least number of statements necessary). Additionally, the program you create must also out... | evolcodegolf |
Alternate Title: Document Your Incarceration Duration on the Perimeter
Given a numeric input n, produce a representation of tallies organized into traditional clusters of five and a maximum of fifty per horizontal line.
Examples
1
|
|
|
|
4
||||
||||
||||
||||
5
|||/
||/|
|/||
/|||
6
|||/ |
||/| |
|/|| |
/||| |
5... | evolcodegolf |
The parameters concerning the continuous knapsack problem are outlined below. For each item indexed from 1 to n, we are presented with a corresponding positive weight and profit. Additionally, a positive capacity is specified, representing the maximum weight that can be carried. The objective is to strategically select... | evolcodegolf |
A thorough compilation of guidance for Python programming exists, so my request pertains specifically to techniques that are directly applicable to utilizing the numpy, scipy, or pylab libraries. These could involve methods to condense existing code that already employs numpy, or strategies to optimize prevalent Python... | evolcodegolf |
Imagine a scenario in a treacherous forest where a group of adventurers must cross a series of narrow rickety bridges to escape a pursuing danger. Each bridge can only hold a maximum of two adventurers at once. The group has a single magical lantern that must be carried across to illuminate the way and ensure safety.
... | evolcodegolf |
We will engage in a strategic numerical challenge. Assume you possess a certain real, algebraic constant x. Starting from this value, you have the liberty to employ various arithmetic operations: specifically, you may add or subtract any non-zero integer, multiply or divide by a non-zero integer, or multiply by the ori... | evolcodegolf |
A string is categorized as a "prime string" if it cannot be expressed as a concatenation of multiple instances of the same substring.
Your objective is to create a program that, given a sequence of letters of length N (5 < N < 100), determines whether it is prime or not, while also ensuring that your solution can hand... | evolcodegolf |
This is the ASCII rendition of a fascinating programming challenge initially segmented by the request of Martin Ender.
**Introduction**
The Padovan Sequence (OEIS A000931), akin to the well-known Fibonacci Sequence, is a mathematical sequence defined through the summation of specific previous elements. It is initia... | evolcodegolf |
Church Subtraction
The theoretical underpinnings of lambda calculus have consistently captivated me, particularly the intricate emergent behaviors resulting from the application of higher-order functions to one another. Church numerals serve as elegant representations of natural numbers, constructed through the itera... | evolcodegolf |
As input, you are provided with a positive integer n. Your task is to output a corresponding code that adheres to the following multifaceted constraints:
1. The generated code must consist of at least 7 characters, depending on the value of n.
2. When the input value is less than 676,000, the output must be exactly 7 ... | evolcodegolf |
Exploration
Given a positive integer, \$k\$ (where \$1 \leq k < 30\$), visualize the function \$y = \mathrm{Im}((i+k)^x)\$ for \$x = -4\$ to \$x = 4\$ inclusive.
Here, \$\mathrm{Im}(p)\$ represents the imaginary part of the complex number \$p\$.
Note that \$\mathrm{Im}((i+k)^x) = (k^2 + 1)^{x/2} \sin\left(\frac{\... | evolcodegolf |
Crafting a Gaussian blur involves a sophisticated technique for achieving a smooth image blurring effect. This process entails generating a convolution matrix that interacts with an image's pixel data. In this endeavor, you are required to meticulously construct the aforementioned matrix, leveraging two crucial inputs:... | evolcodegolf |
Introduction
In today's session, we aim to confront a persistent challenge faced by first-year linear algebra students: the intricacies of matrix definiteness! It seems that this topic has yet to be fully explored in the form of a coding challenge, so let’s delve into it:
Input
A \$n\times n\$ symmetric Matrix \... | evolcodegolf |
Create a coding solution that appears to generate the name of a programming language, yet discreetly provides the name in reverse order while also including a comment in the code that hints at its intended function. For example, a Python script should visually seem to output "Python" but actually display "nohtyP". The ... | evolcodegolf |
The totient function \$\phi(n)\$, also referred to as Euler's totient function, is intricately defined as the quantity of positive integers \$\le n\$ that are relatively prime to \$n\$—that is, integers that do not share any common factors with \$n\$, including the fact that \$1\$ is universally regarded as relatively ... | evolcodegolf |
A string is designated as a "prime string" if it cannot be expressed as the concatenation of two or more identical substrings.
Your task is to develop a program that, given a sequence of letters with a length between 6 and 99 (inclusive), evaluates whether the string qualifies as prime or not. This evaluation should t... | evolcodegolf |
Devise a sequence of 7 assembly instructions (totaling 28 bytes) that effectively implements a logical equivalent of the following C code snippet:
c = a + b + 6;
while (c > 5) {
c = c - a;
b = b + 1;
}
It is imperative to adhere to specific restrictions regarding the permissible instructions, which i... | evolcodegolf |
The pervasive 7-segment numerical display, renowned for its clarity in exhibiting all 16 hexadecimal digits as illustrated in this Wikipedia .gif, presents an engaging challenge. Participants are tasked with crafting a detailed circuit diagram utilizing NAND logic gates to accurately transform the four bits of a hex di... | evolcodegolf |
Simulate the Typist's Quirky Input
Background
The Typist has a unique habit: every time they intend to write a punctuation mark, they inadvertently insert an extra space before it, and they often forget to capitalize the first letter of sentences. Their responses appear casual and erratic, often leading to confusion ... | evolcodegolf |
Construct a natural number utilizing the minimal quantity of ones, constrained exclusively to the operators of addition and subtraction. For instance, to express the number seven, one can employ 1+1+1+1+1+1+1=7, which requires seven ones; alternatively, it could be formulated as 11-1-1-1-1=7, demanding only six ones. Y... | evolcodegolf |
Challenge
In the context of two given integers, please calculate their quotient utilizing integer division. This means that when dividing one integer by another, the outcome should be the greatest integer less than or equal to the precise division result, thus effectively rounding down. Both the divisor and the divid... | evolcodegolf |
Your task is to devise a computational function or script that, upon receiving two distinct nonzero integers, denoted as x and y, produces a truthy result if the visual representation located at coordinates x units east and y units north of xkcd's interactive click-and-drag comic predominantly exhibits the color white,... | evolcodegolf |
When rolling a die, the likelihood of each option occurring is represented as a ratio of 6:1. In this scenario, a bookmaker begins with a total of £20. The bookmaker sets the odds at 4:1, enticing gamblers to place their bets due to the available funds. There are a total of 10 gamblers named A, B, C, D, E, F, G, H, I, ... | evolcodegolf |
Imagine a scenario where you have a collection of unique sequences of lowercase letters, each consisting of no more than six characters. Your task is to determine if all these sequences can be arranged within a three-by-three grid, where each character in a sequence must be adjacent to the next character in the grid la... | evolcodegolf |
The λ-calculus, often referred to as lambda calculus, constitutes a sophisticated logical framework predicated on the utilization of anonymous functions. Consider the following illustration of a λ-expression:
λf.(λx.xx)(λx.f(xx))
For the sake of this analytical task, we will streamline the notation for enhanced clarit... | evolcodegolf |
The objective is to generate a compact concatenated representation of the given input month numbers that remains intelligible through established parsing rules, requiring a multi-step reasoning process to account for potential separators. Specifically, apply the following guidelines:
- A separator must be inserted bet... | evolcodegolf |
This image captures a segment of text as presented in a typical text editing application:
Displayed herein is the same text enlarged for better visibility.
Observe the prominent aliasing effects, particularly on characters characterized by significant diagonal strokes such as x and z. This phenomenon serves as a prim... | evolcodegolf |
In the alternating Fibonacci sequence, you begin with the standard initial values of 1 and 1. However, instead of consistently summing the last two values to determine the subsequent number, you must alternate between addition and subtraction, starting with addition, and reversing the operation every other time. The se... | evolcodegolf |
Construct a computational function tasked with evaluating a specified matrix composed of binary elements, formatted either as a comma-separated string such as "xxxx,xxxxx,xxxx,xx.." or as an array of strings like ["xxxx","xxxx","xxxx",...]. The goal of this function is to ascertain the area of the most expansive square... | evolcodegolf |
(related: one, two, three)
An acrostic represents a distinctive style of poetry or written expression wherein the initial character of each line, when read in a vertical fashion, simultaneously generates a cohesive word or message. An illustrative example is:
Together
Everyone
Achieves
More
which, when scrutinized ve... | evolcodegolf |
Consider a square matrix \$A\$ of dimensions at least \$2 \times 2\$, with all elements being integers. The operation \$A^2 = A \times A\$ will yield a matrix that retains the same dimensions as \$A\$ and contains integer elements. As a practical example, let us define
$$A = \left[ \begin{matrix}
-3 & 2 \\
0 & -1
\... | evolcodegolf |
Inspired by Wzl
Determine whether a provided square binary matrix contains precisely one row or column composed entirely of 1s, while ensuring that every other element in the matrix is 0s, and elucidate the reasoning behind any false determinations.
For example, these are all true:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... | evolcodegolf |
You are presented with a non-empty array \$A\$ consisting exclusively of positive integers. However, the intrinsic value of this array diminishes if its constituent elements do not collectively yield the specified integer \$N\$, also provided as input. To rectify this situation, you are permitted to select any integer ... | evolcodegolf |
In the wake of the unfortunate passing of rock-and-roll pioneer Chuck Berry today, reflect on the chorus from his iconic track "Johnny B. Goode":
Go, go
Go Johnny go, go
Go Johnny go, go
Go Johnny go, go
Go Johnny go, go
Johnny B. Goode
(While various punctuation versions exist, the one above will suffice for this cha... | evolcodegolf |
In the latter part of the 20th century, specifically the 1990s, a group of COBOL computer engineers devised a sophisticated method to enhance six-digit date representations by transforming them into the format YYYDDD, wherein YYY denotes the year minus 1900 and DDD signifies the ordinal day within the year ranging from... | evolcodegolf |
Devise a program that utilizes the term “conemon” to output each individual character in a progressively increasing frequency, doubling the count of the preceding character. Specifically, the initial letter “c” must appear 10 times, followed by “o” appearing 12 times, and this pattern should continue accordingly for ea... | evolcodegolf |
Many of you may have interacted with people from Russia on the internet at some point, and a subset of you may have noticed the slightly odd method they have of expressing themselves.
e.g. удали игру нуб)))
where the ))) are added for emphasis on the previous statement. I have been working on a theory that the rati... | evolcodegolf |
Devise a function, denoted as f, that accepts a positive integer input and subsequently returns a new function. This returned function must replicate the behavior of f; however, upon executing the "termination call," f is required to calculate and yield the cumulative sum of all integers that have been provided during ... | evolcodegolf |
Delve into the intricate challenge of placing N sovereign chess pieces on an (NxN) chessboard. Two queens are deemed to be in a position to threaten one another if they occupy the same horizontal line, vertical line, or diagonal path. Develop a backtracking algorithm to systematically resolve this issue by arranging N ... | evolcodegolf |
This marks my inaugural inquiry into the domain of Code Golf, a challenge I stumbled upon while perusing Stack Overflow. The task is to generate an NxN grid (where N is constrained within the inclusive range of 1 to 16) on the display, such that each individual cell is bordered with a black line and contains a red nume... | evolcodegolf |
To enhance the complexity of the initial task, please create a representation of a unique visual multiplication technique commonly taught to Japanese schoolchildren [citation needed], which utilizes lines and intersections to arrive at the product.
Image Source
Your objective is to execute this concept using ASCII art... | evolcodegolf |
Develop a programming script that generates and displays the character :) a randomly determined number of times, specifically within the inclusive range of 1 to 255. Ensure that your output does not feature any spaces or additional whitespace characters. Additionally, provide a mechanism to calculate and present your s... | evolcodegolf |
The title serves as a tribute to the Natural Number Game, which provides an engaging and interactive tutorial for establishing various properties of natural numbers within the Lean programming environment.
In this revised version, the foundational definitions from Level 1 will be carried forward and refined further:
... | evolcodegolf |
You are aware that certain decimal values cannot be accurately represented as IEEE 754 floating points. Furthermore, you recognize that performing arithmetic operations with these floating points can yield results that appear incorrect, as illustrated by the following examples:
System.out.print(4.0-3.1); (source)
0.... | evolcodegolf |
Explanation:
In my previous math class, we occasionally encountered these deceptively simple yet thoroughly frustrating questions known as diamond puzzles. The structure of these puzzles involved presenting a sum and a product, after which we were tasked with identifying two distinct numbers that, when multiplied, yi... | evolcodegolf |
"Set" is a strategic card game that employs a uniquely designed deck consisting of 81 distinct cards, with twelve exemplars displayed below:
Each card possesses four defining attributes, each capable of assuming three specific values:
- Number: representing the quantity of symbols, which can be either 1, 2, or 3
- Sh... | evolcodegolf |
Tetration, denoted as \${}^ba\$, involves the concept of repeated exponentiation, where the exponentiation process is carried out multiple times. For instance, \${}^32\$ translates to the expression \$2^{2^2}\$, ultimately resulting in \$16\$.
Your task is to take two integers, \$a\$ and \$b\$, and compute the value ... | evolcodegolf |
Challenge description
A Smith number is defined as a composite integer for which the aggregate of its digits is equivalent to the cumulative total of the digits of its prime factors. Given an integer N, ascertain whether it qualifies as a Smith number or not.
The initial sequence of Smith numbers includes 4, 22, 27... | evolcodegolf |
To determine the difference between the cumulative sum of the squares of the initial n natural numbers and the squared result of their overall sum, we start with the evaluation of specific cases. For instance, the total of squares from the first ten natural numbers computes as follows:
\$1^2 + 2^2 + \dots + 10^2 = 38... | evolcodegolf |
Strassen's algorithm represents a groundbreaking advancement in the realm of matrix multiplication, specifically achieving subcubic time complexity quantified as O(n**log2(7)) when multiplying pairs of n*n matrices. This is particularly relevant under the assumption that the magnitudes of the numbers involved are suffi... | evolcodegolf |
My favored methodology for approximating a derivative is the central difference approach, as it exhibits greater accuracy than both the forward difference and backward difference techniques, and I prefer not to engage in higher-order approximations due to my limited enthusiasm. Nevertheless, the central difference tech... | evolcodegolf |
Develop an intricate program that initiates with the integer zero, subsequently generating a sequence comprising 100 random integers ranging from -9 to 9. The resulting sequence should be visually represented in a roller coaster format, where any increment in value is portrayed by an upward movement and any decrement i... | evolcodegolf |
Create a program that takes a birth date (month and day-of-month) as input and outputs the corresponding sign, element, and quality of the western zodiac, while also incorporating a feature that identifies and displays whether the input date falls on a weekend or a weekday. For the purposes of this challenge, these are... | evolcodegolf |
In this unique variant of a quine, your program is required to produce its own source code transposed diagonally from the top left corner to the bottom right corner. For illustrative purposes:
your program
on
four lines
outputs
yof
ono
u u
r r
p l
r i
o n
g e
r s
a
m
It... | evolcodegolf |
Exploring the concept of polymorphic return types in JavaScript can lead to intriguing design patterns, particularly when dealing with asynchronous operations that may yield various types, such as promises that return either an object or an error. Is there a way to create a consistent interface that unifies error handl... | evolcodegolf |
This is a problem on Luogu OJ. I decided to post it here because on Luogu OJ, many people, including me and my friend, are interested about how to solve this problem within the fewest characters while ensuring that the output ASCII-art retains proper alignment and aesthetics. Your task is to output the following ASCII-... | evolcodegolf |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.