import java.math.BigInteger;
import java.util.Scanner;
/**
* Solucion al problema: 1102 - You Can Say 11 [http://coj.uci.cu]
*
* @author BreakDark (Jhonny Monrroy)
* @version 1.0 beta 11 de jun. de 2016
*/
// Accepted!!! xD
public class Main {
public static void main(String[] args) {
Scanner Lee; // para ler datos
BigInteger n; // el numero a evaluar
BigInteger once = new BigInteger("11");
// AQUI INICIA EL PROGRAMA
Lee = new Scanner(System.in);
n = new BigInteger(Lee.next());
while (!n.equals(BigInteger.ZERO)) {
if (n.mod(once).equals(BigInteger.ZERO)) {
System.out.println(n + " is a multiple of 11.");
} else {
System.out.println(n + " is not a multiple of 11.");
}
n = new BigInteger(Lee.next());
}
Lee.close();
}
}
Blog dedicado a la publicación de artículos, programas propios, traducciones de Roms de Nes, super Nes y mas, y alguno que otro artículo sobre tecnologia.
Sunday, June 12, 2016
Solucion al problema: 1102 - You Can Say 11 [http://coj.uci.cu] con java
Para ver el link del problema Click aqui
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment