One Line Java


  • 1

    public class Solution {
    public boolean checkPerfectNumber(int num) {
    return (num^6) * (num^28) * (num^496) * (num^8128) * (num^33550336)==0;
    }
    }


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.