import java.util.Scanner;
/**
* Solucion al problema: 1805 - A+B Complejo [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 leer los datos
long a, b;
long suma;
// AQUI INICIA EL PROGRAMA
Lee = new Scanner(System.in);
a = Lee.nextInt();
b = Lee.nextInt();
suma = 2 * a + 2 * b; // 2a+2b = (a+b) + (a-b) + (b+a) + (b-a)
System.out.println(suma);
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: 1805 - A+B Complejo [http://coj.uci.cu] con Java
Para ver el link del problema Click aqui
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment