标签:return written codeforce include sig com style type span
原题题面:https://codeforces.com/contest/1293/problem/B
解题思路:
Σi=1~n 1/i
???
1 /* 2 Written By. StelaYuri 3 On 2020/01/19 4 */ 5 #include<bits/stdc++.h> 6 using namespace std; 7 typedef long long ll; 8 int a[1005],b[1005]; 9 void solve(){ 10 int n,i; 11 cin>>n; 12 double ans=0; 13 for(i=1;i<=n;i++) 14 ans+=1.0/i; 15 printf("%.12f\n",ans); 16 } 17 int main(){ 18 solve(); 19 20 return 0; 21 }
Codeforces Round #614 (Div. 2) B - JOE is on TV!
标签:return written codeforce include sig com style type span
原文地址:https://www.cnblogs.com/stelayuri/p/12216105.html