結果

問題 No.8072 Sum of sqrt(x)
ユーザー takekinmkk
提出日時 2020-09-22 22:28:59
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
OLE  
実行時間 -
コード長 1,194 bytes
コンパイル時間 2,118 ms
コンパイル使用メモリ 168,388 KB
実行使用メモリ 18,944 KB
最終ジャッジ日時 2024-06-26 22:15:18
合計ジャッジ時間 18,300 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 4 OLE * 1 -- * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, from, to) for (ll i = from; i < (to); ++i)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define sz(x) (int)(x).size()
#define pb push_back
using ll = long long;
using ld=long double;
using vin=vector<int>;
using vvin=vector<vin>;
using vll=vector<ll>;
using vvll=vector<vll>;
using vst=vector<string>;
using P = pair<ll,ll>;
const int inf=1e9+7;
const ll INF=9e18;
const long double PI = acos(-1.0);
template <typename T> bool chmin(T &a, const T& b){if(a > b){a = b;return true;}return false;}
template <typename T> bool chmax(T &a, const T& b){if(a < b){a = b;return true;}return false;}
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
const int dx[4] = { 1, 0, -1, 0 };
const int dy[4] = { 0, 1, 0, -1 };

int main(){cout<<fixed<<setprecision(20);
		  int n;
		  cin>>n;
		  vector<ld> x(n);
		  rep(i,0,n)cin>>x[i];
		  ld sum=0;
		  rep(i,0,n){
		      sum+=sqrt(x[i]);
		      cout<<sum<<endl;
		  }
}
0