import java.util.Scanner;

public class GreatesCommonDivisor {
	public static int gcd(int a, int b) {
		int current_gcd = 1;
		for (int d = 2; d <= a && d <= b; ++d) {
			if (a % d == 0 && b % d == 0) {
				if (d > current_gcd) {
					current_gcd = d;
				}
			}
		}

		return current_gcd;
	}

	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt();
		int b = scanner.nextInt();

		System.out.println(gcd(a, b));
	}
}

@@ -97,16 +97,97 @@
  b) %7B%0A%09%09
+return recursiveGcd(a, b, 1);%0A%09%7D%0A%0A%09private static int recursiveGcd(int a, int b, 
 int curr
@@ -193,17 +193,14 @@
 rent
-_gcd = 1;
+Gcd) %7B
 %0A%09%09f
@@ -282,68 +282,67 @@
 %09%09%09%09
-if (d %3E current_gcd) %7B%0A%09%09%09%09%09
+return recursiveGcd(a / d, b / d, 
 current
-_gcd =
+Gcd *
  d
+)
 ;%0A
-%09
 %09%09%09%7D%0A%09%09
-%09%7D%0A%09%09%7D%0A
+%7D
 %0A%09%09r
@@ -358,10 +358,9 @@
 rent
-_g
+G
 cd;%0A

Improve efficiency