結果

問題 No.1272 珍しい級数
ユーザー forest3
提出日時 2025-03-20 20:40:22
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 103 ms / 2,000 ms
コード長 350 bytes
コンパイル時間 3,093 ms
コンパイル使用メモリ 160,740 KB
実行使用メモリ 7,324 KB
最終ジャッジ日時 2025-03-20 20:40:34
合計ジャッジ時間 8,358 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/fenwicktree>
using namespace atcoder;

using ll = long long;
#define rep(i, n) for(int i = 0; i < n; i++)

int main() {
	ll k;
	cin >> k;
	long double ans = 0;
	ll n = 1;
	rep(i, 1000000) {
		ans += sin(n * k) / pow(n, n);
		n++;
	}
	cout << fixed << setprecision(12) << ans << endl;
} 
0