結果
問題 | No.1272 珍しい級数 |
ユーザー | umezo |
提出日時 | 2020-10-30 21:36:49 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 433 bytes |
コンパイル時間 | 2,409 ms |
コンパイル使用メモリ | 192,796 KB |
最終ジャッジ日時 | 2025-01-15 16:53:25 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 50 |
ソースコード
#define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(v) v.begin(), v.end() typedef long long ll; #include <bits/stdc++.h> using namespace std; ll pow(ll x,ll n){ ll ans=1; while(n){ if(n&1) ans=ans*x; x=x*x; n/=2; } return ans; } int main(){ int k; cin>>k; double ans=0; for(double i=1;i<10;i++){ ans+=sin(k*i)/pow(i,i); } cout<<fixed<<setprecision(10)<<ans<<endl; return 0; }