criyle/codenet-compile-errors huggingface dataset:
Language: C

#include<stdio.h>
int main(void){
  int n;
  scanf("%d",&n);
  double a[n],sum;
  for(i=0;i<n;i++){
    scanf("%f",&a[i]);
    a[i]=1/a[i];
    sum+=a[i];
  }
  printf("%d",1/sum);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: 'i' undeclared (first use in this function)
    6 |   for(i=0;i<n;i++){
      |       ^
main.c:6:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

int main(){
    int N;
    cin >> N;
    vector<long double> vec(N);
    for(int i=0; i<N; i++){
      cin >> vec[i];
    }
    long double j = 0;
    for(int i=0; i<N; i++){
        j += 1/vec[i];
    }
    std::cout << std::setprecision(15) << 1/j;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> N;
      |     ^~~
a.cc:4:5: error: 'vector' was not declared in this scope
    4 |     vector<long double> vec(N);
      |     ^~~~~~
a.cc:4:12: error: expected primary-expression before 'long'
    4 |     vector<long double> vec(N);
      |            ^~~~
a.cc:6:14: error: 'vec' was not declared in this scope
    6 |       cin >> vec[i];
      |              ^~~
a.cc:10:16: error: 'vec' was not declared in this scope
   10 |         j += 1/vec[i];
      |                ^~~
a.cc:12:10: error: 'cout' is not a member of 'std'
   12 |     std::cout << std::setprecision(15) << 1/j;
      |          ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main(){
a.cc:12:23: error: 'setprecision' is not a member of 'std'
   12 |     std::cout << std::setprecision(15) << 1/j;
      |                       ^~~~~~~~~~~~
a.cc:1:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
  +++ |+#include <iomanip>
    1 | int main(){
Language: C++

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

int main() {
    double N;
    cin >> N;
    
    int ans = 0;
    for (int i=0;i<N;i++) {
        cin>>A;
        ans+=1/A;
    }

    cout << setprecision(7) << 1/ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'A' was not declared in this scope
   10 |         cin>>A;
      |              ^
Language: C

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

int main(void)
{
  int N;
  int i = 1;
  int A[100] = NULL;
  char input[5000];
  char *ptr;
  double sum=0;
  
  
  scanf("%d", &N);
  scanf("%s", input);
  
  A[0] = atoi(strtok(input, " "));
  while(ptr != NULL) {
    A[i] = atoi(strtok(NULL, " "));
    i++;
  }
  
  for(i=0;i<N;i++){
    sum += 1/A[i];
  }
  printf("%.7f", 1/sum);
  
  return 0;
}

Compiler output:
In file included from /usr/include/string.h:33,
                 from main.c:3:
main.c: In function 'main':
main.c:9:16: error: invalid initializer
    9 |   int A[100] = NULL;
      |                ^~~~
Language: C

#include <stdio.h>

int main(void){

  int N;
  scanf("%d",&N);
  int i;
  double A[N];
  double count=0;
  for(i=0;i<N;i++){
    scanf("%lf",&A[i]);
    count+=(double)1/A[i];
  }
  double ans;
  printf("%f",(double)1/count);
  

  return 0;
}
]
  
  

Compiler output:
main.c:20:1: error: expected identifier or '(' before ']' token
   20 | ]
      | ^
Language: C

#include<stdio.h>
int main (void) {
  
  int N,A[100];
  double B[100];
  
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &A[i]);
  }
  
 a = 0;
  for (int i = 0; i < N; i++) {
    a += 1 /A[i];
  }
  
  printf("%f", 1/a);
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:2: error: 'a' undeclared (first use in this function)
   12 |  a = 0;
      |  ^
main.c:12:2: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main (void) {
  
  int N,A[100];
  double B[100];　//逆数の配列
  
  //入力
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &A[i]);
  }
  
  //逆数の総和計をaに代入
  double a = 0.0;
  for (int i = 0; i < N; i++) {
    B[i] = 1 / (double)A[i];
    a += B[i];
  }
  
  //逆数の総和の逆数をbとする
  double b = 1 / a;
  
  printf("%f", b);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:17: error: stray '\343' in program
    5 |   double B[100];<U+3000>//<U+9006><U+6570><U+306E><U+914D><U+5217>
      |                 ^~~~~~~~
Language: C

#include<stdio.h>
int main (void) {
  
  int N,A[100];
  double B[100]; //Aの逆数の配列
  
  //標準入力
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &A[i]);
  }
  
  //逆数の総和をaに代入
  double a = 0.0;
  for (int i = 0; i < N; i++) {
    B[i] = 1 / (double)A[i];　
    a += B[i];
  }
  //逆数の総和の逆数をbとする
  double b = 1 / a;
  
  printf("%f", b);
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:16:29: error: stray '\343' in program
   16 |     B[i] = 1 / (double)A[i];<U+3000>
      |                             ^~~~~~~~
Language: C

#include<stdio.h>
int main (void) {
  
  int N,A[100];
  double B[100]; //Aの逆数の配列
  
  //標準入力
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &A[i]);
  }
  
  //逆数の総和をaに代入
  double a = 0.0;
  for (int i = 0; i < N; i++) {
    B[i] = 1 / (double)A[i];　
    a += B[i];
  }
  //逆数の総和の逆数をbとする
  double b = 1 / a;
  
  printf("%f", b);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:29: error: stray '\343' in program
   16 |     B[i] = 1 / (double)A[i];<U+3000>
      |                             ^~~~~~~~
Language: C

