We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Debugging
- Smart Number
- Discussions
Smart Number
Smart Number
Sort by
recency
|
124 Discussions
|
Please Login in order to post a comment
Here is my c++ solution, you can watch video explanation here : https://youtu.be/Qs9rxqfzTs8
Why this problem doesnt support JavaScript language
import java.io.; import java.util.; import java.text.; import java.math.; import java.util.regex.*;
public class Solution { public static boolean isSmartNumber(int num) { int val = (int) Math.sqrt(num);
if(num / val == 1) return true; return false; }
}
I didn't understand the approch they want to do. so I think in my way and make changes in a single line of that code. though my output and expected output are same. It's still showing wrong answer. So, I think it not only watching for the output but also watching for whitch line and what changed. Here is my first approch.
and here is the expected approch.
I'm doing this question as a part of Mountblue coding challenge. There is no "Reset" button on the editor. Even my output matches the expected output, it still gives "wrong answer"
And at the end of the code there is an "undefined" written in teh code editor