// UVa 11879 - Multiple of 17 import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { BigInteger seventeen = BigInteger.valueOf(17); Scanner scanner = new Scanner(System.in); BigInteger n = scanner.nextBigInteger(); while (n.compareTo(BigInteger.ZERO) != 0) { if (n.mod(seventeen).compareTo(BigInteger.ZERO) == 0) System.out.println("1"); else System.out.println("0"); n = scanner.nextBigInteger(); } } }
No comments:
Post a Comment