문제를 풀었습니다


Sums with Excluded Digits
Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

대략 10년 전

문제를 풀었습니다


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

대략 10년 전

문제를 풀었습니다


Negative Infinity
Round the given array a towards negative infinity.

대략 10년 전

문제를 풀었습니다


give nth decimal place of pi
max 15th place after the decimal point is ok for now

대략 10년 전

문제를 풀었습니다


Distance walked 3D
suppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance...

대략 10년 전

문제를 풀었습니다


Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

대략 10년 전

문제를 풀었습니다


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

대략 10년 전

문제를 풀었습니다


Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

대략 10년 전

문제를 풀었습니다


Positive Infinity
Round the array a towards positive infinity

대략 10년 전

문제를 풀었습니다


Evaluate Polynomial
Given a polynomial equation coefficients in a vector p, you have to return its value at x. Example: For inputs p and x ...

대략 10년 전

문제를 풀었습니다


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

대략 10년 전

문제를 풀었습니다


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

대략 10년 전

문제를 풀었습니다


given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

대략 10년 전

문제를 풀었습니다


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

대략 10년 전

문제를 풀었습니다


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

대략 10년 전

문제를 풀었습니다


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

대략 10년 전

문제를 풀었습니다


Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

대략 10년 전

문제를 풀었습니다


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

대략 10년 전

문제를 풀었습니다


Maximum running product for a string of numbers
Given a string s representing a list of numbers, find the five consecutive numbers that multiply to form the largest number. Spe...

대략 10년 전

문제를 풀었습니다


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

대략 10년 전

문제를 풀었습니다


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

대략 10년 전

문제를 풀었습니다


union without repitition
Let a = [9 9 9 9 9 9 8 8 8 8 7 7 7 6 6 6 5 5 4 2 1] b = [1 1 1 3 3 3 3 3 4 4 4 4 4 10 10 10] Output should be [9 8...

대략 10년 전

문제를 풀었습니다


Special matrix
Make a square matrix with this shape. For n=4 M = 1 1 0 0 1 0 1 0 0 1 0 ...

대략 10년 전

문제를 풀었습니다


Delete the rows in the middle
We will delete the rows in the middle and keep the first and the last rows. For example if input is [1 2 1 7 1 8 ...

대략 10년 전

문제를 풀었습니다


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

대략 10년 전

문제를 풀었습니다


Fix the last element of a cell array
Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...

대략 10년 전

문제를 풀었습니다


Concatenate strings
concatenate a variable number of input strings to produce one outputstring

대략 10년 전

문제를 풀었습니다


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

대략 10년 전

문제를 풀었습니다


interesting center of magic matrix
output the centre of magic matrix of n input=7; output=25

대략 10년 전

문제를 풀었습니다


Duplicate a character
Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

대략 10년 전

더 보기