Problem 74. Balanced number

Created by Cody Team in Community

Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to the second half.


 Input  n = 13722 
 Output tf is true

because 1 + 3 = 2 + 2.

 Input  n = 23567414 
 Output tf = true

All palindrome numbers are balanced.

This is partly from Project Euler, Problem 217.

Solution Stats

46.61% Correct | 53.39% Incorrect
Last solution submitted on Mar 22, 2019

Problem Comments

Solution Comments

Recent Solvers1440

Suggested Problems

More from this Author95


Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!