Monday, December 22, 2008

a solemn vow

I have sworn a solemn vow to myself than I will code at least one problem each day, in preperation for NOI.

And I've been, uh, doing well so far. I submitted Gift yesterday, and Prime today.

Although in my frank opinion, Gift was kinda like a cheat because I coded it in all of 20 minutes. Debugging included, which with me usually takes about an hour and a half and a MSN convo with whichever instructor's online at the moment.

Prime... well, Prime was actually more of a three-days-worth of work kinda question. I've been working on it since Sunday, where my program screwed up and I asked Zhenghao, who told me that I should try recoding it. So on Monday I tried recoding it, but it screwed up again. And finally today, Tuesday, I asked Pangwei for more help, and then I discovered a bug. -_- I wonder why my debugging instincts only ever kick in AFTER I've asked someone for help and disturbed them.

Anyway the program was still buggy after that, and I couldn't figure out what the hell was wrong until Pangwei pointed it out to me: the 10000th prime (Which I was supposed to be finding) is 104279, and I'd mixed up the numbers and was checking until a number smaller than 104280. Lol.

But at least Prime was finally solved. After three damn days.

Gosh, I hate debugging.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home