結果

問題 No.81 すべて足すだけの簡単なお仕事です。
ユーザー Demystify
提出日時 2022-05-05 21:31:31
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 648 bytes
コンパイル時間 7,795 ms
コンパイル使用メモリ 362,520 KB
最終ジャッジ日時 2025-01-29 02:30:35
ジャッジサーバーID
(参考情報)
judge1 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
// --------------------------------------------------------

// Reference: https://boostjp.github.io/tips/multiprec-float.html
#include <boost/multiprecision/cpp_dec_float.hpp>
typedef boost::multiprecision::cpp_dec_float_50 f50;  // 10進数の桁数が50の浮動小数点数型

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(10);

    int N; cin >> N;
    f50 ans = 0.0;
    for (int i = 0; i < N; i++) {
        f50 x; cin >> x;
        ans += x;
    }
    cout << ans << '\n';

    return 0;
}
// Verify: https://yukicoder.me/problems/no/81
0