TimeX
Subscribe
Tagged

perfect number

A collection of 1 post

leetcode

[leetcode]507. Perfect Number

问题描述: 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 returns true when it is a perfect number and false when it is not. Example: Input: 28 Output:

  • xinyu
xinyu Oct 22, 2020 • 1 min read
TimeX © 2023
  • 博客首页
Powered by Ghost