Codeforces Round #614 (Div. 2) B - JOE is on TV!

Posted stelayuri

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Codeforces Round #614 (Div. 2) B - JOE is on TV!相关的知识,希望对你有一定的参考价值。

原题题面: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
",ans);
16 }
17 int main(){
18     solve();
19     
20     return 0;
21 }

以上是关于Codeforces Round #614 (Div. 2) B - JOE is on TV!的主要内容,如果未能解决你的问题,请参考以下文章

Codeforces Round #614 (Div. 2)

Codeforces Round #614 (Div. 2)

Codeforces Round #614 选讲

Codeforces Round #614 (Div. 2)

Codeforces Round #614 (Div. 2)

Codeforces Round #614 (Div. 2) A-E简要题解