結果
問題 |
No.1118 sin(x)/xの二乗和
|
ユーザー |
|
提出日時 | 2020-07-17 23:17:40 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 574 bytes |
コンパイル時間 | 1,034 ms |
コンパイル使用メモリ | 106,428 KB |
最終ジャッジ日時 | 2025-01-11 23:26:21 |
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 20 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <map> #include <queue> #include <cstdio> #include <ctime> #include <assert.h> #include <chrono> #include <random> #include <numeric> #include <set> using namespace std; typedef long long int ll; typedef unsigned long long ull; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); double x; cin >> x; double res=0; if(x==0){ res+=1; x+=1.0; } for(int i=0;i<2e8;i++){ res+=(sin(x)/(x))*(sin(x)/(x)); x+=1.0; } printf("%.9f\n",res); }