Search found 136 matches

by Joseph Kurniawan
Wed Jul 26, 2006 7:17 am
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 30701

I believe the length of the 5000'th fibo is more than 1001 digits.
Try to increase the array size.
Btw, does the strrev() work? I thought that it would give compile error.
by Joseph Kurniawan
Sun Jul 09, 2006 10:04 am
Forum: Volume 103 (10300-10399)
Topic: 10324 - Zeros and Ones
Replies: 179
Views: 43582

What problem are you working at?
Is it 10324 - Zeros and Ones?
Besides this is the forum for Volume I --> for prob 100 until 199.
by Joseph Kurniawan
Sat Jul 08, 2006 7:23 am
Forum: Volume 2 (200-299)
Topic: 271 - Simply Syntax
Replies: 46
Views: 12473

If you're trying to use a certain C function, you should first check it's portability in UNIX. How do we do that? Quite simple. For example : You're trying to use getch(); Move your cursor to the getch(); and then press Ctrl+F1. The help Screen which provides all information about getch(); will appe...
by Joseph Kurniawan
Wed Nov 12, 2003 3:27 pm
Forum: Volume 101 (10100-10199)
Topic: 10197 - Learning Portuguese
Replies: 45
Views: 15754

Hello sumankar, maybe it'll be more helpful if you post your code here so it can be evaluated. Or at least you can tell where your confusion lies. Besides I think (only a thought, not yet a conclusion) that the judging for this prob is buggy (Note that this is merely an assumption). I'll post later ...
by Joseph Kurniawan
Mon Nov 10, 2003 5:27 am
Forum: Volume 103 (10300-10399)
Topic: 10323 - Factorial! You Must be Kidding!!!
Replies: 106
Views: 32362

From a quick glance at your program, I can tell that it can't handle negative input. Perhaps you should see previous posts about this prob.
Good luck!!! :wink: :wink: :wink:
by Joseph Kurniawan
Mon Nov 10, 2003 5:01 am
Forum: Volume 3 (300-399)
Topic: 369 - Combinations
Replies: 101
Views: 17313

What compiler do you use? Is it standard BC 3.1. like mine or gcc that the judge use? I assume that as long the code right, the output will be correct as well. The judge simply read your code, compile it and compare the result with their test file. So I assume for gcc, your code produces correct out...
by Joseph Kurniawan
Sat Nov 08, 2003 4:29 pm
Forum: Volume 102 (10200-10299)
Topic: 10235 - Simply Emirp
Replies: 150
Views: 31359

I'm really really sorry for the false info. It seems my BC is broken. Now I've fixed it. :oops: :oops: :oops: :oops:
by Joseph Kurniawan
Sat Nov 08, 2003 4:21 pm
Forum: Volume 102 (10200-10299)
Topic: 10293 - Word Length and Frequency
Replies: 18
Views: 7850

Well, you can try scanf() and printf() instead of cin and cout since these two I/O handler of C++ works quite slow compared to C I/O handler.
Hope it helps!! :wink: :wink:
by Joseph Kurniawan
Sat Nov 08, 2003 4:03 pm
Forum: Volume 100 (10000-10099)
Topic: 10018 - Reverse and Add
Replies: 169
Views: 17904

For each of the N tests you will have to write a line with the following data : minimum number of iterations (additions) to get to the palindrome and the resulting palindrome itself separated by one space. See the word 'minimum'. That signals that the number of iteration might be zero (no iteration...
by Joseph Kurniawan
Sat Nov 08, 2003 3:38 pm
Forum: Volume 4 (400-499)
Topic: 443 - Humble Numbers
Replies: 82
Views: 7171

Hi Shaka, have you solved it now?? if you have, could you mail me your program? I solved this in 25ms and I'm still curious with those guys solved this prob in 0.000 sec. Thanx!! Btw, I'm binusian too (2006). And that picture in your avatar, is that Shaka the Virgo Gold Saint from the anime Saint Se...
by Joseph Kurniawan
Sat Nov 08, 2003 3:21 pm
Forum: Volume 1 (100-199)
Topic: 160 - Factors and Factorials
Replies: 205
Views: 24733

Well Maarten,
maybe you should post your code so I can examine it!! :wink: :wink: :wink:
by Joseph Kurniawan
Wed Oct 29, 2003 4:26 pm
Forum: Algorithms
Topic: finding angle between 3 points
Replies: 13
Views: 3709

Well xbeanx, if your problem is only to rid of the negative angle (I assume that your algo to calculate angle is correct), you just need to add conditional statement: if ( angle > 360 || angle < -360 ) angle = floor ( angle / 360 ) if ( angle < 0 ) angle = 360 + angle I think those two conditional s...
by Joseph Kurniawan
Wed Oct 29, 2003 8:14 am
Forum: Volume 102 (10200-10299)
Topic: 10235 - Simply Emirp
Replies: 150
Views: 31359

I think you should revise your isprime() function.
For the input 6, your program will output:
6 is prime.
Where the correct output should be 6 is not prime.
Hope this helps!! :wink: :wink:
by Joseph Kurniawan
Wed Oct 29, 2003 7:59 am
Forum: Volume 102 (10200-10299)
Topic: 10252 - Common Permutation
Replies: 150
Views: 51579

Hello Riyad, Your algo seems very complex for this prob. I suggest you to use this method: 1. Handle input using gets(). --> you've done this 2. Use temp1 and temp2 respectively to evaluate string1 and string2. 3. Use this function: [c] for(i=0, j=strlen(string1) ; i<j ;i++){ if(string1 <97) string1...
by Joseph Kurniawan
Wed Oct 29, 2003 7:12 am
Forum: Algorithms
Topic: finding angle between 3 points
Replies: 13
Views: 3709

Can you specify more which angle you want to find??
Check this out:

*A




*B *C

From these three points, there are three angles can be formed:
1. ABC
2. ACB
3. BAC

So which angle do you want to calculate?

Go to advanced search