結果
問題 |
No.1271 初めての級数
|
ユーザー |
|
提出日時 | 2020-11-18 10:14:38 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 259 bytes |
コンパイル時間 | 2,048 ms |
コンパイル使用メモリ | 190,652 KB |
最終ジャッジ日時 | 2025-01-16 01:29:59 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 WA * 1 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int k; cin >> k; double res=0.0; for(int i=1;i<=k;i++){ res+=1.0/(double)i; } res/=(double)k; printf("%.9f\n",res); }