結果
| 問題 |
No.1271 初めての級数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-08-11 15:25:31 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 282 bytes |
| コンパイル時間 | 2,569 ms |
| コンパイル使用メモリ | 243,464 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-08-11 15:25:34 |
| 合計ジャッジ時間 | 3,543 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 WA * 1 |
ソースコード
// #define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
int k;
int main(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
cout<<fixed<<setprecision(15);
cin>>k;
double ans=0;
for(int i=1;i<=k;i++){
ans+=1/(double)i;
}
cout<<ans/k<<endl;
}