View Code of Problem 87

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int get = Integer.valueOf(scanner.nextLine());
        if (get % 2 == 0) {
            if (get % 4 == 2) {
                System.out.println(((get / 4) + 1) + " " + get / 2);
            } else {
                System.out.println(get / 4 + " " + get / 2);
            }
        } else {
            System.out.println("0 0");
        }
    }

}

Double click to view unformatted code.


Back to problem 87