thanks, i got rid of RE. But now i am getting WA :x . please help........
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
long long GCD(long long a,long long b)
{
if (!b) return a;
if (!a) return b;
if (a%b==0) return b;
return GCD(b,a%b);
}
int main()
{
int T,p;
scanf("%d", &T ...
Search found 2 matches
- Thu Jan 30, 2014 10:25 am
- Forum: Volume 118 (11800-11899)
- Topic: 11827 - Maximum GCD
- Replies: 22
- Views: 8709
- Wed Jan 29, 2014 6:59 pm
- Forum: Volume 118 (11800-11899)
- Topic: 11827 - Maximum GCD
- Replies: 22
- Views: 8709
11827 - Maximum GCD
Hello, i,m getting runtime error for this code. can any body point out the bug please. really need help .....
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
long long GCD(long long a,long long b)
{
if (a%b==0) return b;
return GCD(b,a%b);
}
int main()
{
int T,p;
scanf("%d", &T ...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
long long GCD(long long a,long long b)
{
if (a%b==0) return b;
return GCD(b,a%b);
}
int main()
{
int T,p;
scanf("%d", &T ...