Search found 4 matches

Tue Aug 28, 2012 7:12 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 193650

Re: If you get WA in problem 100, read me before post!

Here is my code . I couldn,t find any problem at this.. Someone help me please..... /*100 - the 3n + 1 */ #include<stdio.h> long int first, second; main() { long int i, j, a; int cycle, temp=0; while(scanf("%ld%ld", &i, &j)==2) { first = i; second = j; cycle=0; for(first; first<=second; first++) { a...
Thu Aug 16, 2012 9:55 pm
Forum: Volume 113 (11300-11399)
Topic: 11340 - Newspaper
Replies: 154
Views: 45703

Re: 11340 - Newspaper

This is my code. It Output the reult for given test but I still getting wrong ans. Plz somebody help me to debug #include <stdio.h> #include <string.h> long long int cent=0; double dollar; int kee, mee, id; char sign = '\$'; void cost(char array[], char paid[], int paidi[]); double cent_dollar(long i...
Sat Jul 28, 2012 2:29 am
Forum: Volume 108 (10800-10899)
Topic: 10812 - Beat the Spread!
Replies: 35
Views: 18553

Re: 10812 - Beat the Spread!

Thanks Bro.
Fri Jul 27, 2012 1:56 pm
Forum: Volume 108 (10800-10899)
Topic: 10812 - Beat the Spread!
Replies: 35
Views: 18553

Re: 10812 - Beat the Spread!

Can Anyone help me finding problem at this code? I got wrong answer every time . Help me please #include <stdio.h> int main() { long int n, s, d, difference, big, small; int i, count=0; scanf("%ld", &n); for(i=0; i<n; ++i) { scanf("%ld %ld", &s, &d); if(d>s) { printf("impossible"); } else if(d==0 &&...