Risolto


Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

quasi 3 anni fa

Risolto


Decimal Comparison
*Background* A utility of particular interest to Cody and other MATLAB ventures is comparing the equality of two numbers. In ...

quasi 3 anni fa

Risolto


"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) ...]...

quasi 3 anni fa

Risolto


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero i...

quasi 3 anni fa

Risolto


Project Euler: Problem 4, Palindromic numbers
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

quasi 3 anni fa

Risolto


Sort numbers by outside digits
Sort the array so that they are sorted as if their value was a 5 digit number made from the first three and last two digits of t...

quasi 3 anni fa

Risolto


Find out the Gray Code for a Given Binary Number
Find out <http://en.wikipedia.org/wiki/Gray_code Gray Code> for a given binary number Example Binary input 1000 Gray ...

quasi 3 anni fa

Risolto


Integer complexity (Large numbers)
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/42831-integer-complexity Problem 42831>, this problem aims to ...

quasi 3 anni fa

Risolto


Integer complexity
Given an array, n, of positive integers, return an array, c, of the same size, in which each element is the complexity of the co...

quasi 3 anni fa

Risolto


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

quasi 3 anni fa

Risolto


Number construction III
Given a positive integer, n, return a, b and c, such that 1. n = a^1.5+b^2.5+c^3.5 2. a, b and c are all positive integers...

quasi 3 anni fa

Risolto


Number construction II
Given a positive integer, n, return a, b, c and d, such that 1. n = a*2^b+c*3^d 2. a, b, c and d are all positive integers...

quasi 3 anni fa

Risolto


Number construction I
Given a positive integer, n, return a, b, c and d, such that 1. n = a*sqrt(b)+c*sqrt(d) 2. a, b, c and d are all positive ...

quasi 3 anni fa

Risolto


Find the gcm of n given values
Create a function that given n integer values greater than zero, finds the two numbers with the greatest common divisor and retu...

quasi 3 anni fa

Risolto


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

quasi 3 anni fa

Risolto


Convert integer to base26 using letters
Write a function that converts a decimal integer to base26 using the letters of the english alphabet, i.e. 0->'a', 1->'b', 2->'c...

quasi 3 anni fa

Risolto


Convert decimal to binary and then generate the minimum binary it can with jumbling
input is 10 --> 1010 output should be 3 --> 0011 input 23 --> 10111 output should be 15 --> 01111

quasi 3 anni fa

Risolto


Binary Inversion
Given the unsigned 8-bit integer x, return the number y which is the binary inversion of x. For example if x is 5, y should b...

quasi 3 anni fa

Risolto


Digital Neighbourhood
Given a natural number reorder its digits to create another number, closest to the given one. Examples: * 123 gives 132, ...

quasi 3 anni fa

Risolto


Convert to Binary Coded Decimal
Convert from decimal representation to <http://en.wikipedia.org/wiki/Binary-coded_decimal Binary Code Decimal> (or BCD) represen...

quasi 3 anni fa

Risolto


Numbers on 7-segment
This is a 7-segment: _ |_| |_| It's a 3-by-3 char matrix.It has made by 3 characters: '_' , '|' and ' ' (space...

quasi 3 anni fa

Risolto


Whole Number Concatenator
Write a function that concatenates whole numbers. For example: numcat(111,222) should return 111222 numcat(1,2,3,4,5) s...

quasi 3 anni fa

Risolto


Whole Number Un-Concatenator
Write a function that accepts an integer and an index digit and returns a vector containing two integers which are the leading a...

quasi 3 anni fa

Risolto


Permutation Via Multiplication
Given two numbers a and b, determine if the product ab is a permutation of the digits of a. For example, this is always true for...

quasi 3 anni fa

Risolto


Smallest n, for n! to have m trailing zero digits
For given positive integer n, its factorial often has many trailing zeros, in other words many factors of 10s. In order for n! t...

quasi 3 anni fa

Risolto


The number of trailing zero digit of a factorial
For given positive integer n, take factorial of that number. How many trailing zeros does it have? Example: factorial(11) = 3...

quasi 3 anni fa

Risolto


Pattern Sum
Write a function which receives two single digit positive integers, (k and m) as parameters and calculates the total sum as: k...

quasi 3 anni fa

Risolto


The last non-zero digit of a factorial
For given positive integer n, what is the last non-zero digit of n!? Example: factorial(11) = 39916800 Last non-zero d...

quasi 3 anni fa

Risolto


Convert from Base 10 to base 5
Convert the input number from base 10 into base 5: for example: if a(in base 10)= 5 then a(in base 5)= 10

quasi 3 anni fa

Risolto


Numbers in extended form
Shhhhhhh. Don't tell my daddy, but I'm borrowing his Cody account so all of you very smart people can help me out. I just star...

quasi 3 anni fa

Carica altro