문제를 풀었습니다


Get the mean digit
Write a function that gives the mean digit (round towards nearest integer) of an input and positive number. For example: x ...

5년 초과 전

문제를 풀었습니다


Alternate list of elements
Write a function that combines two lists by alternating the elements, e.g. ['a','b','c'], ['1','2','3'] → 'a1b2c3'.

5년 초과 전

문제를 풀었습니다


Snakes on a plane
Given the dimensions of a 2-d plane, create a matrix where a "snake" of ones occupies the plane from top left to bottom right. ...

5년 초과 전

문제를 풀었습니다


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

5년 초과 전

문제를 풀었습니다


Pluralization
Define function plu(n) that returns '' (an empty string) if n=1, or 's' otherwise. This is handy for displaying messages from a...

5년 초과 전

문제를 풀었습니다


Mean ignoring NaNs
Define a function that behaves in the same way as mean(x) and mean(x,d) except that it ignores NaNs (unless all of the values be...

5년 초과 전

문제를 풀었습니다


Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...

5년 초과 전

문제를 풀었습니다


Compute the perimeter of an ellipse
While the area of an ellipse is straightforward to compute, the perimeter (or circumference) is more complicated. The perimeter ...

5년 초과 전

문제를 풀었습니다


Without the French accent please!
Suppress the French accent. Example 'Déjà présent' -> 'Deja present'

5년 초과 전

문제를 풀었습니다


Ratio between sums of prime and non-prime numbers
Write a function that calculates the ratio between the sum of the prime numbers lower or equal than x, and the sum of the non-pr...

5년 초과 전

문제를 풀었습니다


Ratio between sum of primes and sum of factors
Write a function that calculates the ratio between the sum of primes numbers lower or equal to x, and the sum of the factors of ...

5년 초과 전

문제를 풀었습니다


Check if is a square
Given four coordinates, write a function to check if they form a square on the XY plane.

5년 초과 전

문제를 풀었습니다


Ackermann's Function
Ackermann's Function is a recursive function that is not 'primitive recursive.' <http://en.wikipedia.org/wiki/Ackermann_fun...

5년 초과 전

문제를 풀었습니다


Get the area of ​​the square.
Four circles are inscribed in the square ABCD. The perimeter of each circle is *aπ*. <<http://imgfz.com/i/UzgCJut.png>> Gi...

5년 초과 전

문제를 풀었습니다


Find max prime number
Given integer number n. Find the max prime number (mpn) that smaller than or equal to n. Example: n = 10 --> mpn = 7

5년 초과 전

문제를 풀었습니다


Finding sum of even numbers in a vector.
Find the sum of all the even numbers present in the input vector x. Examples: Input x = [1 2 3 4] Output y is 6 Input...

5년 초과 전

문제를 풀었습니다


How many monitors are connected ?
How to obtain the numbers of monitors connected to your computer ?

5년 초과 전

문제를 풀었습니다


Number of divisors of a given number
Given a Number n, return the number of his divisors without listing them example: n=14 ; Divisors={1,7,2,14} ; y=4 n=...

5년 초과 전

문제를 풀었습니다


Wind outward from the center ...
Create an n-by-n matrix with elements ranging from 1 to n^2 in a rectangular spiral pattern. Example if n = 5 : 21 ...

5년 초과 전

문제를 풀었습니다


Reepeating numbers in array
Repeating numbers in array In = [1 0 0 0 2 0 0 0 3 0 0 0 0 0 5 0 0 0 0]. Out = [1 1 1 1 2 2 2 2 3 3 3 3 3 3 5 5 5 5 5].

5년 초과 전

문제를 풀었습니다


Is there a GPU Device?
Return true if there is a supported GPU device available on the Cody computer.

5년 초과 전

문제를 풀었습니다


Make visible max values
Make visible maximum values of rows input = [1 2 3 4 5; 6 9 8 2 1; 2 1 4 5 8; 1 9 7 9 2]; ...

5년 초과 전

문제를 풀었습니다


Homemade: Control Charts
This problem is a simple version of control charts in statistics. Intput consists from 30 or more observations. * Upper limi...

5년 초과 전

문제를 풀었습니다


Power of n ?
Determine if _x_ (positive integer) is a power of _n_, return true or false accordingly.

5년 초과 전

문제를 풀었습니다


Sum Rows
Sum the same indexed (unique) rows. Examine the test suite. Related Challenge - <http://www.mathworks.com/matlabcentral/cody/...

5년 초과 전

문제를 풀었습니다


Find the biggest digit in a matrix
Write a function to find the biggest digit in a matrix; input -> a matrix output -> a digit For example; [12; 47;...

5년 초과 전

문제를 풀었습니다


Encode Roman Numerals
Create a function taking a non-negative integer as its parameter and returning a string containing the Roman Numeral representat...

5년 초과 전

문제를 풀었습니다


Longest Sequence of NaNs
In an array return the length of longest sequence of nans for each column. x = [ 2 3 1 2 5 6; nan nan 5 n...

5년 초과 전

문제를 풀었습니다


Double Factorial
Return double factorial n(n-2)...(5)(3)(1), n>0, odd n!! = n(n-2)...(6)(4)(2), n>0, even 1 ...

5년 초과 전

더 보기