A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
|
|
@ -0,0 +1,9 @@
|
|||
public static long gcd(long a, long b){
|
||||
long factor= Math.max(a, b);
|
||||
for(long loop= factor;loop > 1;loop--){
|
||||
if(a % loop == 0 && b % loop == 0){
|
||||
return loop;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue