Submit | All submissions | Best solutions | Back to list |
S3P2 - GCD |
GCD (Greatest Common Divisor) between a and b is the greatest number n where both a and b are divisible by n.
Input
Input contains 2 number a b where 1<=a, b<=100000
Output
Print the GCD between a and b. Print endl after the test case.
Example
Input: 6 8 Output: 2
Added by: | mohamed gamal |
Date: | 2012-01-27 |
Time limit: | 2s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | C++ 4.3.2 CPP |