LeetCode 69. Sqrt(x)

發表於2022-04-28文章字數228字所需閱讀時間1 分鐘
  • Ping's notes
首頁leetcode

# 思路

開根號

# 參考程式碼

static auto fast_io = []
{
	ios::sync_with_stdio(false);
	cout.tie(nullptr);
	cin.tie(nullptr);
	return 0;
}();

class Solution {
public:
    int mySqrt(int x)
    {
        return sqrt(x);
    }
};
LeetCode
更新於 2025-02-26
  • 作者:PingHe@
  • 文章連結:https://www.pinghenotes.com/leetcode/LeetCode-69-Sqrt-x/
  • 版權聲明:本網誌所有文章除特別聲明外,均採用 (CC)BY-NC-SA 許可協議。轉載請註明出處!
上一篇leetcode

LeetCode 67. Add Binary

下一篇leetcode

LeetCode 70. Climbing Stairs

  1. 1. 思路
  2. 2. 參考程式碼
  • LeetCode 1. Two Sum
  • LeetCode 9. Palindrome Number
  • LeetCode 13. Roman to Integer
  • LeetCode 14. Longest Common Prefix
  • LeetCode 20. Valid Parentheses
  • LeetCode 21. Merge Two Sorted Lists
  • LeetCode 26. Remove Duplicates from Sorted Array
  • LeetCode 27. Remove Element
  • LeetCode 28. Implement strStr()
  • LeetCode 35. Search Insert Position
  • LeetCode 53. Maximum Subarray
  • LeetCode 58. Length of Last Word
  • LeetCode 66. Plus One
  • LeetCode 67. Add Binary
  • LeetCode 69. Sqrt(x)
  • LeetCode 70. Climbing Stairs
  • LeetCode 83. Remove Duplicates from Sorted List
  • LeetCode 88. Merge Sorted Array
  • LeetCode 94. Binary Tree Inorder Traversal
  • LeetCode 100. Same Tree
  • LeetCode 101. Symmetric Tree
  • LeetCode 104. Maximum Depth of Binary Tree
  • LeetCode 108. Convert Sorted Array to Binary Search Tree
  • LeetCode 110. Balanced Binary Tree
PingHe

PingHe

152文章
5分類
53標籤
  • 首頁
  • 關於
  • 文章
    • 歸檔
    • 分類
    • 標籤
  • 朋友

    隨機文章

    • Uva Problems
      UVa 11228 - Transportation System
    • game
      A=B Steam One-Instruction Esolang Walkthrough
    • Uva Problems
      UVa 11988 - Broken Keyboard (a.k.a. Beiju Text)
    • Uva Problems
      UVa 725 - Division
    • Uva Problems
      UVa 11463 - Commandos
    • Uva Problems
      UVa 168 - Theseus and the Minotaur
    • leetcode
      LeetCode 100. Same Tree
    • Uva Problems
      UVa 357 - Let Me Count The Ways
    • Uva Problems
      UVa 11418 - Clever Naming Patterns
    • Uva Problems
      UVa 481 - What Goes Up

    最新評論

    © 2020 -2026PingHe @ Ping's notes
    310k 字 | 4:42
    基於 Hexo & Theme.ShokaX