Risolto


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 = 9 + 16 ...

11 mesi fa

Risolto


Pandigital number n°2 (Inspired by Project Euler 32)
After Problem 2319. An n-digit number is pandigital if it makes use of all the digits 1 to n exactly ONCE. For example, the 5-...

11 mesi fa

Risolto


Pandigital number n°1 (Inspired by Project Euler 32)
A little warm-up to begin... An n-digit number is pandigital if it makes use of all the digits 1 to n exactly ONCE. For ex...

11 mesi fa

Risolto


I've got the power! (Inspired by Project Euler problem 29)
Consider all integer combinations of a^b and b^a for the integer values 2 ≤ a ≤ 4 and 2 ≤ b ≤ 5: 2^2=4, 2^3=8, 2^4=16,...

11 mesi fa

Risolto


Given a number N, find the smallest prime P>N
Given a number N, find the smallest prime P greater than N. For example: If N=10 then P=11. If N=13 then P=17.

11 mesi fa

Risolto


Area of a Square
Given the length x of the side of a regular square, find the area of the square, A.

11 mesi fa

Risolto


Spherical Volume
Calculate the volume of a sphere.

11 mesi fa

Risolto


Converts numbers into characters
Converts numbers into characters

11 mesi fa

Risolto


Calculate the average value of the elements in the array
Calculate the average value of the elements in the array

11 mesi fa

Risolto


Double all elements in the array
Duplicate all elements in the array

11 mesi fa

Risolto


calculate the length of matrix
input 1 array, calculate the length

11 mesi fa

Risolto


the average value of the elements
Calculate the average value of the elements in the array

11 mesi fa

Risolto


Find the max element of the array
Find the max element of the array

11 mesi fa

Risolto


Draw a '0' in a one matrix!

11 mesi fa

Risolto


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

11 mesi fa

Risolto


to the 2 all elements
to the 2 all elements

11 mesi fa

Risolto


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

11 mesi fa

Risolto


Draw a '1' in a zero matrix!

11 mesi fa

Risolto


Solve a System of Linear Equations
Example: If a system of linear equations in x₁ and x₂ is: 2x₁ + x₂ = 2 x₁ - 4 x₂ = 3 Then the coefficient matrix (A) is: 2 ...

11 mesi fa

Risolto


Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

11 mesi fa

Risolto


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

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

11 mesi fa

Risolto


How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

11 mesi fa

Risolto


Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

11 mesi fa

Risolto


Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If p is the perimeter of a right angle triangle with integral length sides, { a, b, c }, there are exactly three solutions for p...

11 mesi fa

Risolto


Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x2, y...

11 mesi fa

Risolto


Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...

11 mesi fa

Risolto


Find the sides of an isosceles triangle when given its area and height from its base to apex
Find the sides of an isosceles triangle when given its area and the height from its base to apex. For example, with A=12 and h=...

11 mesi fa

Risolto


Word Counting and Indexing
You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...

11 mesi fa

Risolto


Counting in Finnish
Sort a vector of single digit whole numbers alphabetically by their name, in Finnish. See the Wikipedia page for <http://en.wik...

11 mesi fa

Carica altro