06 2013 档案

摘要:Problemhttp://code.google.com/codejam/contest/dashboard?c=433101#s=p0TheSnapperis a clever little device that, on one side, plugs its input plug into an output socket, and, on the other side, exposes an output socket for plugging in a light or other device.When aSnapperis in the ON state and is rece 阅读全文
posted @ 2013-06-29 02:23 pgu2 阅读(211) 评论(0) 推荐(0)
摘要:Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.Solution:void putlong(unsigned long n){ if( n<10) { putchar(n%10+'0'); } else { putlong(n/10); putchar(n%10+'0'); } } For exa... 阅读全文
posted @ 2013-06-26 03:23 pgu2 阅读(167) 评论(0) 推荐(0)