A résolu


GJam: 2013 Rd1a Bullseye Painting
<http://code.google.com/codejam/contests.html Google Code Jam> 2013 Round 1a Bullseye challenge is to determine how many full ri...

2 jours il y a

A résolu


String Logic 17
Examples: 'DIG' --> 'GDI' 'IMPORTANT' --> 'TANTIMPOR' 'DEAL' --> 'EALD' 'LIMB' --> 'IMBL' 'MOSTLY' --> 'YMOSTL'

2 jours il y a

A résolu


Create a Cell array of month-end date strings within a provided date range
This is a variation of <http://www.mathworks.com/matlabcentral/cody/problems/1039-get-an-array-of-month-ends-in-a-date-range Get...

2 jours il y a

A résolu


Easy Sequences 3: Prime 44-number Squares
The positive integers 62 and 238 are related. Their squares (3844 and 56,644) both end in '44'. In fact, 62 and 238 are the 3rd ...

5 jours il y a

A résolu


Easy Sequences 11: Factorial Digits without Trailing Zeros
Here is an easy one... It is not difficult to count the number of digits of the factorial of a given number. For example for 'n...

5 jours il y a

A résolu


Yet Another Path Finder
Assume there is a rectangular grid of points. These points are indicated by linear indices in a MATLAB-fashion. Some of the grid...

5 jours il y a

A résolu


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

5 jours il y a

A résolu


Spiral In
Create an m by n matrix filled with sequential integers starting from 1 and arranged in a counterclockwise spiral that hugs the ...

5 jours il y a

A résolu


Fangs of pseudo-vampire number
given a number, find all the fangs of that number. A pseudo-vampire number can have multiple of fangs. The output should be a...

5 jours il y a

A résolu


Pseudo-vampire number
refer to <https://en.wikipedia.org/wiki/Vampire_number> Given a number x, determine whether it is a pseudo-vampire number. A p...

5 jours il y a

A résolu


Monte-Carlo integration
Write a function that estimates a d-dimensional integral to at least 1% relative precision. Inputs: * d: positive integer....

5 jours il y a

A résolu


Cumulative maximum of an array
Find the cumulative maximum of an array without using the built-in function cummax (and a few others). Your function should act ...

5 jours il y a

A résolu


Simulate one complete step in the Biham–Middleton–Levine traffic model
The <http://en.wikipedia.org/wiki/Biham%E2%80%93Middleton%E2%80%93Levine_traffic_model Biham–Middleton–Levine traffic model> is ...

5 jours il y a

A résolu


Make a checkerboard matrix (★★★★★)
(copy of Prob. 4) Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1...

5 jours il y a

A résolu


Logic 1

5 jours il y a

A résolu


Create Combination
Motivation: In many problems, we need to create combinations with the function nchoosek. In some cases, however, choices are lim...

5 jours il y a

A résolu


Generate the Figure-Figure sequence
After discussing Scott Kim’s FIGURE-FIGURE Figure (below) in Gödel, Escher, Bach, Douglas Hofstadter introduced an integer seque...

5 jours il y a

A résolu


Fraction of a fraction of a ...
One sort of brainteaser problem is a math problem wherein you are asked what the given fraction of a fraction of a ... number is...

5 jours il y a

A résolu


Determine whether a number is a prime self number
Integers can be classified as generated numbers or self numbers. A generated number is one that can be expressed as the sum of a...

5 jours il y a

A résolu


Tic-Tac-Logic - Solution Checker
<http://www.conceptispuzzles.com/index.aspx?uri=puzzle/tic-tac-logic/rules Tic-Tac-Logic> is a logic puzzle wherein a rectangula...

5 jours il y a

A résolu


Beat the RNG - EASY

5 jours il y a

A résolu


Magical Land
Mother Earth has gifted humanity a magical land to help all life on earth, in the shape of a n-sided regular polygon. You, bein...

5 jours il y a

A résolu


Cache me Outside
The test suite includes a simple recursive Fibonacci sequence generator, but it's terribly inefficient. One simple method for im...

5 jours il y a

A résolu


Get input and output variable names
Given a string representing a function header, return the variable names used for the inputs and outputs. For example if input ...

5 jours il y a

A résolu


Determine digits of the Copeland-Erdos constant
<https://www.mathworks.com/matlabcentral/cody/problems/1477-champernowne-constant/solutions/new Cody Problem 1477> asks us to de...

5 jours il y a

A résolu


Two fractions, one sum
Given a positive number x, write a MATLAB script that will tell you how many ways that the reciprocal of that number can be writ...

5 jours il y a

A résolu


Fifteen Parity Check
The Matlab function fifteen initializes the 4x4 array with randperm(16), which produces 50% unsolvable puzzles. A <https://en.wi...

5 jours il y a

A résolu


Swap the first and last columns (★★)
(copy of Prob 19) Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becom...

5 jours il y a

A résolu


Cody Problems in French : Trouvez la logique Pt.1
On rentre x = 4 et il en sort y = 160. Trouvez la logique entre x et y, aidez-vous de la test suite. Bon courage. P.S: L'...

5 jours il y a

A résolu


Amicable pair
Amicable numbers are two different numbers such that the sum of the proper divisors of each is equal to the other number. For e...

5 jours il y a

Charger plus