Draw 'F'
Draw a x-by-x matrix 'F' using 1 and 0. (x is odd and bigger than 4)
Example:
x=5
ans=
[1 1 1 1 1
1 0 0 0 0
...
3年弱 前
解決済み
Draw 'E'
Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4)
Example:
x=5
ans=
[1 1 1 1 1
1 0 0 0 0
...
3年弱 前
解決済み
Draw 'D'.
Draw a x-by-x matrix 'D' using 0 and 1.
example:
x=4
ans=
[1 1 1 0
1 0 0 1
1 0 0 1
1 1 1 0]
3年弱 前
解決済み
Draw 'C'.
Given x as input, generate a x-by-x matrix 'C' using 0 and 1.
example:
x=4
ans=
[0 1 1 1
1 0 0 0
...
3年弱 前
解決済み
Draw 'B'
Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4)
Example:
x=5
ans=
[1 1 1 1 0
1 0 0 0 1
...
3年弱 前
解決済み
Find out sum and carry of Binary adder
Find out sum and carry of a binary adder if previous carry is given with two bits (x and y) for addition.
Examples
Previo...
3年弱 前
解決済み
Relative ratio of "1" in binary number
Input(n) is positive integer number
Output(r) is (number of "1" in binary input) / (number of bits).
Example:
* n=0; r=...
Polite numbers. N-th polite number.
A polite number is an integer that sums of at least two consecutive positive integers.
For example _7 = 3+4_ so 7 is a polite...
3年弱 前
解決済み
Polite numbers. Politeness.
A polite number is an integer that sums of two or more consecutive positive integers.
Politeness of a positive integer is a num...
Is this number Munchhausen?
In this problem, simply return 1 if a supplied number is Munchhausen or 0 if not.
Example
153 is narcissistic but not a Munchh...
3年弱 前
解決済み
Evil Number
Check if a given natural number is evil or not.
Read more at <https://oeis.org/A001969 OEIS>.
3年弱 前
解決済み
Compute Fibonacci Number
Compute the n-th Fibonacci Number
f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296
3年弱 前
解決済み
Armstrong Number
Determine whether the given input n-digit number is Armstrong Number or not.
Return True if it is an Armstrong Number. An n-Dig...
3年弱 前
解決済み
Bell Number calculator
Calculate a vector of Bell numbers for sets up to length n. Bell numbers are the maximum number of partitions of a set. See the ...
3年弱 前
解決済み
Kaprekar numbers
Test if the input is a Kaprekar number: <http://mathworld.wolfram.com/KaprekarNumber.html>. Return a logical true or false.
...