二进制
文章平均质量分 50
Mlong54
这个作者很懒,什么都没留下…
展开
-
负数的二进制表示方法
/* 再次声明此文章是转载的转载 2014-10-22 08:44:12 · 534 阅读 · 0 评论 -
Curious Robin Hood
Robin Hood likes to loot rich people since he helps the poor people with this money. Instead of keeping all the money together he does another trick. He keeps n sacks where he keeps this money. The sa原创 2014-11-06 09:41:55 · 751 阅读 · 0 评论 -
Stars -树状数组
Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are not higher an原创 2014-11-06 21:28:02 · 558 阅读 · 0 评论 -
LeetCode-476. Number Complement
题目链接:476. Number Complement 题目描述:给你一个正整数,求这个正整数的二进数的值,全部取反后的整数的值。 这个正整数是一个小于32位的整数 你可以认为这个二进制数没有前导0,也就是说二进制数的第一位一定是1 这道题就没啥说的了,将给的正整数转化为二进制数,取反后再转化为整数,返回结果就ok。我的代码(很渣):class Solution(object): def f原创 2017-09-18 15:15:17 · 436 阅读 · 0 评论