Problem 61039. The MATLAB Treasure Hunt – Unlock the Final Chamber by Solving the Ancient Numeric Cipher

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

75.0% Correct | 25.0% Incorrect
Last Solution submitted on Oct 27, 2025

Solution Comments

Show comments