해결됨

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

약 1달 전

해결됨

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

약 1달 전

해결됨

Pizza!

Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

약 1달 전

해결됨

Find vampire numbers

A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such th...

약 1달 전

해결됨

Get all prime factors

List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

약 2달 전

해결됨

Factorize THIS, buddy

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

약 2달 전

해결됨

Numbers with prime factors 2, 3 and 5.

Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

약 2달 전

해결됨

Proper Factors

Generate the proper factors of input integer _x_ and return them in ascending order. For more information on proper factors, ref...

약 2달 전

해결됨

Smith numbers

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

약 2달 전

해결됨

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

약 2달 전

해결됨

German tank problem

The <http://en.wikipedia.org/wiki/German_tank_problem German tank problem> is a well-known statistical problem that attempts to ...

약 2달 전

해결됨

Probability of Choosing a Red Ball

Given two jars of red and blue balls, find the probability of choosing a red ball from Jar 1 after going through the steps. ...

약 2달 전

해결됨

Unique dice configurations

Given a number of dice N and the number of sides on each die S, write a MATLAB function that will output how many unique permuta...

약 2달 전

해결됨

Penny flipping - calculate winning probability (easy)

Two players are playing a fair penny flipping game. For each flip, the winner adds one penny from the loser's collection to his/...

약 2달 전

해결됨

The almost-birthday problem.

This is a harder version of the birthday problem. Now, you will have to determine the probability that two or more people in a r...

약 2달 전

해결됨

Given n, create n random numbers such that their standard deviation is also n.

Given n, create n random numbers such that their standard deviation is also n.

약 2달 전

해결됨

Coin change combinations.

Using only pennies (1), nickels (5), dimes (10), quarters (25), half dollars (50), and dollars (100), how many different combina...

약 2달 전

해결됨

Does the coin touch the line?

If we throw a coin that has a diameter of d, its center will land in a grid n x m. What is the probability that the coin land...

약 2달 전

해결됨

Coin Tossing: Probability of Same Heads for N tosses

A pair of physicists toss a coin n times each. What is the probability that they tossed the same number of heads? *Input:*...

약 2달 전

해결됨

Calculate the probability that at least two people in a group share the same birthday.

Calculate the probability that at least two people in a group share the same birthday. Given an integer input n, return to 0.015...

약 2달 전

해결됨

The Birthday Phenomenon

First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into considera...

약 2달 전

해결됨

Number of divisors of a given number

Given a Number n, return the number of his divisors without listing them example: n=14 ; Divisors={1,7,2,14} ; y=4 n=...

약 2달 전

해결됨

Number of even divisors of a given number

Given a Number n, return the number of its even divisors without listing them. example: n=14 ; EvenDivisors={2,14} ; y=2 ...

약 2달 전

해결됨

Let's get back to school, and create multiplication tables

For a given range, create multiplication tables. (start is always < endno) Example start = 17 endno = 19 Then, ...

2달 전

해결됨

Subtract integers and add doubles

Create a function that subtracts a from b if a and b are integers and adds them if they are floats.

2달 전

해결됨

Sum the 'edge' values of a matrix

Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

2달 전

해결됨

modular arithmetic

Given three integers a,b and c, find the remainder when a^b is divided by c. Here, a^b will be well beyond the largest 64 bit in...

2달 전

해결됨

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

2달 전

해결됨

Natural numbers in string form

Create a cell array of strings containing the first n natural numbers. _Slightly_ harder than it seems like it should be. Ex...

2달 전

해결됨

Fix the last element of a cell array

Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...

2달 전