A résolu


"Cody" * 5 == "CodyCodyCodyCodyCody"
*Alice*: What? *"Cody" * 5 == "CodyCodyCodyCodyCody"*? You've gotta be kidding me! *Bob*: No, I am serious! Python supports...

presque 5 ans il y a

A résolu


Pandigital Multiples of 11 (based on Project Euler 491)
A "Pandigital number of order X" is one that contains all of the numbers from 0 to X, but with no leading zeroes. If X>9, the cy...

presque 5 ans il y a

A résolu


Sums of Distinct Powers
You will be given three numbers: base, nstart, and nend. Write a MATLAB script that will compute the sum of a sequence of both ...

presque 5 ans il y a

A résolu


Recaman Sequence - III
I want to create a Recaman sequence where there is a "1" in the n-th position. So from which integer should I start the Recaman ...

presque 5 ans il y a

A résolu


Hexagonal numbers on a spiral matrix
Put hexagonal numbers in a ( m x m ) spiral matrix and return the sum of its diagonal elements. Formula of hexagonal numbers ...

presque 5 ans il y a

A résolu


Pair Primes
Let's define pair primes as follow; * *For 2 digits numbers:* 11 and 17 are pair primes because both of them are 2 digits pri...

presque 5 ans il y a

A résolu


The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

presque 5 ans il y a

A résolu


Ned's queens
A tribute to Cody's five-year anniversary should also celebrate the people behind Cody, and in this particular case, our illustr...

presque 5 ans il y a

A résolu


Group-wise Euclidean distance
*Input*: * *x* —— An array of size *n-by-d*, where each row vector denotes a point in a d-dimensional space; * *g* —— A gro...

presque 5 ans il y a

A résolu


5th Time's a Charm
Write a function that will return the input value. However, your function must fail the first four times, only functioning prope...

presque 5 ans il y a

A résolu


Is this a valid Tic Tac Toe State?
For the game of <https://en.wikipedia.org/wiki/Tic-tac-toe Tic Tac Toe> we will be storing the state of the game in a matrix M. ...

presque 5 ans il y a

A résolu


An asteroid and a spacecraft
&#128640 Imagine a non-relativistic simple situation. Assume positions p0, p1, p2, and p3 are three dimensional Cartesian ...

presque 5 ans il y a

A résolu


Inscribed Pentagon? 2
Your function will be provided with the five vertices of a pentagon (p) as well as the center point (cp) and radius (r) of a cir...

presque 5 ans il y a

A résolu


Tautology
Check if the given expression is always true. For example, the sentence '~(A & B) == (~A | ~B)' is always true. Chara...

presque 5 ans il y a

A résolu


The sliding puzzle: 3D
This is an extension of <https://www.mathworks.com/matlabcentral/cody/problems/42842 problem 42842>. In this case, the puzzle is...

presque 5 ans il y a

A résolu


Five steps to enlightenment
This problem asks you to identify valid variations of the famous <https://en.wikipedia.org/wiki/Sum_and_Product_Puzzle sum and p...

presque 5 ans il y a

A résolu


Five-dimensional maze
*Description* The traditional maze is 2-dimensional: the navigator can move in the positive or negative directions along two ...

presque 5 ans il y a

A résolu


One track five lanes
Find the minimum number of lane changes necessary to cross the entire track without running into any obstacles <<http://www.a...

presque 5 ans 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...

presque 5 ans il y a

A résolu


Parse me a Lisp
*Description* In Lisp and its variants, function calls are done using parenthesis where the first item in the parenthesis is ...

presque 5 ans il y a

A résolu


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

presque 5 ans il y a

A résolu


Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

presque 5 ans il y a

A résolu


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<http://upload.wikimedia.org/wikipe...

presque 5 ans il y a

A résolu


How to subtract?
*&plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn* * Imagine you need to subtract one...

presque 5 ans il y a

A résolu


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

presque 5 ans il y a

A résolu


Getting the indices from a matrice
Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

presque 5 ans il y a

A résolu


Wrapping the Tower of Pisa
The famous artist Christo Vladimirov Javacheff, who likes pizza, wants to wrap the well-known Italian tower in paper. It is a ci...

presque 5 ans il y a

A résolu


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

presque 5 ans il y a

A résolu


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

presque 5 ans il y a

A résolu


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

presque 5 ans il y a

Charger plus