Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James
A generalised Hamming number of type n, has no prime factor larger ...
5年以上 前
解決済み
~~~~~~~ WAVE ~~~~~~~~~
|The WAVE generator|
Once upon a time there was a river. 'Sum' was passing by the river. He saw the water of the river that w...
5年以上 前
解決済み
Make roundn function
Make roundn function using round.
x=0.55555
y=function(x,1)
y=1
y=function(x,2)
y=0.6
y=function(x,3)
...
5年以上 前
解決済み
Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...
How many Integers?
Count the integers in a given vector |v|.
You *must* use a loop to count each element separately.
Examples:
Input: v...
5年以上 前
解決済み
Calculate Inner Product
Given two input matrices, |x| and |y|, check if their inner dimensions match.
* If they match, create an output variable |z|...
Quadratic equation
given three inputs (a, b, c) for the equation a*x^2+b*x+c=0; return 1 if the roots are complex (non zero imaginary), and 0 if th...
約6年 前
解決済み
Check prime numbers
Let x, return 1 if x is a prime number, 0 otherwise
e.g x = 7, return y =1;
x = 6 return y = 0;
約6年 前
解決済み
Summing Rows and Columns
Create a matrix y of size (n+1) whose last column's elements are the summation of the elements of all the other columns and last...