Resuelto


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

casi 5 años hace

Resuelto


Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

casi 5 años hace

Resuelto


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

casi 5 años hace

Resuelto


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

casi 5 años hace

Resuelto


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...

casi 5 años hace

Resuelto


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

casi 5 años hace

Resuelto


Back to basics 12 - Input Arguments
Covering some basic topics I haven't seen elsewhere on Cody. Return a value equal to the number of input arguments to the fun...

casi 5 años hace

Resuelto


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

casi 5 años hace

Resuelto


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

casi 5 años hace

Resuelto


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.

casi 5 años hace

Resuelto


Number of Horns on a unicorn!
Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

casi 5 años hace

Resuelto


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

casi 5 años hace

Resuelto


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

casi 5 años hace

Resuelto


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

casi 5 años hace

Resuelto


Solve the Sudoku Row
*Description* A simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The ta...

casi 5 años hace

Resuelto


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

casi 5 años hace

Resuelto


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...

casi 5 años hace

Resuelto


Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

casi 5 años hace

Resuelto


Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

casi 5 años hace

Resuelto


Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

casi 5 años hace

Resuelto


Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

casi 5 años hace

Resuelto


Find vampire numbers
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such th...

casi 5 años hace

Resuelto


Proper Factors
Generate the proper factors of input integer _x_ and return them in ascending order. For more information on proper factors, ref...

casi 5 años hace

Resuelto


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

casi 5 años hace

Resuelto


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...

casi 5 años hace

Resuelto


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

casi 5 años hace

Resuelto


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

casi 5 años hace

Resuelto


Acid and water
&#9878; &#9878; &#9878; &#9878; &#9878; &#9878; &#9878; &#9878; Assume that there is a 100 liter tank. It is initially fi...

casi 5 años hace

Resuelto


Digit concentration in Champernowne's constant
Consider the first 50 digits of Champernowne's constant 0.12345678910111213141516171819202122232425262728293... The...

casi 5 años hace

Resuelto


Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

casi 5 años hace

Cargar más