Search found 4 matches

by CodeJerk
Mon May 30, 2005 2:56 pm
Forum: Volume 101 (10100-10199)
Topic: 10139 - Factovisors
Replies: 80
Views: 38742

But is there an end condition?

The question doesnt specify any end condition, like, for e.g., that the last input is 0 0, which is *not* to be processed.
If u got AC could you plz tell me what was the end condition u specified.
Thanks in advance.
CJ
by CodeJerk
Mon May 30, 2005 8:32 am
Forum: Volume 101 (10100-10199)
Topic: 10139 - Factovisors
Replies: 80
Views: 38742

10139 Better Algorithm ?

Hi I tried solving Problem: 10139 but got a Time Limit Exceeded error. What I was doing was, starting from n, i was calculating the gcd(n,m) and dividing m by gcd(n,m). m = m/gcd (m,n) then i did the same with n-1, and so on, till m was reduced to 1, or n became 1. Sometimes, one gets a large prime ...
by CodeJerk
Sun May 29, 2005 8:40 am
Forum: Volume 101 (10100-10199)
Topic: 10110 - Light, more light
Replies: 76
Views: 36664

Doesnt even Compile!!!

Actually I was trying my code at the Programming Challenges website, where I was repeatedly getting a PE. After seeing that the code was getting accepted at the online-judge, I did try mailing it. I mailed the following :- /* @JUDGE_ID: 62454TK 10110 C++ */ /* @BEGIN_OF_SOURCE_CODE */ #include <iost...
by CodeJerk
Sun May 29, 2005 1:13 am
Forum: Volume 101 (10100-10199)
Topic: 10110 - Light, more light
Replies: 76
Views: 36664

10110 Presentation Error

Hi I get a PE with this program. Its driving me crazy now. Could some1 plz tell me why i m getting it. Thanks in advance. #include <iostream.h> #include <math.h> int main() { int flag = 1; unsigned long i; while (flag) { cin >> i; if (i != 0) { double value = i; double sqrtvalue = sqrt(value); if (f...

Go to advanced search