Check if the input is a balanced prime - MATLAB Cody - MATLAB Central

Problem 47798. Check if the input is a balanced prime

Difficulty:Rate
More about Balanced Primes on Wikipedia.
isBalancedPrime(3) = false;
isBalancedPrime(7) = false;
isBalancedPrime(5) = true; % since (3+7)/2 = 5

Solution Stats

43.48% Correct | 56.52% Incorrect
Last Solution submitted on Jul 25, 2024

Problem Comments

Solution Comments

Show comments
AI Is Transforming Engineering Workflows
It’s an honor to deliver the keynote at MATLAB EXPO 2025. I'll...
0
MATLAB EXPO 2025 Registration is Now Open! November 12 – 13, 2025
Registration is now open for MathWorks annual virtual event MATLAB EXPO 2025...
0

Problem Recent Solvers28

Suggested Problems

More from this Author92

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!