Related sum of the halves of a number

Given a non-negative integer nn, compute the sum of the digits in the first and in the second halves of nn. Your program must also indicate the order relationship among those quantities. This computation has to be done only when the number of digits of nn is even.

 
The first half of a number with ll digits (for even ll) is formed by the l2\frac{l}{2} left digits and the second half is formed by the l2\frac{l}{2} right digits. For example, the number 7072444470724444, has first half 70727072 and second half 44444444.

Input

The input is a non-negative integer nn with 0n<2310 \leq n < 2^{31}.

Output

The sum of the digits of the first half and the sum of the digits of the second half together with their relationship, provided that the number of digits is even.

 
Follow the format of the examples.

Problem information

Author: Unknown
Translator: Maria J. Serna

Generation: 2026-01-25T16:47:02.677Z

© Jutge.org, 2006–2026.
https://jutge.org