結果

問題 No.8072 Sum of sqrt(x)
ユーザー 山田太郎
提出日時 2023-05-05 22:53:57
言語 C++14
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
OLE  
実行時間 -
コード長 300 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,233 ms
コンパイル使用メモリ 181,592 KB
実行使用メモリ 19,328 KB
最終ジャッジ日時 2026-05-17 05:08:47
合計ジャッジ時間 24,520 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5 OLE * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;

int main(){
  cout<<fixed<<setprecision(17);
  ll n;
  cin>>n;
  vector<ld> x(n);
  for(ll i=0;i<n;i++){
    cin>>x[i];
  }
  ld ans=0.0;
  for(ll i=0;i<n;i++){
    ans+=(ld)sqrt(x[i]);
    cout<<ans<<endl;
  }
}
0