結果

問題 No.8072 Sum of sqrt(x)
ユーザー tarakojo1019
提出日時 2021-01-16 23:41:07
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
OLE  
実行時間 -
コード長 1,008 bytes
コンパイル時間 1,205 ms
コンパイル使用メモリ 111,528 KB
実行使用メモリ 13,764 KB
最終ジャッジ日時 2024-11-28 14:10:20
合計ジャッジ時間 81,427 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 4 OLE * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<math.h>
#include<algorithm>
#include<stdint.h>
#include<vector>
#include<deque>
#include<stack>
#include<functional>
#include<string>
#include<numeric>
#include<cstring>
#include<random>
#include<array>
#include<fstream>
#include<iomanip>
#include<list>
#include<set>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<bitset>
#include<queue>

/*
#include<boost/multiprecision/cpp_int.hpp>
using namespace boost::multiprecision;
*/

using namespace std;

using ll = long long;
using ull = unsigned long long;

#define REP(i,a,b) for(ll i = a; i < b; ++i)
#define PRI(s) std::cout << s << endl
#define PRIF(v, n) printf("%."#n"f\n", (double)v)

template<typename A, typename B>void mins(A& a, const B& b) { a = min(a, (A)b); };
template<typename A, typename B>void maxs(A& a, const B& b) { a = max(a, (A)b); };



int main() {
	ll N; cin >> N;
	long double sum = 0;
	REP(i, 0, N) {
		long double x; cin >> x;
		sum += sqrtl(x);
		PRIF(sum, 30);
	}
	return 0;
}
0