You are viewing a single comment's thread. Return to all comments →
public static String solve(int a, int b, int c) {
// char* solve(int a, int b, int c) { int c1=hcf(a,b); if(c<=Math.max(a,b)&&c%c1==0) return "YES"; else return "NO";
} public static int hcf(int n1, int n2) { if (n2 != 0) return hcf(n2, n1 % n2); else return n1; } }
Seems like cookies are disabled on this browser, please enable them to open this website
Die Hard 3
You are viewing a single comment's thread. Return to all comments →
// char* solve(int a, int b, int c) { int c1=hcf(a,b); if(c<=Math.max(a,b)&&c%c1==0) return "YES"; else return "NO";
} public static int hcf(int n1, int n2) { if (n2 != 0) return hcf(n2, n1 % n2); else return n1; } }