Language: C++

#pragma GCC optimize("O3")
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
#include <bitset>
using namespace std;

using ll = long long;
using P = pair<int, int>;
using T = tuple<int, int, int>;

template <class T> inline T chmax(T &a, const T b) {return a = (a < b) ? b : a;}
template <class T> inline T chmin(T &a, const T b) {return a = (a > b) ? b : a;}

constexpr int MOD = 1e9 + 7;
constexpr int inf = 1e9;
constexpr long long INF = 1e18;
constexpr double pi = acos(-1);
constexpr double EPS = 1e-10;

int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};

int main(){#pragma GCC optimize("O3")
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
#include <bitset>
using namespace std;

using ll = long long;
using P = pair<int, int>;
using T = tuple<int, int, int>;

template <class T> inline T chmax(T &a, const T b) {return a = (a < b) ? b : a;}
template <class T> inline T chmin(T &a, const T b) {return a = (a > b) ? b : a;}

constexpr int MOD = 1e9 + 7;
constexpr int inf = 1e9;
constexpr long long INF = 1e18;
constexpr double pi = acos(-1);
constexpr double EPS = 1e-10;

int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n; cin>>n;
    double sum = 0;
    for(int i=0; i<n; i++){
        double a; cin>>a;
        sum += 1 / a;
    }

    printf("%.10f\n", 1 / sum);
}
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n; cin>>n;
    double sum = 0;
    for(int i=0; i<n; i++){
        double a; cin>>a;
        sum += 1 / a;
    }

    cout << fixed << setprecision(10) << 1 / sum << endl;
}

Compiler output:
a.cc:45:12: error: stray '#' in program
   45 | int main(){#pragma GCC optimize("O3")
      |            ^
a.cc: In function 'int main()':
a.cc:45:13: error: 'pragma' was not declared in this scope; did you mean '_Pragma'?
   45 | int main(){#pragma GCC optimize("O3")
      |             ^~~~~~
      |             _Pragma
a.cc:77:1: error: a template declaration cannot appear at block scope
   77 | template <class T> inline T chmax(T &a, const T b) {return a = (a < b) ? b : a;}
      | ^~~~~~~~
a.cc:89:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   89 | int main(){
      |         ^~
a.cc:89:9: note: remove parentheses to default-initialize a variable
   89 | int main(){
      |         ^~
      |         --
a.cc:89:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:89:11: error: a function-definition is not allowed here before '{' token
   89 | int main(){
      |           ^