結果
問題 | No.1272 珍しい級数 |
ユーザー |
![]() |
提出日時 | 2021-02-25 22:09:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 324 bytes |
コンパイル時間 | 569 ms |
コンパイル使用メモリ | 73,060 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-01 13:15:01 |
合計ジャッジ時間 | 2,236 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 50 |
ソースコード
#include <iostream> #include <iomanip> #include <cmath> using namespace std; int main(){ cout<<setprecision(15); double k,ans=0; cin>>k; for(int n=1;n<=10;n++){ int cnt=n; double den=1; while(cnt) {den*=n;cnt--;} ans+=sin(n*k)/den; } cout<<ans<<endl; return 0; }