摘要: Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". 思路:二进制加法计算的步骤: 1、将二进制转化成字符串的形式,这样从高位到地位 阅读全文
posted @ 2015-12-13 21:07 wangb021 阅读(158) 评论(0) 推荐(0)
摘要: 题目:Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is li 阅读全文
posted @ 2015-12-13 20:50 wangb021 阅读(159) 评论(0) 推荐(0)