結果
| 問題 |
No.1118 sin(x)/xの二乗和
|
| コンテスト | |
| ユーザー |
fastmath
|
| 提出日時 | 2020-07-19 05:07:21 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 847 bytes |
| コンパイル時間 | 1,709 ms |
| コンパイル使用メモリ | 165,204 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-15 18:16:11 |
| 合計ジャッジ時間 | 6,392 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 20 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define ii pair <int, int>
#define app push_back
#define all(a) a.begin(), a.end()
#define bp __builtin_popcountll
#define ll long long
#define mp make_pair
#define f first
#define s second
#define Time (double)clock()/CLOCKS_PER_SEC
#define debug(x) std::cout << #x << ": " << x << '\n';
#define double long double
signed main() {
#ifdef HOME
freopen("input.txt", "r", stdin);
#else
#define endl '\n'
ios_base::sync_with_stdio(0); cin.tie(0);
#endif
double ans = 0;
double x;
cin >> x;
auto f = [] (double x) {
if (x == 0)
return (double)1.;
else
return sinl(x)/x;
};
for (; x < 1e6; ++x)
ans += f(x) * f(x);
cout.precision(20);
cout << fixed;
cout << ans << endl;
}
fastmath