QWERTY coordinates
Given a lowercase letter or a digit as input, return the row where that letter appears on a <http://en.wikipedia.org/wiki/Keyboa...
約5年 前
解決済み
Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once.
Example:
Input s ...
約5年 前
解決済み
Word Distance - Sum
Let's suppose that the distance of a word can be calculated by summing the differences between its letters, having assigned the ...
約5年 前
解決済み
Pi Digit Probability
Assume that the next digit of pi constant is determined by the historical digit distribution. What is the probability of next di...
約5年 前
解決済み
Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
What is the Nth prime nu...
約5年 前
解決済み
Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series:
pi/4 = 1 - 1/3 + 1/5 - 1/7 + ...
For a given numbe...
Pi Estimate 1
Estimate Pi as described in the following link:
<http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>
約5年 前
解決済み
Calculate area of sector
A=function(r,seta)
r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...
約5年 前
解決済み
Stairs
Make an n by n matrix, where the elements are ones and zeros. In the main diagonal, and under that, there should be only ones (...
約5年 前
解決済み
Problem for beginners
M is a nxm matrix. Swap the fist and the second last column with eachother.
X=[1 2 3;4 5 6;7 8 9]
Y=[2 1 3;5 4 6;8 7 9]
約5年 前
解決済み
Mid-term report
You just got your mid-term report, but it's full of ones and twos :(. So before you give it to your parents, you change it, in o...
約5年 前
解決済み
Simple Matrix
Make the following matrix without typing it in one by one.
[1 2 3;
2 4 6;
4 8 12]
x=[1 2 3].
約5年 前
解決済み
Problem for beginners
Suppose that x is a column vector, with at least a length of 6. Delete the 2., 6., and the second last row.
Example:
X=[1;2;3...
約5年 前
解決済み
Box
Give the volume of a box, x is equal to the body diagonal.
約5年 前
解決済み
Square
X is a number, write a code, where Y should be the square of X.
約5年 前
解決済み
Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.