문제를 풀었습니다


Get the elements of diagonal and antidiagonal for any m-by-n matrix (★★★★)
(copy of prob. 859) In this problem you must submit a solution which returns the diagonal and anti-diagonal elements without ...

5년 초과 전

문제를 풀었습니다


Move if I am Optimus Prime
If the number is a prime, roll out!

5년 초과 전

문제를 풀었습니다


Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

5년 초과 전

문제를 풀었습니다


Alkane
Given a number, x, that is equal to the number of carbon atoms in an <http://en.wikipedia.org/wiki/Alkane alkane>, find, y, the ...

5년 초과 전

문제를 풀었습니다


Create a matrix from a cell
In this problem , you must convert a cell into a matrix and pad each cell with NaN. *Example 1:* If you have the input...

5년 초과 전

문제를 풀었습니다


Set some matrix elements to zero
First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

5년 초과 전

문제를 풀었습니다


Angle between Two Vectors
The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

5년 초과 전

문제를 풀었습니다


RMS value from a set of observations
Find rms value of a set of observations of a physical quantity? Hint: The observations are accessed in the form of vectors

5년 초과 전

문제를 풀었습니다


Generate pi using logarithm
Generate pi using logarithm

5년 초과 전

문제를 풀었습니다


Creating a code via test suite :)
Given the test suites, create a code that would fit them :) *Clue: Pascal's Triangle

5년 초과 전

문제를 풀었습니다


How many bottles can you drink?
Sometimes if you buy a drink in a glass bottle you can return that bottle and get some money back. Let's assume we have "x" a...

5년 초과 전

문제를 풀었습니다


Kurchan 5x5 - Optimal Score
Related to Problems 1646 and 2650, but bigger. Technically, all you need to do for this Cody problem is input a 5x5 matrix conta...

5년 초과 전

문제를 풀었습니다


Low level NaN
* I have a dataset. Columns represents different variables. * A variable may start with NaN or any double type number. * If i...

5년 초과 전

문제를 풀었습니다


How many trades represent all the profit?
Given a list of results from trades made: [1 3 -4 2 -1 2 3] We can add them up to see this series of trades made a profit ...

5년 초과 전

문제를 풀었습니다


Select every other element of a matrix
Write a function called outMat = odd_idx( myMat ) that takes a matrix, myMat, as input argument and returns a matrix th...

5년 초과 전

문제를 풀었습니다


Replace values out of an interval with the lower or upper values
For a vector or matrix X and an interval [n1,n2], the function replace every element of x inferior to n1 by n1, and every elemen...

5년 초과 전

문제를 풀었습니다


What's the missing interior angle?
I'm talking about polygons... The sum of the interior angles of a triangle is 180 degrees. The sum of the interior angles of a...

5년 초과 전

문제를 풀었습니다


Calculate vowel / consonant ratio of a string
Given a string, calculate the ratio of vowels to consonants for example : x = 'This is a very good Day!' y = 7/11

5년 초과 전

문제를 풀었습니다


Frequency Analysis of Text
Frequency analysis is a common task in cryptoanalysis. It is essentially counting the occurrences of alphabets (regardless of ca...

5년 초과 전

문제를 풀었습니다


Pad zero between every adjacent values of the vector.
you are given a vector x. you have to make an output vector y with zeros padded between every adjacent values of x. e.g x: ...

5년 초과 전

문제를 풀었습니다


Repeat the entries of the vector to their reference times in the vector.
e.g for input x: [ 7 3 9 5] output y: [ 7 3 3 9 9 9 5 5 5 5]

5년 초과 전

문제를 풀었습니다


Matrix Manipulation
Given an m*n matrix, see if a matrix contains any 0s in any row. if it contains 0 anywhere in any particular row, delete that ro...

5년 초과 전

문제를 풀었습니다


row-th maximum row elements
Input a is a square matrix of size n*n. Output vector v is of size 1*n. The ith element of output v is the ith largest element o...

5년 초과 전

문제를 풀었습니다


Calculate the h-index
H-index is a powerful tool for quantifying the scientific contribution of a researcher. H-index is defined as follows (source - ...

5년 초과 전

문제를 풀었습니다


Generate Square Wave
Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...

5년 초과 전

문제를 풀었습니다


make histogram
You probably know the function hist(x,n) to get the histogram. Now try to write the function yourself! For the cheaters wanti...

5년 초과 전

문제를 풀었습니다


Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

5년 초과 전

문제를 풀었습니다


Pernicious Anniversary Problem
Since Cody is 5 years old, it's pernicious. A <http://rosettacode.org/wiki/Pernicious_numbers Pernicious number> is an integer w...

5년 초과 전

문제를 풀었습니다


Integrate Me
Given polynomial, output the integral (with k = 1 for simplicity purposes) Example: input = [2 1] % 2x+1 output = [1 1 1]...

5년 초과 전

문제를 풀었습니다


Sum of terms in a series 2 (★★★)

5년 초과 전

더 보기