Package

Source Code of Main

import java.util.Scanner;
import java.math.BigInteger;

public class Main {
  public static void main(String[] args) {
    Scanner cin = new Scanner(System.in);
    while (cin.hasNext()) {
      BigInteger n = cin.nextBigInteger();
      if (n.compareTo(BigInteger.ZERO) == 0) {
        break;
      }
      BigInteger r = n.mod(BigInteger.valueOf(17));
      if (r.compareTo(BigInteger.ZERO) == 0) {
        System.out.println("1");
      } else {
        System.out.println("0");
      }
    }
    cin.close();
  }
}
TOP

Related Classes of Main

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.