문제를 풀었습니다


Round to Nearest Multiple of 10^n

5년 초과 전

문제를 풀었습니다


Cody problems in French : Trouvez la logique Pt.2
Trouvez la logique entre x et y, aidez-vous de la test suite. Bon courage. P.S: L'utilisation de "^" est de nouveau fortement...

5년 초과 전

문제를 풀었습니다


Feeling lucky?
Guess which number Cody is thinking (1 to 10)? (This is a game of luck more than skill. Good luck!)

5년 초과 전

문제를 풀었습니다


Volume of Spherical Shell
In three-dimensional space, a spherical shell can be constructed from two concentric spheres. Determine the volume of a spheric...

5년 초과 전

문제를 풀었습니다


Calculating Ring Area
In two-dimensional space, a ring can be constructed by using two concentric circles. Determine the area of a ring which has r1 ...

5년 초과 전

문제를 풀었습니다


Probability of red tulips (at both ends of a row)
I planted tulip bulbs in a row on my flower bed. I thought that I had planted white tulips all. However, later, it turned out t...

5년 초과 전

문제를 풀었습니다


Calculate feeling temperature before climbing a mountain
I sometimes climb a mountain. As is well known, when the altitude becomes 100 (m) higher, the temperature lowers by 0.6 degrees...

5년 초과 전

문제를 풀었습니다


Outlier number!
Find a number which has maximum distance from the mean value of vector A. Example: A=[5 2 1 5 6 2 5 9] y=9

5년 초과 전

문제를 풀었습니다


Find all repeated numbers
For a given vector, find all numbers that repeated 2 times or more than 2 times. Example: A=[1 2 3 3 4 5 6 6 7] y=[3 ...

5년 초과 전

문제를 풀었습니다


World Cup 2018 Prediction!
Which team will be the winner?

5년 초과 전

문제를 풀었습니다


create a circulant matrix
create a circulant matrix

5년 초과 전

문제를 풀었습니다


Calculate the volume of the cube.
Example n = 3; a = volume(n); a = 27

5년 초과 전

문제를 풀었습니다


Vector pop
Take |n| elements from the end of the vector |v| and return both the shorten vector |v| and the |n| elements in a separate vecto...

5년 초과 전

문제를 풀었습니다


How many days in a month?
Return the number of days in a given month in 2017. If the input is not a valid month number, return -1. Examples: Input...

5년 초과 전

문제를 풀었습니다


Separate even from odd numbers in a vector - without loops
*Without using loops*, rearrange a vector of integers such that the odd numbers appear at the beginning, and even numbers at the...

5년 초과 전

문제를 풀었습니다


How to permute given 3d matrix?
A(:,:,1)=[1 3] A(:,:,2)=[2 2] A(:,:,3)=[4 3] Change rows to columns and columns to rows, similar to transpose. Resul...

5년 초과 전

문제를 풀었습니다


Where is 1?
There is a 3d matrix [A] that consist of many zeros and only one. A=zeros(100,100,100); i=randi(100); j=randi(100); ...

5년 초과 전

문제를 풀었습니다


Case-insensitive Character Detection
Find the index of a particular character in a string ignoring case. Example Input: x = 'aAbhhfdf' n = 'a' ...

5년 초과 전

문제를 풀었습니다


Find out value of polynomial at different value.
Find out value of polynomial at different value. Example p(s) = s + 8 For s=0, value is 8.

5년 초과 전

문제를 풀었습니다


Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...

5년 초과 전

문제를 풀었습니다


Find smallest number to leave a remainder of 1
given a vector of numbers, find the smallest number to be divisible by all of them with a remainder of 1. Note: input numbers wi...

5년 초과 전

문제를 풀었습니다


mathematics , probability problem
How many different result can we have, rolling k dice?

5년 초과 전

문제를 풀었습니다


Average valid values of arrays
Given a 1D array (column or row vector), compute the average of valid values. Valid values are defined via two thresholds: minVa...

5년 초과 전

문제를 풀었습니다


Calculate the Hamming distance between two strings
Inspired by a similar Cody problem found <http://www.mathworks.com/matlabcentral/cody/problems/93-calculate-the-levenshtein-dist...

5년 초과 전

문제를 풀었습니다


calculate PI without using pi function
There are many methods to get the pi(Ratio of circumference to diameter). You should get pi without using the pi function in M...

5년 초과 전

문제를 풀었습니다


Hydrostatic Pressure
Given depth(height), in m, find the pressure under a body of water. Need to know the density of water(kg/m^3), and gravity(m/s^2...

5년 초과 전

문제를 풀었습니다


Leaking?
Graham's law states that the rate of effusion of a gas is inversely proportional to the square root of its molecular weight. A b...

5년 초과 전

문제를 풀었습니다


BaeIsAlwaysRight
Output yes whatever bae says

5년 초과 전

문제를 풀었습니다


Combine the digits to output numbers
input could be of any length e.g. 1. in1 = 1 in2 = 2 output = 12 2. in1 = 2 in2 = 1 in3 = 0 output = 210

5년 초과 전

문제를 풀었습니다


Recursion at variable input
input of any length a =2 b =2 c =3 output = (a^b)^c = 64

5년 초과 전

더 보기