You’ve reached the Final Chamber, where a glowing pedestal displays a sequence of numbers.
The inscription reads:
“Only the sum of prime digits shall open the gate.”
Given a vector of positive integers nums, find the sum of all digits that are prime numbers (2, 3, 5, or 7) in the entire sequence.
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers57
Suggested Problems
-
The MATLAB Treasure Hunt – Unlock the Final Chamber by Solving the Ancient Numeric Cipher
57 Solvers
More from this Author46
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!