晚上赶在睡觉之前AC的,好久没有刷过题目了。题目描述如下:
We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself.Now, given an integer n, write a function that ...
阅读全文…
今天有时间参加了一下Leetcode Weekly Contest 116,参加的比较晚,完成两题之后没时间做其他的了,在这里写一下完成的两题中的一题。题目如下:
Given an array A of integers, a ramp is a tuple (i, j) for which i < j and A[i] <= A[j]. The width of ...
阅读全文…