提交时间:2023-12-23 17:12:00

运行 ID: 32999

#include<bits/stdc++.h> using namespace std; int main(){ int n; float c=0; cin>>n; for(int i=1;i<=n;i++){ c+= 1.0/i; } cout<<fixed<<setprecision(6)<<c; }