문제를 풀었습니다


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

3개월 전

문제를 풀었습니다


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

3개월 전

문제를 풀었습니다


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.

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


Spherical Volume
Calculate the volume of a sphere.

4개월 전

문제를 풀었습니다


Converts numbers into characters
Converts numbers into characters

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


Draw a '0' in a one matrix!

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


to the 2 all elements
to the 2 all elements

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


Draw a '1' in a zero matrix!

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


Given two arrays, find the maximum overlap
Given two (integer) arrays s1 and s2, create a new array s3 which is as short as possible and contains both arrays. #1 s1 = [...

4개월 전

문제를 풀었습니다


Implement a counter
Write a function that returns a function that counts the number of times it is invoked. Example: >> h = counter; >> h() ...

4개월 전

더 보기