摘要: enumerate 函数用于遍历序列中的元素以及它们的下标:>>> for i,j in enumerate(('a','b','c')):print i,j0 a1 b2 c>>> for i,j in enumerate([1,2,3]):print i,j0 11 22 3>>> for i,... 阅读全文
posted @ 2015-02-06 15:57 pku_smile 阅读(465) 评论(0) 推荐(0) 编辑
摘要: 标题:Gray Code通过率:32.4%难度:中等The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrep... 阅读全文
posted @ 2015-02-06 15:54 pku_smile 阅读(223) 评论(0) 推荐(0) 编辑