import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc=new Scanner(System.in);
int N=sc.nextInt();
String str=Integer.toString(N);
int even=0;
int odd=0;
for(int i=0;i<str.length();i++){
int digit=str.charAt(i)-‘0’;
if(i%2!=0){
odd+=digit;
}
}
System.out.println(odd);
for(int i=0;i<str.length();i++){
int digit=str.charAt(i)-'0';
if(i%2==0){
even+=digit;
}
}
System.out.println(even);
}
}
what s wrong with my code and test cases are failing