Given the number N with an even number of digits. If the sum of the first half of the digits equals the sum of the second half of the digits, then this number is considered lucky. For a given number, output "YES" if this number is lucky, otherwise output "NO".
Processing strings
Lucky number
Report a typo
Sample Input 1:
12344321Sample Output 1:
YESSample Input 2:
125322Sample Output 2:
NOWrite a program in Kotlin
fun main() {
// write your code here
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.