Sum along each diagonal of a matrix
Write a routine that returns the sums along the diagonals of a given matrix, A, where the first diagonal is the bottom left corn...
Sudoku Solver - Standard 9x9
Solve a Standard 9x9 <http://en.wikipedia.org/wiki/Sudoku Sudoku>. Values 1 thru 9 occur in each row, column, and the nine non-o...
約1年 前
解決済み
Area of a rectangle
FInd the area of a rectangle with a length L and width W. Round to the nearest integer.
1年以上 前
解決済み
area of a square
find the generic solution for an area of a square
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 ...
2年弱 前
解決済み
Instructions Following
Complete the function follow(s) which, for a given string (containing only the letters 'f', 'b', 'l', 'r'), calculates the final...
2年弱 前
解決済み
Wheatstone bridge
Determine if a set of resistors maintain Wheatstone bridge equilibrium
2年弱 前
解決済み
Remove the diagonal of a square matrix
Some Cody problems ask solvers to remove columns (e.g., CP 7), and others ask solvers to remove rows (e.g., CP 44033).
Write a...
2年弱 前
解決済み
Times 10
Try out this test problem first.
Given the variable x as your input, multiply it by ten and put the result in y.
Examples:...
iteration of N blank spot
we have N spot which can be blank o filled calculate the number of iteration for these spots. e.g. N=2 1- blank blank 2- blank f...
2年弱 前
解決済み
Prime number removal
remove all prime numbers from the input
e.g.
input =
1 2 3 4 5 6 7 8 9 10 11 12 ...
2年弱 前
解決済み
house of cards
How many cards do one need to build a house of cards with n stages?
Short explanation:
/\ 2 cards for 1 stage
...
2年弱 前
解決済み
balance vector
Given a non-empty vector x with integer elements. x shall be called balance vector if one can split the elements of x into two g...
2年弱 前
解決済み
fractal circles
Create a fractal with circles using the same process as the
Sierpinski triangle (https://en.wikipedia.org/wiki/Sierpinski_trian...