U E D R , A S I H C RSS

최대공약수/문보창

소감

소스

Gcd.java

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

public class Gcd 
{
	public static void main(String[] args) 
	{
		Scanner input = new Scanner(System.in);
		BigInteger bigInteger1, bigInteger2, gcdNum;
		bigInteger1 = input.nextBigInteger();
		bigInteger2 = input.nextBigInteger();
		gcdNum = bigInteger1.gcd(bigInteger2);
		System.out.println("The GCD of " + bigInteger1 + " and " + bigInteger2 + " is " + gcdNum);		
	}
}

나한테 할 말

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2009-05-27 07:09:19
Processing time 0.0830 sec