문제를 풀었습니다


find the nth fibonacci number
The Fibonacci sequence is defined as follows: give n, find the nth fibonacci number

4개월 전

문제를 풀었습니다


Ordinary Annuity : Future Value
Theorem : Future Value of an Ordinary Annuity where; F : Future value A : Periodic payment r : Rate per period n : Numbe...

5개월 전

문제를 풀었습니다


Compute the antisigma function
The sum of divisors function, or , is the sum of the numbers that divide . The antisigma function is the sum of numbers less tha...

5개월 전

문제를 풀었습니다


Compute the tersum
The tersum, which appears in certain mathematical games, involves adding two numbers in base 3 without carry and converting back...

5개월 전

문제를 풀었습니다


Return the sum of all even numbers in a vector
Write a function that takes a vector of integers and returns the sum of all even numbers.

5개월 전

문제를 풀었습니다


Multiply real numbers to get the smallest integers
Write a function that takes a vector of real numbers and multiplies them by a factor to produce the integers with the smallest a...

6개월 전

문제를 풀었습니다


Signed Magnitude
For a given input vector, return the value that is furthest from zero. For example, if x = [1 2 -12] return -12.

6개월 전

문제를 풀었습니다


Calculate BMI
Given weight in kgs and height in metres, calculate body mass index

6개월 전

문제를 풀었습니다


Find the missing numbers.
Total *N* numbers are in the series of natural numbers ( *1,2,3,...,N* ). The input is an array (unsorted) of those natural num...

6개월 전

문제를 풀었습니다


Count integers in randomized vector that are multiples of a given number.
The mod() function We might all remember the days when we were taught to divide and then set the remainder aside if the numbers...

6개월 전

문제를 풀었습니다


find powers of two
find the unique, non-repeating, powers of 2 that sum to a given non-zero integer, n example: n = 23 result = [1 2 4 16] ...

6개월 전

문제를 풀었습니다


Find the first occurence of a given gap between two consecutive prime numbers
Problem statement Given a gap = p' - p between the two consecutive prime numbers p and p', find its first occurence, f. E...

7개월 전

문제를 풀었습니다


List primes which are the sum of two consecutive lower primes plus minus one
Problem statement Some prime numbers can be written as the sum of two consecutive lower primes plus / minus one : Like t...

7개월 전

문제를 풀었습니다


Check p = 4n +/- 1, the generic formula for odd prime numbers
Problem statement For all odd prime number p, there exists a positive integer n, such that p = 4n +/- 1 : Check this f...

7개월 전

문제를 풀었습니다


Check p = 6n +/- 1, the generic formula for odd prime numbers greater than 3
Problem statement For all odd prime number p greater than 3, there exists a positive integer n, such that p = 6n +/- 1 : ...

7개월 전

문제를 풀었습니다


Find 0 in array
Given array find where there 0 is.

7개월 전

문제를 풀었습니다


Calculate the sum of two polynomials
Calculate the sum of two polynomials if they are written in notation with their coefficients. example: () + () = a=[3 4 ...

7개월 전

문제를 풀었습니다


Equal temperament - musical notes and frequency
Starting from 440Hz note (musical note A above middle C), create 13 notes, using twelve-tone equal temperament, in Herz units. ...

7개월 전

문제를 풀었습니다


Count the ways to write 1/n as the sum of two unit fractions
The number 1/2 can be written as 1/3+1/6 and 1/4+1/4, and the number 1/9 can be written as 1/18+1/18, 1/12+1/36, and 1/10+1/90. ...

7개월 전

문제를 풀었습니다


Sum of a geometric series
Give the sum of the first 'n' terms of a geometric series, given 'a' as the first term and 'r' as the ratio.

7개월 전

문제를 풀었습니다


Say type of roots in quadratic equation
Given the coefficients of a quadratic equation, write a function that gives the output y='RealDifferent' if the roots are real a...

7개월 전

문제를 풀었습니다


Basic Quadratic Equation
Create the equation: y=(3x)^2+(5x)+35 and compute y for various values of x

7개월 전

문제를 풀었습니다


Quadratic equation
given three inputs (a, b, c) for the equation a*x^2+b*x+c=0; return 1 if the roots are complex (non zero imaginary), and 0 if th...

7개월 전

문제를 풀었습니다


Finding two missing number in 1 to n array
You are given an array of numbers from 1 to n with two missing numbers. Return the two missing numbers. Input: x=[5 2 0 1 ...

7개월 전

문제를 풀었습니다


¡Busca el extremo!
Crea una función que calcule el extremo de una parábola (máximo o mínimo absoluto) cuyos datos son proporcionados por el usuario...

7개월 전

문제를 풀었습니다


X plus binary inverted x
Given a n-bits number x, what is the sum of x to the binary inverted version of x? (this might be more simple than you think :-)...

7개월 전

문제를 풀었습니다


Second smallest number
What is the second smallest number in x? example: x = [1 2 3 4 5 6 7 8 9] y = 2

7개월 전

문제를 풀었습니다


Calculate the volume of the football

7개월 전

문제를 풀었습니다


Minimum Maximum Sort Array
sort one array by put minimum value followed by maximum as follow a=[2 3 1 5] and the solution is y=[1 5 2 3 3 2 5 1];

7개월 전

문제를 풀었습니다


How to permute given 3d matrix?
A(:,:,1)=[1 3] A(:,:,2)=[2 2] A(:,:,3)=[4 3] Change rows to columns and columns to rows, similar to transpose. Resul...

7개월 전

더 보기