Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4
So if n = 3, then return
[1 2 2 3 3 3]
And if n = 5, then return
[1 2 2 3 3 3 4...
11 months 前
已解决
Combined Ages 1 - Symmetric, n = 3
You have probably seen the common riddle wherein combined ages are provided and you must determine the individual ages. For exam...
Kepler's Equation
Solve <http://en.wikipedia.org/wiki/Kepler's_equation Kepler's Equation>.
Note that the solution is rounded down to 5 decima...
1 year 前
已解决
An Ohm's Law Calculator
*BACKGROUND / MOTIVATION:*
Many important observations in math and science can be described by short, but powerful, equations...
1 year 前
已解决
Multiply 2 numbers
Very easy, you just have to multiply 2 numbers
but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, pro...
5 years 前
已解决
Swap two numbers
Example
Input:
a = 10
b = 20
Output
a = 20
b = 10