結果
| 問題 | No.1271 初めての級数 |
| コンテスト | |
| ユーザー |
Nachia
|
| 提出日時 | 2020-10-30 21:23:33 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 322 bytes |
| 記録 | |
| コンパイル時間 | 1,628 ms |
| コンパイル使用メモリ | 166,400 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-21 23:05:22 |
| 合計ジャッジ時間 | 2,245 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 WA * 1 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
#define rep(i,n) for(int i=0; i<(n); i++)
int main() {
LL K; cin >> K;
double ans = 0.;
for(LL i = 1; i <= K; i++) {
ans += 1 / double(K * i);
}
cout << fixed << setprecision(10);
cout << ans << endl;
return 0;
}
Nachia