2 solutions

  • 2
    @ 2025-7-18 17:04:26

    #include <bits/stdc++.h> using namespace std;

    int main() { double x, n, s = 1.0; cin >> x >> n; for (int i = 1; i <= n; i++) { s = (s + x / s) / 2; } cout << fixed << setprecision(3) << s; return 0; }

    Information

    ID
    205
    Time
    1000ms
    Memory
    64MiB
    Difficulty
    2
    Tags
    # Submissions
    55
    Accepted
    35
    Uploaded By