結果
| 問題 | No.1271 初めての級数 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-18 10:14:38 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 259 bytes |
| 記録 | |
| コンパイル時間 | 1,724 ms |
| コンパイル使用メモリ | 209,420 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-15 05:22:04 |
| 合計ジャッジ時間 | 2,054 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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);
}