Gelöst


Woodall number
Test whether the input is a Woodall number: <http://en.wikipedia.org/wiki/Woodall_number> _Please do not cheat by simply chec...

etwa ein Monat vor

Gelöst


Parasitic numbers
Test whether the first input x is an n-parasitic number: <http://en.wikipedia.org/wiki/Parasitic_number>. ( _n_ is the second in...

etwa ein Monat vor

Gelöst


Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


Project Euler: Problem 8, Find largest product in a large string of numbers
Find the greatest product of five consecutive digits in an n-digit number. 73167176531330624919225119674426574742355349194934...

etwa ein Monat vor

Gelöst


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

etwa ein Monat vor

Gelöst


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

etwa ein Monat vor

Gelöst


Project Euler: Problem 4, Palindromic numbers
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

etwa ein Monat vor

Gelöst


Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

etwa ein Monat vor

Gelöst


3D Plots and Colorbars
Use the matrices X, Y, and Z provided in the function template to create a surface plot. Add a colorbar to the surface plot and ...

etwa ein Monat vor

Gelöst


Plot Line Specifications
Create a line plot for function cos(x) where x is a vector of linearly spaced values going from 0 to input N with an increment o...

etwa ein Monat vor

Gelöst


Track Logic
A sensor produces either a hit (1) or a miss (0) for a given target once per scan. The sensor is also equiped with a tracker whi...

etwa ein Monat vor

Gelöst


Hamiltonian Cycle
This is related to the Travelling Salesman Problem 1339 created by Alex P. A Hamiltonian cycle or traceable cycle is a path tha...

etwa ein Monat vor

Gelöst


Convert a diagonal representation of a matrix element to linear index or subscripts
Elements in matrices in MATLAB can be retrieved by linear index or subscripts. For example, the 1 in the matrix below has a line...

etwa ein Monat vor

Gelöst


Two Sum
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You m...

etwa ein Monat vor

Gelöst


How Long is the Border Between Unitopia and Zerostan?
Two countries, Unitopia (denoted by ones) and Zerostan (denoted by zeros) are engaged in a long-standing dispute: how long is th...

etwa ein Monat vor

Gelöst


Gather primes
A book titled Gather that I regularly see inspired this game: make as many words as possible from the letters in the word GATHER...

etwa ein Monat vor

Gelöst


Leo Bậc Thang
Bạn đang leo cầu thang. Cần n bước để lên đến đỉnh. Mỗi lần bạn có thể leo 1 hoặc 2 bước. Hỏi có bao nhiêu cách khác nhau để le...

etwa ein Monat vor

Gelöst


Find record values in a sequence
Write a function to find the record values in a sequence—that is, the largest values seen since the start. For example, if the s...

etwa ein Monat vor

Gelöst


Jump Game
You are given an array of non-negative integers `nums`. You are initially positioned at the first index of the array, and each e...

etwa ein Monat vor

Gelöst


Breaking straight lines
Let P be a point in Oxy plane and let p be a 1×2 array representing an one-degree or zero-degree polynomials, if its first entry...

etwa ein Monat vor

Gelöst


Filled Diamond Pattern
Create an N×N binary matrix that forms a filled diamond shape centered in the matrix. The diamond expands symmetrically toward t...

etwa ein Monat vor

Gelöst


Record the Actions ( Medium )
Find the minimum steps to get T units from jugs A and B. Return the sequence of actions as cell array of strings. Available act...

etwa ein Monat vor

Gelöst


Find the nearest admirable number
Cody Problems 1012 and 2544 ask us to determine whether a number is perfect—that is, whether the sum of divisors is equal to ....

etwa ein Monat vor

Gelöst


Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

etwa ein Monat vor

Gelöst


Find the next prime number
Find the next prime number or numbers for given n. For example: n = 1; out = 2; or n = [5 7]; out = [7 11]; ...

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


Find nearest prime number less than input number
Find nearest prime number less than input number. For example: if the input number is 125, then the nearest prime number whi...

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Mehr laden