Problem 45264. Restricted Addition v3
This problem is Restricted Addition v2 with more restrictions. Also, you must handle complex values.
Add two numbers without use of common arithmetic operations. Unfortunately, in order to enforce this restriction, other restrictions are imposed. For example, use of 'e' is restricted to prevent use of 'eval' functions.
Until the Cody test system is changed, the hack below will work (as it currently does on every Cody problem). However, this type of solution is not appreciated.
function ans = fileread(~), ''
Other hacks are appreciated. If you can circumvent the restrictions (with your code running when called by tests 2, 3, ...) to use addition, then you have a valid and welcomed solution.
This version of the problem does not require hacks at all, just some basic MATLAB creativity!
See also:
Restricted Addition v1, Restricted Addition v2, Restricted Addition v3, Restricted Addition v4
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers15
Suggested Problems
-
Return the largest number that is adjacent to a zero
5345 Solvers
-
Find state names that end with the letter A
1177 Solvers
-
Project Euler: Problem 9, Pythagorean numbers
1151 Solvers
-
Circular Primes (based on Project Euler, problem 35)
494 Solvers
-
Find the sides of an isosceles triangle when given its area and height from its base to apex
1911 Solvers
More from this Author9
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!