結果
問題 | No.2971 無理積分 |
ユーザー |
|
提出日時 | 2024-11-29 22:39:32 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 28 ms / 1,000 ms |
コード長 | 445 bytes |
コンパイル時間 | 1,625 ms |
コンパイル使用メモリ | 167,528 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-29 22:39:37 |
合計ジャッジ時間 | 4,153 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 36 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> P; #define REP(i,n) for(int i=0;i<int(n);i++) int main(void){ cin.tie(nullptr); ios_base::sync_with_stdio(false); int i,j; double N; cin >> N; double ans=0; double d=1.0/10000000; for(i=0;i<10000000;i++){ double t=(2*i+1)*d/2; ans+=d*sqrt(t*t*t+N*N*N); } cout << fixed << setprecision(12) << ans << endl; return 0; }