Risolto


~(*|/)
Return three quarters of n without using addition, subtraction, multiplication or division.

oltre 11 anni fa

Risolto


Fibonacci Decomposition
Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...

oltre 11 anni fa

Risolto


De-primed
Write a function that will multiply every prime number in the array or matrix by two, leaving all other numbers the same, and re...

oltre 11 anni fa

Risolto


With apologies to William Blake
Coder Coder, typing fast Sitting at your desk, aghast. What immortal MATLAB script will solve this problem, nice and qu...

oltre 11 anni fa

Risolto


Matrix Construction I
Given n, construct a matrix as shown in the example below. Example For n=8, the output should look like this: 1 2 3 4 ...

oltre 11 anni fa

Risolto


summation of the reciprocals
Determine the summation of the reciprocals of numbers with length equal to N,in the meanwhile there is a digit K excluded from t...

oltre 11 anni fa

Risolto


Kinetic Energy
Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.

oltre 11 anni fa

Risolto


(Linear) Recurrence Equations - Generalised Fibonacci-like sequences
This problem is inspired by problems <http://uk.mathworks.com/matlabcentral/cody/problems/2187-generalized-fibonacci 2187>, <htt...

oltre 11 anni fa

Risolto


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

oltre 11 anni fa

Risolto


Don't Try, give up and return NaN.
This is another version of <http://www.mathworks.com/matlabcentral/cody/problems/3107-try-and-catch-simple-example problem 3107....

oltre 11 anni fa

Risolto


Find out Harmonic mean.
Find out Harmonic mean.

oltre 11 anni fa

Risolto


Return fibonacci sequence do not use loop and condition
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: ...

oltre 11 anni fa

Risolto


Compute LOG(1+X) in natural log
Compute LOG(1+X) in natural log

oltre 11 anni fa

Risolto


Big numbers, repeated least significant digits
This problem builds off of <http://www.mathworks.com/matlabcentral/cody/problems/3077-big-numbers-least-significant-digits/ Prob...

oltre 11 anni fa

Risolto


Big numbers, least significant digits
Given two numbers, x and n, return the last d digits of the number that is calculated by x^n. In all cases, d will be the number...

oltre 11 anni fa

Risolto


Pattern Recognition 1 - Known Unit Length
You will be given various arrays, composed of numbers or strings. For this problem, the known pattern unit length is three. Writ...

oltre 11 anni fa

Risolto


Scrabble Scores - 9
After developing a sophisticated Scrabble scoring routine, it's time to write an optimization routine for single word scoring. T...

oltre 11 anni fa

Risolto


Self-similarity 3 - Every other pair of terms
Self-similar integer sequences are certain sequences that can be reproduced by extracting a portion of the existing sequence. Se...

oltre 11 anni fa

Risolto


Self-similarity 2 - Every third term
Self-similar integer sequences are certain sequences that can be reproduced by extracting a portion of the existing sequence. Se...

oltre 11 anni fa

Risolto


Self-similarity 1 - Every other term
Self-similar integer sequences are certain sequences that can be reproduced by extracting a portion of the existing sequence. Se...

oltre 11 anni fa

Risolto


Test Driven Solution - Probability Problem 3
*Problem:* Without any Cody cheats, write code that passes the test suite. *Hint:* The test suite gets samples from the proba...

oltre 11 anni fa

Risolto


Mobius function
From <http://en.wikipedia.org/wiki/Möbius_function wikipedia>: For any positive integer n, define μ(n) as the sum of the prim...

oltre 11 anni fa

Risolto


Test Driven Solution - Probability Problem 2
*Problem:* Without any Cody cheats, write code that passes the test suite. *Hint:* The test suite gets samples from the proba...

oltre 11 anni fa

Risolto


Sphenic number sequence
<http://oeis.org/A007304 Sphenic numbers> are positive integers that are products of three distinct prime numbers: 30, 42, 66, 7...

oltre 11 anni fa

Risolto


Get a Fibonacci number's index.
*N.B.* For the purpose of this exercise, the first Fibonacci number is 1, and the second is 2; that is, |fib(1) = 1| and |fib(2)...

quasi 12 anni fa

Risolto


Hardy-Ramanujan number
Find the first Hardy-Ramanujan number.

quasi 12 anni fa

Risolto


Test Driven Solution - Probability Problem 1
*Problem:* Without any Cody cheats, write code that passes the test suite. *Hint:* The test suite gets samples from the proba...

quasi 12 anni fa

Risolto


Alkane
Given a number, x, that is equal to the number of carbons in an alkane, find, y, the number of hydrogens in the alkane.

quasi 12 anni fa

Risolto


Split array into pieces according to corresponding array
An array x of length n has values 1...m with each value appearing at least once. The values are sorted (n>=m). A second...

quasi 12 anni fa

Risolto


Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

quasi 12 anni fa

Carica altro