Gelöst


7 segment LED display
Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (see Wikipedia: http://e...

6 Monate vor

Gelöst


Reverse Calculator
Use this reverse calculator and give correct output Its simple, In my Reverse calculator if you press 0 it will be considered...

6 Monate vor

Gelöst


Additive persistence
Inspired by Problem 2008 created by Ziko. In mathematics, the persistence of a number is the *number of times* one must apply...

6 Monate vor

Gelöst


Ripping numbers apart!
So you have to "rip" a number apart into individual digits... The end output is a cell. That is if: x = 12345678 o...

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


Math with Roman Numerals
Given a function R within (+,-,*,/) and two Roman numerals a & b, compute aRb in Roman numerals.

6 Monate vor

Gelöst


Test if a Number is a Palindrome without using any String Operations
*Description* Given an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits ...

6 Monate vor

Gelöst


Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

6 Monate vor

Gelöst


Make a simplified barcode
Given an integer to encode, make a barcode using the following encoding scheme: * The bar code is made from the binary versio...

6 Monate vor

Gelöst


Split bread like the Pharaohs - Egyptian fractions and greedy algorithm
How would you split 5 loaves of bread among 8 people in all fairness? Get a hint from the Pharaohs. 5/8 = 4/8 + 1/8 , i.e. each ...

6 Monate vor

Gelöst


Convert Roman to Arabic Numerals
Based upon what I see on tv and at the movies, the use of Roman numerals indicates something is important or sophisticated (e.g....

6 Monate vor

Gelöst


Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


Muphry's Law of MATLAB
You're running some simple multiplication problems through MATLAB for error checking purposes, but nothing seems to come up with...

6 Monate vor

Gelöst


Expand 10^n to Powers of 4
Given an integer n, return the coefficients c = [c_n,c_n-1,...,c_0] Such that 10^n = c_n*4^(n) + c_n-1*4^(n-1...

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


Still more miles to go before I sleep
It's time for more odometer fun. Last problem, my car's odometer hit 56789. It's coming up on 111111 now, which (barring a maj...

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


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

6 Monate vor

Gelöst


Calculate the height of an object dropped from the sky
Assume that an object is dropped from 1000 meters above the surface of the earth at time t=0. The object is dropped such that t...

6 Monate vor

Gelöst


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

6 Monate vor

Gelöst


Flip the diagonal values
Write a program that flip the elements of main diagonal , upper and lower diagonal values of a sqare matrix. For example if a ...

6 Monate vor

Gelöst


Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

6 Monate vor

Gelöst


Flipping a Matrix
Flipping matrix up and down. If a central row is exists, leave it, and flip remaining rows. Example Mat = magic(3) ...

6 Monate vor

Gelöst


swap sign sum & multiply castles
It is an easy problem, if you know the answer. Given a square matrix of NxN ordinary numbers. Initially place N identical indi...

6 Monate vor

Gelöst


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

6 Monate vor

Gelöst


Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

6 Monate vor

Gelöst


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

6 Monate vor

Gelöst


Swap between columns
The idea is to swap between second and second last column Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; ...

6 Monate vor

Mehr laden