A résolu


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

plus d'un an il y a

A résolu


Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...

plus d'un an il y a

A résolu


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

plus d'un an il y a

A résolu


Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

plus d'un an il y a

A résolu


Infinite precision division
Develop a function that will divide a very very large integer numerator, supplied to function as a string (e.g., '12233344445555...

plus d'un an il y a

A résolu


Cipher and Decipher the message - 3 key

plus d'un an 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 ...

plus d'un an il y a

A résolu


How to add?
* Imagine you are in 2222 Anno Domini, when everyone must learn how to add, * and competing for the highly prestigious post of,...

plus d'un an il y a

A résolu


List the emirps
An emirp is a prime number that becomes a different prime when reversed. The numbers 13, 17, and 149 are emirps, but 11, 19, and...

plus d'un an il y a

A résolu


Compute the nth Pythagorean prime
Pythagorean primes have the form p = 4n+1, where n is an integer, and they can be written as the sum of squares of two integers....

plus d'un an il y a

A résolu


Decipher the message - same key for all digits
You will be given a input number (eg) x='gdkkn' you have to figure out the dechiper key and match it with given input and deci...

plus d'un an il y a

A résolu


Decipher the number 3 - 10 keys

plus d'un an il y a

A résolu


Card Game
This is an overly simplified and highly modified version of card game Twenty-Nine. A deck of 100 unique cards (hypothetical) ...

plus d'un an il y a

A résolu


Decipher the number 2 - 3 keys

plus d'un an il y a

A résolu


decipher the number 1 - same key for all digits :)
You will be given a input number (eg) x=12345 you have to figure out the dechiper key and match it with given input and deciph...

plus d'un an il y a

A résolu


NCHOOSEK - Time Optimization
Input V —— Set of all choices, a vector of N, 1 < N < 100 K —— Number of selected choices, a scalar, 0 <= K <= N Output C ——...

plus d'un an il y a

A résolu


Combinations without using nchoosek
You have to generate a matrix with all possible combinations of n elements *taken 2* at a time, *without using nchoosek(1:n,2)* ...

plus d'un an il y a

A résolu


How to multiply?
Imagine you are in 3012 Anno Domini, when everyone must learn how to multiply, and competing for the highly prestigious post of...

plus d'un an il y a

A résolu


Determine whether a number is a fibodiv number
The number 14 is a fibodiv number because you can divide it into 1 and 4, use those numbers as the seeds for a Fibonacci sequenc...

plus d'un an il y a

A résolu


Find the nth nude number
The number 672 is a nude number because it openly displays three of its divisors: 6, 7, and 2. In other words, a nude number is ...

plus d'un an il y a

A résolu


Find the smallest integer m such that n divides m!
Write a function that takes an integer and finds the smallest integer whose factorial is divisible by . For example, if , then...

plus d'un an il y a

A résolu


Sum of all the divisors of n

plus d'un an il y a

A résolu


Compute the Sequence of the Day
A sequence starts with 1 and 2, and each subsequent term is the sum of the digits of the product of the previous two terms. As a...

plus d'un an il y a

A résolu


Find numbers in the Popular Computing Z-sequence
Here’s a quick one. In 1977 the magazine Popular Computing sought “problem situations for which the computer is the best (if not...

plus d'un an il y a

A résolu


Identify Ruth-Aaron numbers
After Hank Aaron hit his 715th home run and passed Babe Ruth’s total of 714, Carl Pomerance noticed that the union of the prime ...

plus d'un an il y a

Charger plus