eolymp
bolt
Try our new interface for solving problems
Problems

Square root

published at 6/7/21, 9:57:40 am

hi help me

published at 5/2/24, 8:57:29 pm

include <bits/stdc++.h>

define ll long long int

define ld long double

using namespace std; int main() { iosbase::syncwith_stdio(0); cin.tie(0); cout.tie(0); ll n; cin >> n;

int sum = 0;
int temp = n;
while (temp > 0) {
    sum += temp % 10;
    temp /= 10;
}


double sqrt_sum = sqrt(sum);


cout << fixed << setprecision(3) << sqrt_sum << endl;



return 0;

} //SANS NEVER DIES...