Cody

Problem 74. Balanced number

Created by Cody Team in Cody Challenge

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.

Examples:

 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

45.85% Correct | 54.15% Incorrect
Last solution submitted on May 14, 2019

Problem Comments

Solution Comments

Recent Solvers1475

Suggested Problems

More from this Author95

Tags