문제를 풀었습니다


Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

거의 4년 전

문제를 풀었습니다


Largest territory
Determine whose territory is largest. If there are multiple numbers tied for the largest territory, return the smallest number. ...

거의 4년 전

문제를 풀었습니다


counting groups!
This problem is about counting groups. Example If you have x: x = [0.8 0.8 0.8 0.3 0.3 0.4 0.5 0.6 0.6 0.9] then a...

거의 4년 전

문제를 풀었습니다


Three...is a magic number.
Yes it is... It's a magic number... To help you get rid of that earworm, here's a new Cody problem. You are given a squar...

거의 4년 전

문제를 풀었습니다


Time Expansion
How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

거의 4년 전

문제를 풀었습니다


remove single elements
Given a vector of integers, remove the elements that have appeared only once. The output elements should be in exact order as th...

거의 4년 전

문제를 풀었습니다


Max Change in Consecutive Elements
If an array is given as input then find the index of consecutive elements that represent maximum change. Example: Input ...

거의 4년 전

문제를 풀었습니다


expand intervals
You're given a row vector of an even number of monotonically increasing integers. Each pair of consecutive integers is the lower...

거의 4년 전

문제를 풀었습니다


compress sequence into intervals
You're given a row vector of monotonically increasing integers most of which are consecutive. Find the upper and lower bounds of...

거의 4년 전

문제를 풀었습니다


expand intervals vol.3
This is the next problem after <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528> and <http://www.mathworks.co.u...

거의 4년 전

문제를 풀었습니다


expand intervals vol.2
Similar to problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528>. This is a more general case, when bounds ...

거의 4년 전

문제를 풀었습니다


Top layer of a 3D pyramid
create a 3D pyramid(x,y,z) of ones(1) and zeros(0)...where pyramid part is denoted by one....nd find the top layer(x,y) of the p...

거의 4년 전

문제를 풀었습니다


Luhn's Algorithm
Luhn's Algorithm is used as a checksum for credit card numbers or similar identifiers. It can detect single-digit changes and sw...

거의 4년 전

문제를 풀었습니다


The sliding puzzle: 15
If you are unfamiliar with the sliding puzzle, enter the command _fifteen_ in your MATLAB command window (or search online, of c...

거의 4년 전

문제를 풀었습니다


Calculate square and cube of number
Calculate square and cube of number x

대략 4년 전

문제를 풀었습니다


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

대략 4년 전

문제를 풀었습니다


Sudoku Solver - Standard 9x9
Solve a Standard 9x9 <http://en.wikipedia.org/wiki/Sudoku Sudoku>. Values 1 thru 9 occur in each row, column, and the nine non-o...

대략 4년 전

문제를 풀었습니다


GJam 2014 China Rd B: Sudoku Checker
This Challenge is derived from <http://code.google.com/codejam/contest/2929486/dashboard#s=p0 GJam 2014 China Sudoku>. Large Cas...

대략 4년 전

문제를 풀었습니다


Valid Chess Moves
Using <http://en.wikipedia.org/wiki/Algebraic_chess_notation standard Algebraic notation> ('' for a pawn), given previous move a...

대략 4년 전

문제를 풀었습니다


Fibonacci Word
F1='0' F2='1' F3 is the catenation of the previous two. So, F3 = cat(F2,F1)='10'. similarly, F4 = cat(F3,F2...

대략 4년 전

문제를 풀었습니다


I Plead the Fifth
Write a function to provide a yes or no answer to the input string. However, it must plead the 5th amendment (return an empty st...

대략 4년 전

문제를 풀었습니다


Is it really a 5?
A number containing at least one five will be passed to your function, which must return true or false depending upon whether th...

대략 4년 전

문제를 풀었습니다


Draw a 'Z'.
Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ . Example: n=5 ans= [1 1 1 1 1 0 0 0 1 ...

대략 4년 전

문제를 풀었습니다


Draw a 'X'!
Given n as input Draw a 'X' in a n-by-n matrix. example: n=3 y=[1 0 1 0 1 0 1 0 1] n=4 y=[1 0 0...

대략 4년 전

문제를 풀었습니다


Draw a 'N'!
Given n as input, generate a n-by-n matrix 'N' using 0 and 1 . Example: n=5 ans= [1 0 0 0 1 1 1 0 0 1 1 0 ...

대략 4년 전

문제를 풀었습니다


Project Euler: Problem 9, Pythagorean numbers
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 =...

대략 4년 전

문제를 풀었습니다


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

대략 4년 전

문제를 풀었습니다


Project Euler: Problem 4, Palindromic numbers
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

대략 4년 전

문제를 풀었습니다


Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

대략 4년 전

문제를 풀었습니다


Most Frequent Word - 01
Given a document file or a character array, find out the most frequent word in that document. In the case of multiple words -...

대략 4년 전

더 보기