Solved


Easy Sequences 59: Almost Twin Primes
A positive integer pair , is called an "almost twin prime pair", if one of the pair is a prime and the other is either a prime o...

5 days ago

Solved


Difference of product and sum
Given a positive integer n, compute the difference between the product of its digits and the sum of its digits.

5 days ago

Solved


Easy Sequences 57: "Pretty-gorean" Triangles?
A positive integer is called a regular number, if and only if there exist a non-negative integer , such that . For some reason...

6 days ago

Solved


Easy Sequences 56: Counting "Ugly" Numbers
A positive integer is called a regular number, if and only if there exist a non-negative integer , such that . For some reason...

7 days ago

Solved


Fastest shortest-path-finder in the west
Given connectivity information about a graph, your job is to find the shortest-path distance between every pair of vertices in t...

7 days ago

Solved


Easy Sequences 54: Product of Products of Proper Divisors
A divisor of a number that is less than the number is called a "proper divisor". For a given positive integer , we are asked t...

7 days ago

Solved


Easy Sequences 53: Greatest Proper Divisor
The greatest proper divisor () of an integer is the largest integer , such that and . Furthermore, we define: . Below is the...

7 days ago

Solved


Easy Sequences 52: Non-squarable Rectangles
Any integer-sided rectangle can be cut into unit rectangles () and rearranged into sets of smaller rectangles. For example the ...

7 days ago

Solved


Easy Sequences 51: Positive Gaussian Primes
A Gaussian Prime is a gaussian integer that cannot be decomposed as product of two non-unit gaussian integers (the complex units...

7 days ago

Solved


Is it a mail?
Electronic mail, or email, is a method of exchanging digital messages between people using digital devices such as computers, mo...

7 days ago

Solved


Abelian Sandpile - 01
Generate a matrix like abelian sandpile where the center of the matrix is n. For example, n=3 out=[0 0 0 0 ...

7 days ago

Solved


Comparison of floating-point numbers (doubles)
<https://au.mathworks.com/help/matlab/matlab_prog/floating-point-numbers.html Floating-point numbers> cannot generally be repres...

7 days ago

Solved


nanoseconds passed today
Calculate the amount of nanoseconds passed in the current day of a certain date string.

7 days ago

Solved


A sequence of Ones
You are given number(s) with all digits - 1. Your answer will depend on the count of 1 in the given number, for example - x1...

10 days ago

Solved


Loading/Expanding a ZIP file from File Exchange
This challenge is to load a ZIP file from Mathworks File Exchange and UNZIP the contents. *Input:* url_link of ZIP'd file ...

10 days ago

Solved


Magic - Faro Shuffle
The Faro shuffle is the perfect interweaving of cards. Quiz: How many Faro's returns a standard 52 deck to its start? Fifty fo...

10 days ago

Solved


Regex match
Many regular expression engines have a simple function to quickly know whether a regular expression entirely matches a string or...

10 days ago

Solved


2D Indexes
Given in input the maximum degree P, the algorithm furnishes a ordered list of two dimensional vectors [i,j] i,j>=0 such that i+...

10 days ago

Solved


Kissing Circles-01
Three circles are mutually tangent to each other and also to a line. find the radius of the smallest circle. The radius of th...

10 days ago

Solved


Create a 3D rotation matrix
Consider an arbitrary coordinate frame {A}. Consider another coordinate frame {B} which has the same origin as {A} but is rotat...

10 days ago

Solved


Return the product of all elements of a vector or matrix without using built-in functions
Compute the product of all elements of the input array without using the built-in functions prod, ans, or size.

10 days ago

Solved


Find the nearest admirable number
Cody Problems 1012 and 2544 ask us to determine whether a number is perfect—that is, whether the sum of divisors is equal to ....

10 days ago

Solved


Input & Output "Smart One"
If i give my secret function a x value as input the result will be y value as output. Examples: input: x=6 ----->>> output: ...

11 days ago

Solved


Hoax Numbers
A Hoax Number (OEIS A019506) is defined as a composite number, whose sum of digits is equal to the sum of digits of its distinct...

11 days ago

Solved


Permute the unique values of a vector without sorting
Given a vector A, return the matrix B, wherein each row contains a permutation of the unique values in original vector while ret...

12 days ago

Solved


Remove Missing Values from a Table or an Array
Remove missing entries from an array or table. If A is a vector, then remove any entry that contains missing data. If A is a mat...

12 days ago

Solved


5-year Annedversaries
This is the Bonus Round problem for the 2025 Cody Contest. Attend the watch party on Friday, March 27 to see how 6 champions fro...

12 days ago

Solved


Is this function available?
Sometimes it is difficult to remember which functions are not allowed on the Cody platform. Given a function as a string, return...

13 days ago

Solved


Calculate triangle area
Imagine that you want to calculate the areas of some triangles given in matrix form. First the coordinates of the vertices of th...

13 days ago

Load more