Solving Quadratic Equations (Version 1)
Quadratic equations have the form: ax^2 + bx + c = 0. Example: x^2 + 3x + 2 = 0, where a = 1, b = 3, and c = 2. The equation has...
3年以上 前
解決済み
Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...
3年以上 前
解決済み
Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise
3年以上 前
解決済み
Golden ratio
Calculate the golden ratio. Hint: phi^2 = phi + 1.
3年以上 前
解決済み
square root
Find the square root (y) of an input (x).
3年以上 前
解決済み
imaginary results
Return the value of the imaginary number i to the power of input argument n.
3年以上 前
解決済み
Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...
3年以上 前
解決済み
Draw 'P' !!!
Draw a n by n matrix 'P' using 0s and 1s. (n is odd and greater than 4)
if n=5 , then the output will be
[1 1 1 1 1
1 0 0 0...
3年以上 前
解決済み
Determine if input is a Narcissistic number
<http://en.wikipedia.org/wiki/Narcissistic_number Narcissistic number> is a number that is the sum of its own digits each raised...
3年以上 前
解決済み
Divisors for big integer
Inspired by Problem 1025 and Project Euler 12.
Given n, return the number y of integers that divide N.
For example, with ...