Expand 10^n to Powers of 4
Given an integer n, return the coefficients
c = [c_n,c_n-1,...,c_0]
Such that
10^n = c_n*4^(n) + c_n-1*4^(n-1...
4年弱 前
解決済み
Muphry's Law of MATLAB
You're running some simple multiplication problems through MATLAB for error checking purposes, but nothing seems to come up with...
4年弱 前
解決済み
Restricted Addition v3
This problem is <https://www.mathworks.com/matlabcentral/cody/problems/45258-restricted-addition-v2 Restricted Addition v2> with...
4年弱 前
解決済み
Restricted Addition v2
This problem is Restricted Addition v1 with more restrictions. Also, you must handle negative and non-integer values.
Add two n...
4年弱 前
解決済み
Restricted Addition v1
Add two numbers without use of common arithmetic operations. Unfortunately, in order to enforce this restriction, other restrict...
Easy Sequences 12: 50th Prime
Write a function that outputs the th prime after a given number . For example, the th prime after is .
NOTE: If itself is pr...
How long does it take to run a bath?
Given the *volume flow rate* (volume/time) of a faucet and the *volume* of a bath tub, find the amount of time it takes to fill ...
約4年 前
解決済み
Integer complexity (Large numbers)
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/42831-integer-complexity Problem 42831>, this problem aims to ...
約4年 前
解決済み
Integer complexity
Given an array, n, of positive integers, return an array, c, of the same size, in which each element is the <https://en.wikipedi...
i forgot to use capital I
When referring to yourself you should write "I" (capital) and not "i".
So correct the input string x, but be aware that other u...
Remove element(s) from cell array
You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....
約4年 前
解決済み
Maximum of ND-array
Find the maximum element of a N dimensional array.
Example:
A=[1 2 4 ; -20 4 10];
The maximum is 10.
Find the nth composite number.
Everyone heard about the nth prime number. Let's try to find out the nth composite. For example , 1 is the first composite, 10 i...