nord vpnnord vpn
Ad

Problem G

mail@pastecode.io avatar
unknown
c_cpp
a month ago
240 B
7
Indexable
Never
#include <bits/stdc++.h>

using namespace std;

int main() {
    int n;
    cin >> n;
    double sum = 0;
    for (int i = 1; i <= n; ++i) {
        sum += 1 / double(i);
    }
    cout << fixed << setprecision(6) << sum;
    return 0;
}



nord vpnnord vpn
Ad