testcases's output & run output mismatch


  • 0
    N

    class Solution { public: bool checkPerfectNumber(int num) { int b=1,c=0; cin>>num; while(b<num) { if(num%b==0) c=c+b; b++; } if(c==num) return(true); else return(false); } }; //the custom testcase is showing correct ouptut but after running it , its showing the same output ie:- 8128 wrong. what to do?


Log in to reply
 

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