I found your problem running under linux/gcc: the double->u32 conversion truncates downward in your inner loop on this case. I imagine the libraries are enough different that you were unlucky this time. Try modifying it as follows:
u32CatsPerHat = (uint32)(dCatsPerHat + .0001);
Search found 4 matches
- Mon Jul 28, 2003 2:35 pm
- Forum: Volume 1 (100-199)
- Topic: 107 - The Cat in the Hat
- Replies: 278
- Views: 54877
- Mon Jul 28, 2003 7:38 am
- Forum: Volume 1 (100-199)
- Topic: 107 - The Cat in the Hat
- Replies: 278
- Views: 54877
- Sat Jul 26, 2003 5:18 pm
- Forum: Volume 1 (100-199)
- Topic: 107 - The Cat in the Hat
- Replies: 278
- Views: 54877
Re: 107 Wrong answer (many examples)
Input:
My AC program's output:
Your output:
Good luck!
Code: Select all
216 125
0 0
Code: Select all
31 671
Code: Select all
4294967205 215
- Fri Jul 11, 2003 12:26 am
- Forum: Volume 102 (10200-10299)
- Topic: 10267 - Graphical Editor
- Replies: 190
- Views: 77185