#include<stdio.h>
int main (void) {
  
  int N,A[100],B[100];
  
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &A[i]);
  }
  
  double a = 0;
  for (int i = 0; i < N; i++) {
    B[i] = 1 / A[i];
    a += B[i];
  }
  
  double b = 1 / a;
  
  printf("%5f", sum);
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:19:17: error: 'sum' undeclared (first use in this function)
   19 |   printf("%5f", sum);
      |                 ^~~
main.c:19:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main (void) {
  
  int N,A[100],B[100];
  
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &A[i]);
  }
  
  float a = 0;
  for (int i = 0; i < N; i++) {
    B[i] = 1 / A[i];
    a += B[i];
  }
  
  float b = 1 / a;
  
  printf("%f", sum);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:16: error: 'sum' undeclared (first use in this function)
   19 |   printf("%f", sum);
      |                ^~~
main.c:19:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main(){
int N;
  double r=0;
  cin>>N;
  vector<int> A(N);
  for(int i=0;i<N;i++);
  cin>>A.at(i);
  r+=1.0/A.at(i);
}
cout<<1.0/r<<endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'i' was not declared in this scope
   10 |   cin>>A.at(i);
      |             ^
a.cc: At global scope:
a.cc:13:1: error: 'cout' does not name a type
   13 | cout<<1.0/r<<endl;
      | ^~~~
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;




    int main(){
        int n;
        double ans = 0.0, a;
        std::cin >> n;
        for (int i = 1; i < n; ++i)
        {
            std::cin >> a;
            ans += 1.0 / a;
        }
        ans = 1.0 / ans;
        std::cout << setpercision(16) << ans << "\n";
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:19:22: error: 'setpercision' was not declared in this scope
   19 |         std::cout << setpercision(16) << ans << "\n";
      |                      ^~~~~~~~~~~~
Language: C++

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

int main(){
    int n;
    double res;
    cin >> n;
    vector<int> v(n);
    for(int i = 0;i < n;i++){
        cin >> v.at(i);
    }
        for(int j = 0;i < n;j++){
            res += 1/v.at(j);
        }
    res = 1/res;
    cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: 'i' was not declared in this scope
   14 |         for(int j = 0;i < n;j++){
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  
  int N;
  cin>>N;
  vector<int> A(N);
  double reversesum = 0;
  
  for(int i=0;i<N;i++){
    
    cin>>A.at(i);
    reversesum+=1.0/A.at(i));
    
  }
  
  double ans = 1.0/reversesum;
  
  printf("%.10f\n",ans);
  
  return 0;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:28: error: expected ';' before ')' token
   13 |     reversesum+=1.0/A.at(i));
      |                            ^
      |                            ;
Language: C++

#include <iostream>
using namespace std;
int main(void){
    
    int N;
    int A;
    double sum = 0.0;
    cin >> N;
    
    for(int i = 0; i < N; i++){
        cin >> A;
        sum += 1.0/A;
    }
    
    cout <<  << 1.0/sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: expected primary-expression before '<<' token
   15 |     cout <<  << 1.0/sum << endl;
      |              ^~
Language: C++

#include<iostream>
int main(){
  int n,s=0; cin>>n;
  for(int i=0;i<n;i++){float a;cin>>a; s+=1/a;}
  
  std::cout<<1/s; 
  return 0;
}  

Compiler output:
a.cc: In function 'int main()':
a.cc:3:14: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    3 |   int n,s=0; cin>>n;
      |              ^~~
      |              std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include <iostream>
#include <vector>

int main(){
  int n;
  cin >> n;
  std::vector<int> a;
  int temp;
  while(cin >> temp)
    a.push_back(temp);
  double sum = 0;
  for(auto i : a)
    sum += i;
  std::cout << 1/sum << std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> n;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

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

int main(){
  int n; cin >> n;
  int num[n];
  for(int i=0;i<n;i++){
    cin >> num(i);
  }
  double total=0;
  for(int i=0;i<n;i++){
    total += 1/num(i);
  }
  cout << 1/total << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: 'num' cannot be used as a function
    8 |     cin >> num(i);
      |            ~~~^~~
a.cc:12:19: error: 'num' cannot be used as a function
   12 |     total += 1/num(i);
      |                ~~~^~~
Language: C++

#pragma gcc optimize("Ofast")
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(V) (V).begin(),(V).end()
#define SORT(V) sort(ALL(V)) //小さい方からソート
#define REV(V) reverse(ALL(V)) //リバース
#define RSORT(V) REV(SORT(V)) //大きい方からソート
#define NPN(V) next_permutation(ALL(V)) //順列
#define pb(n) push_back(n)
#define endl '\n'
#define Endl '\n'
#define DUMP(x)  cout << #x << " = " << (x) << endl
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define RAPID cin.tie(0);ios::sync_with_stdio(false)
#define IN(n) cin >> n
#define IN2(a,b) cin >> a >> b
#define IN3(a,b,c) cin >> a >> b >> c 
#define VIN(V) for(int i = 0; i < (V).size(); i++) {cin >> (V).at(i);}
#define OUT(n) cout << n << endl
#define VOUT(V) for(int i = 0; i < (V).size(); i++) {cout << (V).at(i) << endl;}

// 型マクロ定義
#define int long long
#define P pair<ll,ll>
#define Vi vector<ll>
#define Vs vector<string>
#define Vc vector<char>
#define M map<ll,ll>
#define S set<ll>
#define PQ priority_queue<ll>
#define PQG priority_queue<ll,V,greater<ll>
//

const int MOD = 1000000007;
const int INF = 1061109567;
const double EPS = 1e-10;
const double PI  = acos(-1.0);

int gcd(int a,int b){return b?gcd(b,a%b):a;} //最小公倍数

// デフォルト変数定義
int n,m,a,b,c,x,y,z;
string s,t;
//

signed main() {
  RAPID;
  IN(n);
  V v(n);
  VIN(v)
  double sum = 0;
  REP(i,n) {
    sum += 1/(v[i]);
  }
  OUT(1/sum);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:55:3: error: 'V' was not declared in this scope
   55 |   V v(n);
      |   ^
a.cc:56:7: error: 'v' was not declared in this scope
   56 |   VIN(v)
      |       ^
a.cc:24:36: note: in definition of macro 'VIN'
   24 | #define VIN(V) for(int i = 0; i < (V).size(); i++) {cin >> (V).at(i);}
      |                                    ^
a.cc:59:15: error: 'v' was not declared in this scope
   59 |     sum += 1/(v[i]);
      |               ^
Language: C++

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

int main() {

	int N,ans=0; cin>>N;
  vector<int> A; 
  for(int i=0; i<N;i++){
    sum+=1/A.at(i);}
  
  cout<<1/sum<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'sum' was not declared in this scope
    9 |     sum+=1/A.at(i);}
      |     ^~~
a.cc:11:11: error: 'sum' was not declared in this scope
   11 |   cout<<1/sum<<endl;
      |           ^~~
Language: C

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void){
    int count,count2;
    int win=0,sum=0,sum2=0;
    int n;
    int b;
    int r=0,b=0,w;
    int a[105];
    double sum=0;
    char s[1050];
    scanf("%d",&n);
    for(count=1;count<=n;count++){
        scanf("%d",&a[count]);
    }
    for(count=1;count<=n;count++){
        sum=sum+(1.0/a[count]);
    }
    printf("%lf\n",sum);
    return 0;
}
 
int min(int a,int b){
    int ans;
    if(a>b){return b;}
    else {return a;}
}
 
int max(int a,int b){
    int ans;
    if(a>b){return a;}
    else {return b;}
}


Compiler output:
main.c: In function 'main':
main.c:9:13: error: redeclaration of 'b' with no linkage
    9 |     int r=0,b=0,w;
      |             ^
main.c:8:9: note: previous declaration of 'b' with type 'int'
    8 |     int b;
      |         ^
main.c:11:12: error: conflicting types for 'sum'; have 'double'
   11 |     double sum=0;
      |            ^~~
main.c:6:15: note: previous definition of 'sum' with type 'int'
    6 |     int win=0,sum=0,sum2=0;
      |               ^~~
Language: C

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void){
    int count,count2;
    int win=0,sum=0,sum2=0;
    int n;
    int b;
    int r=0,b=0,w;
    int maxval=99999,maxnum=0,sum=0;
    int a[105];
    double sum=0;
    char s[1050];
    scanf("%d",&n);
    for(count=1;count<=n;count++){
        scanf("%d",&a[count]);
    }
    for(count=1;count<=n;count++){
        sum=sum+(1.0/a[count]);
    }
    printf("%lf\n",sum);
    return 0;
}
 
int min(int a,int b){
    int ans;
    if(a>b){return b;}
    else {return a;}
}
 
int max(int a,int b){
    int ans;
    if(a>b){return a;}
    else {return b;}
}


Compiler output:
main.c: In function 'main':
main.c:9:13: error: redeclaration of 'b' with no linkage
    9 |     int r=0,b=0,w;
      |             ^
main.c:8:9: note: previous declaration of 'b' with type 'int'
    8 |     int b;
      |         ^
main.c:10:31: error: redefinition of 'sum'
   10 |     int maxval=99999,maxnum=0,sum=0;
      |                               ^~~
main.c:6:15: note: previous definition of 'sum' with type 'int'
    6 |     int win=0,sum=0,sum2=0;
      |               ^~~
main.c:12:12: error: conflicting types for 'sum'; have 'double'
   12 |     double sum=0;
      |            ^~~
main.c:10:31: note: previous definition of 'sum' with type 'int'
   10 |     int maxval=99999,maxnum=0,sum=0;
      |                               ^~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;

int main() {
  int n;
  double ans = 0.0, a
  cin >> n;
  for(int i = 1; i <= n; ++i) {
    cin >> a;
    ans += 1.0/a;
  }
  ans = 1.0/ans;
  cout setprecision(16) << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected initializer before 'cin'
   10 |   cin >> n;
      |   ^~~
a.cc:12:12: error: 'a' was not declared in this scope
   12 |     cin >> a;
      |            ^
a.cc:16:7: error: expected ';' before 'setprecision'
   16 |   cout setprecision(16) << ans << endl;
      |       ^~~~~~~~~~~~~
      |       ;
Language: C++

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

int main()
{
    int n,x;
    long double ans=0;
    cin>>n;
    fpr(int i=0;i<n;++i) cin>>x,ans+=1./x;
    cout<<fixed<<setprecision(10)<<1./ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected primary-expression before 'int'
    9 |     fpr(int i=0;i<n;++i) cin>>x,ans+=1./x;
      |         ^~~
a.cc:9:17: error: 'i' was not declared in this scope
    9 |     fpr(int i=0;i<n;++i) cin>>x,ans+=1./x;
      |                 ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
int sum=0,i,N,A[100];
float pr0=1;
cin>>N;
for(i=0;i<N;i++)
{
cin>>A[i];
sum=sum+A[i];
pro=pro*A[i];
}
cout<<pro/sum;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: 'pro' was not declared in this scope; did you mean 'pr0'?
   12 | pro=pro*A[i];
      | ^~~
      | pr0
a.cc:14:7: error: 'pro' was not declared in this scope; did you mean 'pr0'?
   14 | cout<<pro/sum;
      |       ^~~
      |       pr0
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cmath>
#include <limits>

using namespace std;

int main(){
	int n;
	double a[101],ans;
	
	cin >> n;
	
	for(int i=0;i<n;i++){
		cin >> a[i];
		
		ans += 1/a[i];
	}
	
	cout << setprecision(10) << 1/ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: 'setprecision' was not declared in this scope
   22 |         cout << setprecision(10) << 1/ans << endl;
      |                 ^~~~~~~~~~~~
a.cc:6:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    5 | #include<cmath>
  +++ |+#include <iomanip>
    6 | #include <limits>
Language: C

#include<stdio.h>
    int main(){
        int i, n;
            scanf("%d", &n);
                for(i = 0; i != n; i++){
                    int Ai;
                        scanf("%d", &Ai);
                    double Bi, s;
                        s = 0.0;
                            Bi = 1.0 / Ai;
                                s += Bi;
                }
                    printf("%f", 1.0 / s);
        return 0;
    }

Compiler output:
main.c: In function 'main':
main.c:13:40: error: 's' undeclared (first use in this function)
   13 |                     printf("%f", 1.0 / s);
      |                                        ^
main.c:13:40: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

/** omgursocute **/
#include <bits/stdc++.h>

using namespace std;
typedef int64_t ll;
typedef uint64_t ull;
typedef long double ld;

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

	int n;
	cin >> n;

	ld res = 0;
	while(n--) {
		ld x;
		cin >> x;
		res += 1.0/x;
	}

	cout << setpercision(16) << 1.0/res;

	cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << " ms.\n";
}

// g++ o .cpp -O2 -std=c++11 -D cute -Wall -Wno-unused-result



Compiler output:
a.cc: In function 'int main()':
a.cc:23:17: error: 'setpercision' was not declared in this scope
   23 |         cout << setpercision(16) << 1.0/res;
      |                 ^~~~~~~~~~~~
Language: C

#include<stdio.h>
#include<vector>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
int main()
{
    int N;
    scanf("%d", &N);
    vector<int> v(N);
    double sum = 0.0;
    
    rep(i, N){
        scanf("%d", &v[i]);
        sum += (double)1.0/v[i];
    }
    printf("%lf", 1.0/sum);
    return 0;
}

Compiler output:
main.c:2:9: fatal error: vector: No such file or directory
    2 | #include<vector>
      |         ^~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n; cin >> n;
  int a[n];
  for(int i=0; i < n; ++i){
    cin >> a[i];
  }
  int pans;
  for(int i=0; i < n; i++){
    pasn += 1/a[i];
  }
  cout << 1/pans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'pasn' was not declared in this scope; did you mean 'pans'?
   11 |     pasn += 1/a[i];
      |     ^~~~
      |     pans
Language: C++

#include <iostream>
#include <iomanip>

int main() {
  int N;
  double sum = 0.0d;
  
  for (int i=0, double temp; i<N; ++i) {
  	std::cin >> temp;
    sum += 1.0d / temp;
  }
  
  std::cout << std::setprecision(10) << std::fixed << 1.0d / sum << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected unqualified-id before 'double'
    8 |   for (int i=0, double temp; i<N; ++i) {
      |                 ^~~~~~
a.cc:8:16: error: expected ';' before 'double'
    8 |   for (int i=0, double temp; i<N; ++i) {
      |                ^~~~~~~
      |                ;
a.cc:8:28: error: expected initializer before ';' token
    8 |   for (int i=0, double temp; i<N; ++i) {
      |                            ^
a.cc:8:33: error: expected ')' before ';' token
    8 |   for (int i=0, double temp; i<N; ++i) {
      |       ~                         ^
      |                                 )
a.cc:8:37: error: 'i' was not declared in this scope
    8 |   for (int i=0, double temp; i<N; ++i) {
      |                                     ^
Language: C++

#define max_n 100

int N;
int A[1000];

int main() {

	cin >> N;

	double ans = 0.0;

	rep(i, N){
		int j = 0;
		cin >> j;
		ans += 1.0 / j;
	}

	printf("%f\n", 1.0/ans);

	return 0;	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> N;
      |         ^~~
a.cc:12:13: error: 'i' was not declared in this scope
   12 |         rep(i, N){
      |             ^
a.cc:12:9: error: 'rep' was not declared in this scope
   12 |         rep(i, N){
      |         ^~~
a.cc:18:9: error: 'printf' was not declared in this scope
   18 |         printf("%f\n", 1.0/ans);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #define max_n 100
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int[] b = new int[b];
    double c = 0;
    for(int i = 0;i < b.length;i++){
      b[i] = sc.nextInt();
    }
    for(int j = 0;j < b.length;j++){  
      c += 1 / b[j];   
    }
    c = 1 / c;
    System.out.println(c);
  }
}

Compiler output:
Main.java:6: error: incompatible types: int[] cannot be converted to int
    int[] b = new int[b];
                      ^
1 error
Language: C++

N = int(input())
A = [int(a) for a in input().split(" ")]

ans = 0
for i in A:
    ans += 1/i
    ans = round(ans,6)

ans = round(1/ans,6)
print(ans)

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N = int(input())
      | ^
Language: C++

using namespace std;
int main()
{
	int N;
	double S=0;
	vector<double> A;
	cin >> N;
 
	for(int i=0;i<N;i++){
		double t;
		cin >> t;
		S=S+(1/t);
	}
	cout << 1/S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'vector' was not declared in this scope
    6 |         vector<double> A;
      |         ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | using namespace std;
a.cc:6:16: error: expected primary-expression before 'double'
    6 |         vector<double> A;
      |                ^~~~~~
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> N;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:14:9: error: 'cout' was not declared in this scope
   14 |         cout << 1/S << endl;
      |         ^~~~
a.cc:14:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:24: error: 'endl' was not declared in this scope
   14 |         cout << 1/S << endl;
      |                        ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

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

it main(){
  int n, sum;
  sum = 0;
  cin >> n;
  vector<double> number(n);
  for(int i = 0; i < n; i++) cin >> number[i];
  for(int i = 0; i < n; i++) sum += 1.0 / number[i];
  cout << 1.0 / sum << endl; 
}

Compiler output:
a.cc:4:1: error: 'it' does not name a type; did you mean 'int'?
    4 | it main(){
      | ^~
      | int
Language: C

#include <stdio.h>

int main(){
  int i=1,n;
  scanf("%d",&n);
  int d[n];
  for(int i=0;i<n;i++){
    scanf("%d",&d[i]);
  }
  for(int i=0;i<n;i++){
    if(sosuu(d[i])==0){
      

Compiler output:
main.c: In function 'main':
main.c:11:8: error: implicit declaration of function 'sosuu' [-Wimplicit-function-declaration]
   11 |     if(sosuu(d[i])==0){
      |        ^~~~~
main.c:11:5: error: expected declaration or statement at end of input
   11 |     if(sosuu(d[i])==0){
      |     ^~
main.c:11:5: error: expected declaration or statement at end of input
main.c:11:5: error: expected declaration or statement at end of input
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF = 9999999999999999;
using ll = long long;
int main(){
  double N;
  cin>>N;
  double a[N];
  double p = 0;
  for(int i = 0;i<N;i++){
    cin>>a[i];
    p += 1/a[i];
  }
  cout << 1/p << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    9 |   double a[N];
      |            ^
a.cc:9:12: error: could not convert 'N' from 'double' to 'long unsigned int'
    9 |   double a[N];
      |            ^
      |            |
      |            double
a.cc:9:12: error: size of array 'a' has non-integral type 'double'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<double> a(n);
  for(int i=0; i<n; i++) cin >> a[i];
  a[i] = 1/a[i];
  double ans=0;
  for(int i=0; i<n; i++) ans += a[i];
  ans = 1/ans;
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'i' was not declared in this scope
    8 |   a[i] = 1/a[i];
      |     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<double> a(n);
  for(int i=0; i<n; i++) cin >> a[i];
  a[i] = 1/a[i];
  double ans=0;
  for(int i=0; i<n; i++) ans += a[i];
  ans = 1\ans;
  cout << ans << endl;
}

Compiler output:
a.cc:11:10: error: stray '\' in program
   11 |   ans = 1\ans;
      |          ^
a.cc: In function 'int main()':
a.cc:8:5: error: 'i' was not declared in this scope
    8 |   a[i] = 1/a[i];
      |     ^
a.cc:11:10: error: expected ';' before 'ans'
   11 |   ans = 1\ans;
      |          ^~~~
      |          ;
Language: C++

n = input()
v = map ( int,raw_input().split())

s=0
p = 1 
for i in v :    
    p *= i

num = p

for i in v :
    s += p / i

den = s
num = float ( num )
den = float ( den )

ans=num/den

print ans 



Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = input()
      | ^
Language: C++

#include <iostream>

using namespace std;

int main() {
    ios::sync_with_stdio(false);

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

    cout << 1 / s << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: expected initializer before 'cin'
    9 |     cin >> n;
      |     ^~~
a.cc:11:25: error: 'n' was not declared in this scope
   11 |     for (int i = 0; i < n; i++) {
      |                         ^
Language: C++

#include<iosteam>
using namespace std;

int main()
{
  int n;
  double a=0,x;
  
  while(n--)
  {
    cin>>x;
    a=a+1/x;
  }
  a=1/a;
  cout<<a;
  return 0;
}

Compiler output:
a.cc:1:9: fatal error: iosteam: No such file or directory
    1 | #include<iosteam>
      |         ^~~~~~~~~
compilation terminated.
Language: Java

import java.text.DecimalFormat;
import java.util.*;
public class BResistorsInParallel {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		double output = 0;
		double addition = 0;
		for(int i = 0;i<N;i++) {
			double under = 1/sc.nextDouble();
			addition += under;
		}
		output = 1/addition;
		System.out.println(output);
		
	}

}


Compiler output:
Main.java:3: error: class BResistorsInParallel is public, should be declared in a file named BResistorsInParallel.java
public class BResistorsInParallel {
       ^
1 error
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n, a[100];
  cin >> n; 
  for(int i=0; i<n; i++)cin >> a[i];
  
  //分子
  numerator = 1;
  for(int i=0; i<n; i++)numerator *= a[i];
  
  //分母
  denominator = 0;
  for(int i=0; i<n; i++){
    tmp = 1;
    for(int j=0; j<n; j++){
      if(j != i){
        tmp *= a[j];
      }
    }
    denominator += tmp;
  }
  
  //結果
  printf("%.10f\n", (double)numerator/ denominator);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'numerator' was not declared in this scope
    9 |   numerator = 1;
      |   ^~~~~~~~~
a.cc:13:3: error: 'denominator' was not declared in this scope
   13 |   denominator = 0;
      |   ^~~~~~~~~~~
a.cc:15:5: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   15 |     tmp = 1;
      |     ^~~
      |     tm
Language: C++

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

int main() {
  int N; cin >> N;
  ventor<int> point(N);
  
  for (int i = 0; i < N; i++) {
    cin >> point.at(i);
  }
  
  int sum = 0;
  
  for (int i = 0; i < N; i++) {
    sum += 1 / point.at(i);
  }
  
  cout << 1 / sum << endl;
  
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'ventor' was not declared in this scope
    6 |   ventor<int> point(N);
      |   ^~~~~~
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   ventor<int> point(N);
      |          ^~~
a.cc:9:12: error: 'point' was not declared in this scope
    9 |     cin >> point.at(i);
      |            ^~~~~
a.cc:15:16: error: 'point' was not declared in this scope
   15 |     sum += 1 / point.at(i);
      |                ^~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n
    vector<long double> xs(n);
    for (auto& x : xs) {
        cin >> x;
    }
    long double sum = 0;
    for (auto x : xs) {
        sum += 1/x;
    }
    cout << setprecision(30) << 1/sum << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected ';' before 'vector'
    9 |     cin >> n
      |             ^
      |             ;
   10 |     vector<long double> xs(n);
      |     ~~~~~~   
a.cc:11:20: error: 'xs' was not declared in this scope; did you mean 'x'?
   11 |     for (auto& x : xs) {
      |                    ^~
      |                    x
a.cc:15:19: error: 'xs' was not declared in this scope; did you mean 'x'?
   15 |     for (auto x : xs) {
      |                   ^~
      |                   x
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N,S,u;
  u=0;
  S=1;
  cin>>N;
  vector<int> A(N);
  for(int i=0;i<N;i++){
    cin>>A[i];
    S=S*A[i];
  }
  double ans;
  for(int i=0;i<N;i++){
    u+=S/A[i];
  }
  ans = S/u;
  cout<<u<<endl;
  return 0;
}

  


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'vector' was not declared in this scope
    8 |   vector<int> A(N);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int> A(N);
      |          ^~~
a.cc:10:10: error: 'A' was not declared in this scope
   10 |     cin>>A[i];
      |          ^
a.cc:15:10: error: 'A' was not declared in this scope
   15 |     u+=S/A[i];
      |          ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N,S,u;
  u=0;
  S=1;
  cin>>N;
  vector<int> A(N);
  vector<double> 
  for(int i=0;i<N;i++){
    cin>>A[i];
    S=S*A[i];
  }
  double ans;
  for(int i=0;i<N;i++){
    u+=S/A[i];
  }
  ans = S/u;
  cout<<u<<endl;
  return 0;
}

  


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'vector' was not declared in this scope
    8 |   vector<int> A(N);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int> A(N);
      |          ^~~
a.cc:9:10: error: expected primary-expression before 'double'
    9 |   vector<double>
      |          ^~~~~~
a.cc:10:15: error: 'i' was not declared in this scope
   10 |   for(int i=0;i<N;i++){
      |               ^
a.cc:16:10: error: 'A' was not declared in this scope
   16 |     u+=S/A[i];
      |          ^
Language: C++

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

int main() {
  
  int N;
  int A;
  double K;
  double num;
  
  for(int i = 0;i < N;++i){
    cin >> A[i];
  }
  for(int i = 0;i < N;++i){
    K = 1 / A[i];
    num = num + K;
  }
  
  cout << num << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: invalid types 'int[int]' for array subscript
   12 |     cin >> A[i];
      |             ^
a.cc:15:14: error: invalid types 'int[int]' for array subscript
   15 |     K = 1 / A[i];
      |              ^
Language: Java


import java.util.Scanner;

public class B_resistorsInParallel {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		int n=scn.nextInt();
		double []arr=new double [n];
		double x=1;
		double sum=0;
		for(int i=0;i<n;i++) {
			arr[i]=scn.nextInt();
			arr[i]=(double)(x/arr[i]);
			sum+=arr[i];
		}
		System.out.println(x/sum);
	}

}


Compiler output:
Main.java:4: error: class B_resistorsInParallel is public, should be declared in a file named B_resistorsInParallel.java
public class B_resistorsInParallel {
       ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) REP(i, 0, n)
#define REP(i, x, n) for(int i = x; i < n; i++)

int main(){
  double a;
  int n;
  double sum=0.0,ans=0.0;
  cin >> n;
  vector<double> v(n);
  rep(i,n) cin >> v.at(i);
  rep(i,n) v.at(i)=1/v.at(i);
  rep(i.n) sum+=v.at(i);
  ans = 1/sum;
  cout << ans << endl;
  
  return 0;
}



Compiler output:
a.cc:14:10: error: macro "rep" requires 2 arguments, but only 1 given
   14 |   rep(i.n) sum+=v.at(i);
      |          ^
a.cc:3:9: note: macro "rep" defined here
    3 | #define rep(i, n) REP(i, 0, n)
      |         ^~~
a.cc: In function 'int main()':
a.cc:14:3: error: 'rep' was not declared in this scope
   14 |   rep(i.n) sum+=v.at(i);
      |   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) REP(i, 0, n)
#define REP(i, x, n) for(int i = x; i < n; i++)

int main(){
  double a;
  int n;
  double sum=0.0,ans=0.0;
  cin >> n;
  vecotr<double> v(n);
  rep(i,n) cin >> v.at(i);
  rep(i,n) v.at(i)=1/v.at(i);
  rep(i.n) sum+=v.at(i);
  ans = 1/sum;
  cout << ans << endl;
  
  return 0;
}



Compiler output:
a.cc:14:10: error: macro "rep" requires 2 arguments, but only 1 given
   14 |   rep(i.n) sum+=v.at(i);
      |          ^
a.cc:3:9: note: macro "rep" defined here
    3 | #define rep(i, n) REP(i, 0, n)
      |         ^~~
a.cc: In function 'int main()':
a.cc:11:3: error: 'vecotr' was not declared in this scope
   11 |   vecotr<double> v(n);
      |   ^~~~~~
a.cc:11:10: error: expected primary-expression before 'double'
   11 |   vecotr<double> v(n);
      |          ^~~~~~
a.cc:12:19: error: 'v' was not declared in this scope
   12 |   rep(i,n) cin >> v.at(i);
      |                   ^
a.cc:13:12: error: 'v' was not declared in this scope
   13 |   rep(i,n) v.at(i)=1/v.at(i);
      |            ^
a.cc:14:3: error: 'rep' was not declared in this scope
   14 |   rep(i.n) sum+=v.at(i);
      |   ^~~
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int a[] = new int[n];
        for(int i=0; i<n; i++) {
            a[i]=sc.nextInt();
        }
        
        double answer = 0;
        for (int i=0; i<n; i++) {
            answer+=(double)1/a[i];
        }
        
        System.out.println( (double) 1 / answer )
    }
}

Compiler output:
Main.java:19: error: ';' expected
        System.out.println( (double) 1 / answer )
                                                 ^
1 error
Language: C++

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

int main() 
{
  int n;
  cin>>n;
  int a[n];
  int mul=1;
  for(int i=0;i<n;i++)
  {
    cin>>a[i];
    mul*=a[i];
  }
  int sum=0;
  for(int i=0;i<n;i++)
  {
    sum+=mul/a[i];
  }
  double answer=mul/sum;
  cout<<answer;
  return 0;
}
  
}

Compiler output:
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int n;
  cin >> n;
    // 整数の入力
    double a[n];
  double A=0;
  for(int i = 0; i < n; i++) {
   cin >> a[i];
    A += 1.0 / a[i]
  }
   cout << 1.0 / A << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: expected ';' before '}' token
   12 |     A += 1.0 / a[i]
      |                    ^
      |                    ;
   13 |   }
      |   ~
Language: C++

#include<iostream>
#include<iomanip>
using namespace std;

int main(){
  int N;
  double ans = 0.0, A;
  cin >> N;
  for(int i = 1; i <=N){
    cin >> A;
    ans += 1.0/A;
  }
  ans = 1.0 / ans;
  cout << setprecision(16) << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: expected ';' before ')' token
    9 |   for(int i = 1; i <=N){
      |                       ^
      |                       ;
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long[] a = new long[n];
		for(int i = 0; i < n; i++){
			a[i] = sc.nextLong();
		}
		long deno = 1;
		for(long in: a) deno = lcm(in, deno);

		long num = 0
		for(long in: a) num += deno / in;
		//System.out.println(deno);
		double ans = (double)num / deno;
		System.out.println(ans);
	
	}
	
	public static long gcd(long a, long b){
		if (a == 0) return b;
		return gcd(b % a, a);
	}
	
	public static long lcm(long a, long b){
		return a * b / gcd(a, b);
	}
}


Compiler output:
Main.java:14: error: ';' expected
		long num = 0
		            ^
1 error
Language: Java

import java.util.*;
 
public class Main{
 
  public void main(String[] args){
  
    Scanner sc = new Scanner(System.in);
    ArrayList<> nums = new ArrayList<>();
    double a = 0;
    int i = 0;
    
    while(sc.hasNext()){
    	nums.add(sc.nextInt());
    }
    
    for(int num : nums){
      if(i == 0){
        i++;
      }else{
    	a += 1/num;
        i++;
      }
    }
    
    System.out.println(1/a);
    
  }
}

Compiler output:
Main.java:8: error: illegal start of type
    ArrayList<> nums = new ArrayList<>();
              ^
1 error
Language: Java

import java.util.*;
 
public class Main{
 
  public void main(String[] args){
  
    Scanner sc = new Scanner(System.in);
    ArrayList<int> nums = new ArrayList<int>();
    double a = 0;
    int i = 0;
    
    while(sc.hasNext()){
    	nums.add(sc.nextInt());
    }
    
    for(int num : nums){
      if(i == 0){
        i++;
      }else{
    	a += 1/num;
        i++;
      }
    }
    
    System.out.println(1/a);
    
  }
}

Compiler output:
Main.java:8: error: unexpected type
    ArrayList<int> nums = new ArrayList<int>();
              ^
  required: reference
  found:    int
Main.java:8: error: unexpected type
    ArrayList<int> nums = new ArrayList<int>();
                                        ^
  required: reference
  found:    int
2 errors
Language: Java

import java.util.*;
 
public class Main{
 
  public void main(String[] args){
  
    Scanner sc = new Scanner(System.in);
    List<int> nums = new ArrayList<>();
    double a = 0;
    int i = 0;
    
    while(sc.hasNext()){
    	nums.add(sc.nextInt());
    }
    
    for(int num : nums){
      if(i == 0){
        i++;
      }else{
    	a += 1/num;
        i++;
      }
    }
    
    System.out.println(1/a);
    
  }
}

Compiler output:
Main.java:8: error: unexpected type
    List<int> nums = new ArrayList<>();
         ^
  required: reference
  found:    int
1 error
Language: Java

import java.Util.*;

public class Main{

  public void main(String[] args){
  
    Scanner sc = new Scanner(System.in);
    List<int> nums = new ArrayList<>();
    double a = 0;
    int i = 0;
    
    while(sc.hasNext()){
    	nums.add(sc.nextInt());
    }
    
    for(int num : nums){
      if(i == 0){
        i++;
      }else{
    	a += 1/num;
        i++;
      }
    }
    
    System.out.println(1/a);
    
  }
}

Compiler output:
Main.java:1: error: package java.Util does not exist
import java.Util.*;
^
Main.java:7: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
Main.java:8: error: cannot find symbol
    List<int> nums = new ArrayList<>();
    ^
  symbol:   class List
  location: class Main
Main.java:8: error: unexpected type
    List<int> nums = new ArrayList<>();
         ^
  required: reference
  found:    int
Main.java:8: error: cannot find symbol
    List<int> nums = new ArrayList<>();
                         ^
  symbol:   class ArrayList
  location: class Main
6 errors
Language: C

#include<stdio.h>
int main(void)
{
	double N,A[1001],i;
	double sum=0;
	scanf("%lf",&N);
	for(i=0;i<=N;i++)
	{
		scanf("%lf",&A[i]);
	}
	for(i=0;i<=N;i++)
	{
		sum=1/A[i]+sum;
	}
	printf("%lf",1/sum);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:31: error: array subscript is not an integer
    9 |                 scanf("%lf",&A[i]);
      |                               ^
main.c:13:24: error: array subscript is not an integer
   13 |                 sum=1/A[i]+sum;
      |                        ^
Language: C

#include<stdio.h>
int main(void)
{
	double N,A[1001],i;
	double sum=0;
	scanf("%d",&N);
	for(i=0;i<=N;i++)
	{
		scanf("%d",&A[i]);
	}
	for(i=0;i<=N;i++)
	{
		sum=1/A[i]+sum;
	}
	printf("%d",1/sum);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:30: error: array subscript is not an integer
    9 |                 scanf("%d",&A[i]);
      |                              ^
main.c:13:24: error: array subscript is not an integer
   13 |                 sum=1/A[i]+sum;
      |                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll= long long;
using vi= vector<int>;
using vvi= vector<vi>;
using vd= vector<double>;
#define REP(i,x,n) for(int i=x; i<n; i++)
#define rep(i,n) REP(i,0,n)
#define all(x) x.begin(), x.end()

int main(){
  int n,p;
  cin >> n;
  vd a(n);
  rep(i,n)  cin >> a[i];

  p=[0];
  REP(i,1,n){
    p= (p*a[i])/(p+a[i]);
  }
  cout << p << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:6: error: expected identifier before numeric constant
   17 |   p=[0];
      |      ^
a.cc: In lambda function:
a.cc:17:8: error: expected '{' before ';' token
   17 |   p=[0];
      |        ^
a.cc: In function 'int main()':
a.cc:17:5: error: invalid user-defined conversion from 'main()::<lambda()>' to 'int' [-fpermissive]
   17 |   p=[0];
      |     ^~~
a.cc:17:5: note: candidate is: 'constexpr main()::<lambda()>::operator void (*)()() const' (near match)
   17 |   p=[0];
      |     ^
a.cc:17:5: note:   no known conversion from 'void (*)()' to 'int'
Language: C

#!/usr/bin/env python3
a=int(input())
N = input()
N =N.split(' ')
for i in range(int(a)):
    N[i]=int(N[i])
    #print(N[i]," ",end="")
#print()

b=0
for i in range(int(a)):
    #print(1/N[i])
    b=b+(1/N[i])
#print(b)
print(1/b)


Compiler output:
main.c:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env python3
      |  ^
main.c:2:1: warning: data definition has no type or storage class
    2 | a=int(input())
      | ^
main.c:2:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:2:3: error: expected expression before 'int'
    2 | a=int(input())
      |   ^~~
main.c:7:6: error: invalid preprocessing directive #print
    7 |     #print(N[i]," ",end="")
      |      ^~~~~
main.c:8:2: error: invalid preprocessing directive #print
    8 | #print()
      |  ^~~~~
main.c:12:6: error: invalid preprocessing directive #print
   12 |     #print(1/N[i])
      |      ^~~~~
main.c:14:2: error: invalid preprocessing directive #print
   14 | #print(b)
      |  ^~~~~
Language: C++

#include <iostream>
#include <iomanip>
using namespace std;

int main(){
  int n;
  cin >> n;
  int b[n];
  float a[n];
  for(int i = 0;i<n;i++){[
    cin >> b[i];
    a[i] = 1.0f / b[i];
  }
    float sum = 0;
    for(int i = 0;i<n;i++){
      sum += a[i];
    }
    double ans = 1.0 / sum;
   cout << setprecision(10) << ans << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: warning: capture of variable 'std::cin' with non-automatic storage duration
   11 |     cin >> b[i];
      |     ^~~
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::istream std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:8: error: expected ',' before '>>' token
   11 |     cin >> b[i];
      |        ^~~
      |        ,
a.cc:11:9: error: expected identifier before '>>' token
   11 |     cin >> b[i];
      |         ^~
a.cc:11:16: error: expected ']' before ';' token
   11 |     cin >> b[i];
      |                ^
      |                ]
a.cc: In lambda function:
a.cc:11:16: error: expected '{' before ';' token
Language: C++

#include <bits/stdc++.h>
 
int main(){ 
  int i,n;
  double ans=0.0;
  
  cin >> n;
  int a[n];
  for(i=0;i<n;++i){
    cin >> a[i];
  }

  for(i=0;i<n;i++)ans += (double)1/a[i];
  ans = 1.0/ans;

  printf("%.10f\n",ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> n;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include<iosteam>
using namespace std ;

int main()
{
  int N,i ;
  int A[N] ;
  cin>>N ;
  for(i=0;i<N;i++) cin>>A[i] ;

  int sum=0,pro=1 ;
  for(i=0;i<N;i++){
    sum+=A[i] ;
    pro*=A[i] ;
  }
  
  cout<<(float)pro/sum<<endl ; 
  
  return 0 ;
}

Compiler output:
a.cc:1:9: fatal error: iosteam: No such file or directory
    1 | #include<iosteam>
      |         ^~~~~~~~~
compilation terminated.