- 博客(7)
- 收藏
- 关注
转载 441. Arranging Coins
You have a total ofncoins that you want to form in a staircase shape, where everyk-th row must have exactlykcoins. Givenn, find the total number offullstaircase rows that can be formed. ...
2018-06-04 21:30:00 68
转载 836. Rectangle Overlap
A rectangle isrepresented as alist[x1, y1, x2, y2], where(x1, y1)are the coordinates of its bottom-left corner, and(x2,y2)are the coordinates of its top-right corner. Two rectangles ov...
2018-06-01 00:51:00 64
转载 415. Add Strings(还是字符串加减)
Given two non-negative integersnum1andnum2represented as string, return the sum ofnum1andnum2. Note: The length of bothnum1andnum2is < 5100. Bothnum1andnum2contains...
2018-06-01 00:38:00 100
转载 258. Add Digits
Given a non-negative integernum, repeatedly add all its digits until the result has only one digit. Example: Input: 38 Output: 2 Explanation: The process is like: 3 + 8 = 11, 1 + ...
2018-05-30 01:10:00 71
转载 67. Add Binary(字符串加减,三目运算符)
Given two binary strings, return their sum (also a binary string). The input strings are bothnon-emptyand contains only characters1or0. Example 1: Input: a = "11", b = "1" Output: "1...
2018-05-28 21:25:00 97
转载 717. 1-bit and 2-bit Characters
We have two special characters. The first character can be represented by one bit0. The second character can be represented by two bits (10or11). Now given a string represented by several bit...
2018-05-23 21:39:00 57
转载 约瑟夫问题(转载)
问题描述 约瑟夫问题:有n只猴子,按顺时针方向围成一圈选大王(编号从1到n),从第1号开始报数,一直数到m,数到m的猴子退出圈外,剩下的猴子再接着从1开始报数。就这样,直到圈内只剩下一只猴子时,这个猴子就是猴王,编程求输入n,m后,输出最后猴王的编号。 输入 每行是用空格分开的两个整数,第一个是 n, 第二个是 m ( 0 < m,n <=300)。最后一行是:0 0 ...
2017-11-27 17:10:00 138
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人