結果
問題 |
No.1118 sin(x)/xの二乗和
|
ユーザー |
![]() |
提出日時 | 2020-07-19 05:03:40 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 840 bytes |
コンパイル時間 | 3,141 ms |
コンパイル使用メモリ | 162,480 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-15 17:05:36 |
合計ジャッジ時間 | 45,382 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 18 TLE * 2 |
ソースコード
#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 < 1e7; ++x) ans += f(x); cout.precision(20); cout << fixed; cout << ans << endl; }