解決済み


Pernicious Anniversary Problem
Since Cody is 5 years old, it's pernicious. A <http://rosettacode.org/wiki/Pernicious_numbers Pernicious number> is an integer w...

17日 前

解決済み


Goldbach's marginal conjecture - Write integer as sum of three primes
Goldbach's strong conjecture states that every even integer greater than 2 can be expressed as the sum of two primes. For exampl...

17日 前

解決済み


The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

17日 前

解決済み


Twins in a Window
<http://en.wikipedia.org/wiki/Twin_primes Twin primes> are prime numbers that differ by 2, such as [11,13] or [41,43]. Write a f...

17日 前

解決済み


Twin Primes
Twin primes are pairs of primes that are immediately next to each other (difference of two). The lesser of twin primes are 3, 5,...

17日 前

解決済み


Extra safe primes
Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...

17日 前

解決済み


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

17日 前

解決済み


Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

17日 前

解決済み


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

17日 前

解決済み


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at http://en.wikipedia...

17日 前

解決済み


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

17日 前

解決済み


"Low : High - Low : High - Turn around " -- Create a subindices vector
Let two vectors *lo* and *hi* be given. The job is to create a index vector like so idx = [lo(1):hi(1) lo(2):hi(2) ...]...

17日 前

解決済み


Matrix indexing with two vectors of indices
Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

17日 前

解決済み


Put two time series onto the same time basis
Use interpolation to align two time series onto the same time vector. This is a problem that comes up in <http://www.mathwork...

17日 前

解決済み


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

17日 前

解決済み


Joining Ranges
You are given a n-by-2 matrix. Each row represents a numeric range, e.g. x = [0 5; 10 3; 20 15; 16 19; 25 25] contains...

17日 前

解決済み


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

17日 前

解決済み


Replace May with April
For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

17日 前

解決済み


commutative?
Given the handle to a binary function that takes two ordinary numbers, test if the function is commutative.

17日 前

解決済み


root?
* Given a function 'foo', and a position 'there', find the root near 'there'. * For example: If foo=@sin, and there=3.1, then r...

17日 前

解決済み


Find files with extension ext in the current directory
List all files with extension 'ext' in the current directory. Return a char matrix with the name of files in rows. Return 0 if...

17日 前

解決済み


Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

17日 前

解決済み


Find Missing Number
A little problem (inspired by CodeChef) for the coffee break. A friend give you an array of size n-1 integers and these int...

17日 前

解決済み


nth Rational Number
Return the nth rational number. This is the inverse to Problem 1471. Index of a Rational number The first ten positive rationa...

17日 前

解決済み


Is this number Munchhausen?
In this problem, simply return 1 if a supplied number is Munchhausen or 0 if not. Example 153 is narcissistic but not a Munchh...

17日 前

解決済み


Narcissistic number ?
Inspired by Problem 2056 created by Ted. In recreational number theory, a narcissistic number is a number that is the sum of ...

17日 前

解決済み


Find the two-word state names
Given a list of states, remove all the states that have two-word names. If s1 = 'Alabama Montana North Carolina Vermont N...

17日 前

解決済み


Animated GIF Creator
This Challenge is to execute the Function Template which has a fully functional Animated GIF creator of a shape related to a Zer...

17日 前

解決済み


Volume of a Parallelepiped
Calculate the volume of a Parallelepiped given the vectors for three edges that meet at one vertex. A cube is a special case ...

17日 前

解決済み


Polite numbers. N-th polite number.
A polite number is an integer that sums of at least two consecutive positive integers. For example _7 = 3+4_ so 7 is a polite...

17日 前

さらに読み込む