MCPcopy Create free account
hub / github.com/ROUTINE-STUDY/Algorithm / sqrt

Class sqrt

LeetCode/Math/69. Sqrt(x)/kaki5507.java:3–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1package leetcodeLv2;
2
3public class sqrt {
4
5 public static void main(String[] args) {
6
7 // Math 함수를 이용한다.
8 // (int)형으로 반환해야 함. Math.sqrt가 long 타입으로 반환해주기 때문.
9 class Solution {
10 public int mySqrt(int x) {
11 return (int)Math.sqrt(x);
12 }
13 }
14
15
16 }
17
18}

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected