Search found 2 matches

by KAI10
Thu Jan 30, 2014 10:25 am
Forum: Volume 118 (11800-11899)
Topic: 11827 - Maximum GCD
Replies: 22
Views: 3884

Re: 11827 maximum GCD

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); T++; for...
by KAI10
Wed Jan 29, 2014 6:59 pm
Forum: Volume 118 (11800-11899)
Topic: 11827 - Maximum GCD
Replies: 22
Views: 3884

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); T++; for...

Go to advanced search