結果

問題 No.1272 珍しい級数
ユーザー IlagIlag
提出日時 2020-10-30 21:45:30
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 401 bytes
コンパイル時間 1,378 ms
コンパイル使用メモリ 167,660 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-21 23:59:55
合計ジャッジ時間 7,486 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const long long INF = 1001001001;
const long long MOD = 1000000007;
const double EPS = 1e-10;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    ll k;
    cin>>k;
    long double ans=0;
    for(ll i=1;;i++){
        if(i>1e6)break;
        ans+=sin(k*i)/pow(i,i);
    }
    cout<<fixed<<setprecision(12)<<ans<<endl;
}
0