結果
| 問題 |
No.1118 sin(x)/xの二乗和
|
| コンテスト | |
| ユーザー |
夕叢霧香(ゆうむらきりか)
|
| 提出日時 | 2019-09-28 11:41:26 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 459 bytes |
| コンパイル時間 | 968 ms |
| コンパイル使用メモリ | 96,296 KB |
| 最終ジャッジ日時 | 2025-01-07 19:47:21 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 20 |
ソースコード
#include<algorithm>
#include<iostream>
#include<cmath>
#include<vector>
#include<iomanip>
using namespace std;
typedef long long lint;
typedef vector<int>vi;
typedef pair<int,int>pii;
#define rep(i,n)for(int i=0;i<(int)(n);++i)
#define ANS0 2.07079632677096370230
#define N 1000000
double sinc(double x){return x==0?1:sin(x)/x;}
int main(){
double x;cin>>x;
double a=ANS0;
rep(i,N){
a+=sinc(x+i)-sinc(i);
}
cout<<setprecision(15)<<a<<endl;
}
夕叢霧香(ゆうむらきりか)