Gelöst


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

fast 3 Jahre vor

Gelöst


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

fast 3 Jahre vor

Gelöst


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

fast 3 Jahre vor

Gelöst


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

fast 3 Jahre vor

Gelöst


Draw a '4' in a zero matrix!

fast 3 Jahre vor

Gelöst


Draw a '6' in a zero matrix!

fast 3 Jahre vor

Gelöst


Draw a '8' in a zero matrix!

fast 3 Jahre vor

Gelöst


Draw a '9' in a zero matrix!

fast 3 Jahre vor

Gelöst


Draw a '2' in a zero matrix!

fast 3 Jahre vor

Gelöst


Draw a '5' in a zero matrix!

fast 3 Jahre vor

Gelöst


Find x rows where the sum of the numbers is the maximum
Find x rows where the sum of the numbers is the maximum. For example: when x is 2 and m is 2 3 5 0 2 3 5 5 6 0 9 4 then y =...

fast 3 Jahre vor

Gelöst


Draw a '1' in a zero matrix!

fast 3 Jahre vor

Gelöst


With apologies to William Blake
Coder Coder, typing fast Sitting at your desk, aghast. What immortal MATLAB script will solve this problem, nice and qu...

fast 3 Jahre vor

Gelöst


De-primed
Write a function that will multiply every prime number in the array or matrix by two, leaving all other numbers the same, and re...

fast 3 Jahre vor

Gelöst


Big numbers, least significant digits
Given two numbers, x and n, return the last d digits of the number that is calculated by x^n. In all cases, d will be the number...

fast 3 Jahre vor

Gelöst


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

fast 3 Jahre vor

Gelöst


Binary Neighbourhood
Given a natural number reorder its binary form to create another number, closest to the given one. Examples: * 1 gives 2, ...

fast 3 Jahre vor

Gelöst


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

fast 3 Jahre vor

Gelöst


Consecutive Equation Times (of the day)
Many times throughout the day can represent mathematical equations. In this problem, we focus on the largest consecutive run of ...

fast 3 Jahre vor

Gelöst


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

fast 3 Jahre vor

Gelöst


Equation Times (of the day)
Many times throughout the day can represent mathematical equations. In this problem, we focus on times that include the four bas...

fast 3 Jahre vor

Gelöst


Power Times (of the day)
Many times throughout the day can represent mathematical equations. In this problem, we focus on times that represent powers. Fo...

fast 3 Jahre vor

Gelöst


Bit calculation
Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

fast 3 Jahre vor

Gelöst


Big numbers, repeated least significant digits
This problem builds off of Problem 3077 Given an integer x which contains d digits, find the value of (minimum) n (n > 1) such ...

fast 3 Jahre vor

Gelöst


Pancake sorting - minimum flips.
Sort a stack of pancakes by flipping them using spatula. There are N pancakes with diameters 1:N. Spatula can be inserted anyw...

fast 3 Jahre vor

Gelöst


Pancake sorting
Sort a stack of pancakes by flipping them using spatula. * There are _N_ pancakes with diameters _1:N_. * Spatula can be ins...

fast 3 Jahre vor

Gelöst


How close to a hole
Suppose you have a description of good places (ones) and bad places (zeros). You want to know your distance from a bad place (in...

fast 3 Jahre vor

Gelöst


Find the distance between runs
Another question inspired by the <http://uk.mathworks.com/matlabcentral/answers/?s_tid=gn_mlc_an answers forum>: A vector of ...

fast 3 Jahre vor

Gelöst


Find Elements in Range
Based on a question on <http://www.mathworks.com/matlabcentral/answers/ MATLAB Answers>. Find all the elements of a vector wh...

fast 3 Jahre vor

Gelöst


Find indices of diagonal elements
Given a matrix A and a diagonal index d (where 0 indicates the main diagonal and off-diagonals are identified by positive and n...

fast 3 Jahre vor

Mehr laden