问题


List odd twin composites
Twin primes, or prime numbers that differ by 2 (e.g., 17 and 19, 59 and 61, or 191 and 193), are the subject of several Cody pro...

4 years 前 | 1 | 10 个解题者

问题


Find the length of stream affected by a spill
When a contaminant is spilled into a stream, one might want to know how much of the stream is affected—e.g., the length over whi...

4 years 前 | 2 | 5 个解题者

已解决


Coin Distribution - 02
Prev prob <https://www.mathworks.com/matlabcentral/cody/problems/45385-coin-distribution> Given a set of coins and an amount,...

4 years 前

已解决


Prime Sum
What is the minimum value that can be written as sum of primes in n different ways? For example, 10 is the minimum value th...

4 years 前

已解决


Castling-02
This is a follow up of problem <https://www.mathworks.com/matlabcentral/cody/groups/1/problems/45329-castling-01> Given...

4 years 前

问题


Count the ways to make Scorigami
Regarding the sport known as American football, some people are such rabid fans that they can tell you the statistics of every p...

4 years 前 | 1 | 3 个解题者

已解决


Local Extrema
Given a 2D (m,n>1) matrix, replace an element if it is not a local extrema (minima/maxima), with 0 (zero). Check the 3 neighbou...

4 years 前

问题


Solve an ODE: concentrations predicted by the cells-in-series model
One approach for predicting mixing and transport of contaminants in a river is the cells-in-series model. The model divides a ri...

4 years 前 | 1 | 4 个解题者

已解决


AES SubBytes() Transformation
Given a 16x2 input character hexadecimal array representing the AES state, execute the AES algorithm SubBytes() transformation a...

4 years 前

已解决


From sorted to original
Given a soted list (vector) and the indexes list., how can we retrieve the original one. Example: The sorted is: sv=[-1 0 2 5...

4 years 前

已解决


Weird Diagonal Matrix!!
Given an integer n, create a matrix whose diagonal elements will be square matrices of size 1 to n. For example: n=2 z = ...

4 years 前

问题


Compute the period of a pendulum started from a finite initial angle
Cody Problem 49830 asks for the period of a pendulum swinging through a small angle. Here the pendulum started at rest from an ...

4 years 前 | 0 | 6 个解题者

已解决


Leyland Primes
A Leyland Number is defined as a number of the form - x^y + y^x, or, x^y - y^x (x,y)>1 Given an array of numbers(>1), check...

4 years 前

已解决


love is an n-letter word
Given a list of *N words*, return the *N-letter word* (choosing one letter from each word) with the property of having the least...

4 years 前

已解决


Draw a Diamond shape in ones Matrix with '0' s
Input will be odd numbers.The task is to make a Diamond shape in a ones matrix with '0's where the matrix will be a square matri...

4 years 前

已解决


Sum the Infinite Series II
For any x in the range 0 < x and x < 2*pi radians, find the sum of the following infinite series: c = 1 + 1/2*cos(x) + 1/2*3/4...

4 years 前

已解决


Propagate the effects of a blockage in a chemical plant
From the perspective of flow, a chemical plant can be described by a collection of _nodes_ and _edges_. _Nodes_ are points where...

4 years 前

已解决


The Google Interview: Two Eggs Problem
Consider the following problem, a popular Google interview question: A firm has invented a super-strong egg. For publicity pu...

4 years 前

已解决


List the households affected by leaks in water distribution
Consider the following water distribution network, where water is pumped uni-directionally from left to right: 8...

4 years 前

已解决


Yoonir - 03
Find the area of a seven-pointed star inscribed in a circle of radius r.

4 years 前

已解决


Maya - 03
Following up on the previous two problems, now you've to add or subtract two Maya numerals. The 3rd input will be a function ...

4 years 前

已解决


Maya - 02
<https://en.wikipedia.org/wiki/Maya_numerals> Prev. prob. - <https://www.mathworks.com/matlabcentral/cody/problems/45375-maya...

4 years 前

已解决


Maya - 01
Given a number, convert it into the Maya numeral system. <https://en.wikipedia.org/wiki/Maya_numerals> For example, n...

4 years 前

已解决


Weighted Convolution
Given two input vectors x = [x_1, x_2, ..., x_K] and y = [y_1, y_2, ..., y_K] of equal length, compute the weighted convolution ...

4 years 前

已解决


Weighted Names
A cell is given which contains several names. You've to return those names sorted by their weight. Weight is to be calculate...

4 years 前

已解决


Accurate Division
Given three integers x, y and d, return x/y (as a string) to d significant digits. Remove leading and trailing zeros. Example...

4 years 前

已解决


Determining if a Degree Sequence is Potentially a Graph
A degree sequence is a list of numbers representing the degrees of vertices in a graph. While it is difficult to tell if a graph...

4 years 前

问题


Spell musical triads
Chords form the basis of harmony in music. The most basic chords are triads, or groups of three notes. They are specified by thr...

4 years 前 | 1 | 3 个解题者

已解决


Valid Chess Moves
Using standard Algebraic notation ('' for a pawn), given previous move and a next move, output true if it is a valid move or fal...

4 years 前

加载更多