View Code of Problem 87

  import java.util.Scanner;
     
    public class Main {
    	public static void main(String[] args) {
    		Scanner scan = new Scanner(System.in);
          int n=scan.nextInt();
          
          if(n%2!=0){
            System.out.print(0+" "+0);}
          else{
            int a=n/2;
            
            
            int b=n/4+n%4/2;
            
            System.out.print(b+" "+a);
            
          }
          
          
        
            
          }
    	}

Double click to view unformatted code.


Back to problem 87