Risolto


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Input...

4 mesi fa

Risolto


List the emirps
An emirp is a prime number that becomes a different prime when reversed. The numbers 13, 17, and 149 are emirps, but 11, 19, and...

4 mesi fa

Risolto


Make a vector of prime numbers
Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...

4 mesi fa

Risolto


Largest Twin Primes
<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...

4 mesi fa

Risolto


The Goldbach Conjecture
The Goldbach conjecture asserts that every even integer greater than 2 can be expressed as the sum of two primes. Given the eve...

4 mesi fa

Risolto


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

4 mesi fa

Risolto


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

4 mesi fa

Risolto


Convert radians to degrees
Given input in radians, output to degrees

4 mesi fa

Risolto


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

4 mesi fa

Risolto


Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

4 mesi fa

Risolto


radius of a spherical planet
You just measured its surface area, that is the input.

4 mesi fa

Risolto


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

4 mesi fa

Risolto


Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...

4 mesi fa

Risolto


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

4 mesi fa

Risolto


Draw a '4' in a zero matrix!

5 mesi fa

Risolto


Draw a '6' in a zero matrix!

5 mesi fa

Risolto


Draw a '9' in a zero matrix!

5 mesi fa

Risolto


Draw a '7' in a zero matrix!

5 mesi fa

Risolto


Draw a '8' in a zero matrix!

5 mesi fa

Risolto


Draw a '3' in a zero matrix!

5 mesi fa

Risolto


Draw a '2' in a zero matrix!

5 mesi fa

Risolto


Draw a '5' in a zero matrix!

5 mesi fa

Risolto


Find x rows where the sum of the numbers is the maximum
Find x rows where the sum of the numbers is the maximum. For example: when x is 2 and m is 2 3 5 0 2 3 5 5 6 0 9 4 then y =...

5 mesi fa

Risolto


Draw a '1' in a zero matrix!

5 mesi fa

Risolto


Column Removal (★★★)
(copy of prob 7) Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2...

5 mesi fa

Risolto


Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...

5 mesi fa

Risolto


remove every row&col for every nan
for a given matrix, remove the row and column of every nan. Example x=[1 2 NaN 4 5 6 7 8 ...

5 mesi fa

Risolto


Remove all the columns contains only zero
Remove the column from the matrix which has only zeros . Refer the Example below a= 1 0 3 0 23 0 56 0 1 ...

5 mesi fa

Risolto


row removal
Consider a matrix and remove the first row of the matrix.

5 mesi fa

Risolto


Find Rows with Specift Properities
Delete rows with specific properites as following: Find rows that have a negative value in any element of the row and delete it...

5 mesi fa

Carica altro