摘要:
//原题链接https://leetcode.com/problems/third-maximum-number/ 题目描述 Given a non-empty array of integers, return the third maximum number in this array. If 阅读全文
摘要:
//原题链接https://leetcode.com/problems/ipo/ 题目描述 Suppose LeetCode will start its IPO soon. In order to sell a good price of its shares to Venture Capital 阅读全文
摘要:
//原题链接https://leetcode.com/problems/my-calendar-iii/submissions/ 题目描述 Implement a MyCalendarThree class to store your events. A new event can always b 阅读全文
摘要:
package javaPractice; //2是第一个素数,3是第二个素数,则第100001个素数是多少 //思路:把每个素数的倍数扔掉 public class Contest21 { public static void main(String[] args) { int n = 10000 阅读全文
摘要:
设 A rem B || A mod B 生成机制 取余:采取fix()函数,向0方向取整 取模:采取floor()函数,向无穷小方向取整当A,B异号时(其实同号也是这个规律…) 取余:结果和A同号 取模:结果和B同号 eg: 1.①5 mod 2 = 1 ②5 rem 2 = 1 ③-5 mod 阅读全文