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

import math

A, B, H, M = map(int, input().split())
theta = math.radians(H*30+M/2.0 - M*6)
print(math.sqrt(A**2 + B ** 2 - 2 * A * B * math.cos(theta)))


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b,h,m,minut;
  cin >>a>>b>>h>>m;
  minut=60*h+m;
  double long_t,short_t;
  long_t=minut*0.5;//度
  while(long_t>360){
    long_t-=360;
  }
  short_t=minut*6;//度
  while(short_t>360){
    short_t-=360;
  }
  
  double degree=fabs(long_t-short_t);
  if(degree>180){degree=360-degree;}
  cout << fixed << setprecision(20);
  cout<<sqrt(25-24*cos(degree*3.14159265358979323846/ 180 ));
  return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: expected '}' at end of input
   22 |   return 0;
      |            ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

long main () {
  double A, B, H, M, a, b, p, r;
  double cos(double x);
  cin >> A >> B >> H >> M;
  p==3.1415926535;
  a==p*H/6;
  b==p*M/30;
  x=a-b;
  r==cos(x);
   cout << pow(A*A+B*B-2*A*B*r,1/2) << endl;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
a.cc: In function 'int main()':
a.cc:12:3: error: 'x' was not declared in this scope
   12 |   x=a-b;
      |   ^
Language: C++

#include <iostream>

using namespace std;

int main() {
	static const double pi = 3.141592653589793;
	int a, b, h, m;
	cin >> a >> b >> h >> m;
	double hh = (double)h / 12;
	double mm = ((double)m / 60) * 29;
	double aa =(2 * pi * (hh + mm));
	double c = a * a + b * b - 2 * a * b * cos(aa);
	c = sqrt(c);
	cout << c;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:48: error: 'cos' was not declared in this scope
   12 |         double c = a * a + b * b - 2 * a * b * cos(aa);
      |                                                ^~~
a.cc:13:13: error: 'sqrt' was not declared in this scope
   13 |         c = sqrt(c);
      |             ^~~~
Language: C

#include <stdio.h>
#include <math.h>

int main(void) {
	int A, B, H, M;
	if(scanf("%d %d %d %d", &A, &B, &H, &M) == -1){
      return -1;
    }

	double argA, argB, arg;
	double C;
	double rad;

	argA = (double)H * 360 / 12;
	argB = (double)M  * 360 / 60;
	
	if (argA < argB) {
		if (argB - argA > 180) {
			rad = (argB - argA - 180) * M_PI / 180;
			C = sqrt((double)(A * A + B * B) - (2 * (double)A * (double)B * cos(rad)));
		}
      else if(argB - argA == 180){
        C = A + B;
      }
      else if(aegB - argA == 0){
        C = 0;
      }
		else {
			rad = (argB - argA) * M_PI / 180;
			C = sqrt((double)(A * A + B * B) - (2 * (double)A * (double)B * cos(rad)));
		}
		
	}
	else {
		if (argA - argB >= 180) {
			rad = (argA - argB - 180) * M_PI / 180;
			C = sqrt((double)(A * A + B * B) - (2 * (double)A * (double)B * cos(rad)));
		}
      else if(argB - argA == 180){
        C = A + B;
      }
      else if(aegB - argA == 0){
        C = 0;
      }
		else {
			rad = (argA - argB) * M_PI / 180;
			C = sqrt((double)(A * A + B * B) - (2 * (double)A * (double)B * cos(rad)));
		}
	}

	printf("%lf\n", C);
	

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:25:15: error: 'aegB' undeclared (first use in this function); did you mean 'argB'?
   25 |       else if(aegB - argA == 0){
      |               ^~~~
      |               argB
main.c:25:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
#include<limits>
using ll = long long;
using namespace std;
#define rep(i,n) for(int (i)=0;i<(n);i++)

int main() {
	long double a, b, h, m;
	cin >> a >> b >> h >> m;
	long double x2 = 0;
	long double x1 = 0;
	long double pi = 3.141592653589793;
	long double aa, bb;
	aa = 30 * h + m / 2;
	bb = 6 * m;
	
	if (bb == aa) {
		if (a >= b)cout << a - b << endl;
		else cout << b - a << endl;
	}
	else if (bb > aa) {
		x2 = a * a + b * b - 2 * a * b * cos((11 * m - 60 * h) * pi / 360);
		x1 = sqrt(x2);
	}
	else {
		x2 = a * a + b * b - 2 * a * b * cos((60 * h - 11 * m) * pi / 360);
		x1 = sqrt(x2);
	}
	printf ("20.20%Lf")

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:28: error: expected ';' before 'return'
   33 |         printf ("20.20%Lf")
      |                            ^
      |                            ;
   34 | 
   35 |         return 0;
      |         ~~~~~~
Language: C++

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

int main () {
  double A, B, H, M, a, b, p, r;
  double cos(double x);
  cin >> A >> B >> H >> M;
  p==3.1415926535;
  a==p*H/6;
  b==p*M/30;
  x=a-b;
  r==cos(x);
   cout << pow(A*A+B*B-2*A*B*r,1/2) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'x' was not declared in this scope
   12 |   x=a-b;
      |   ^
Language: Java

import java.util.*;
import java.lang.Math.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// スペース区切りの整数の入力
       int tyoushin=sc.nextInt();
       int tanshin=sc.nextInt();
       int jikan=sc.nextInt();
       int hun=sc.nextInt();
       float hena=tyoushin;
      float henb=tanshin;
      float kaku=toRadians(abs((jikan*30+30*hun/60)-hun*6));
      float kai=(sqrt(hena*hena+henb*henb+hena*henb*cos(kaku)));
}
}


Compiler output:
Main.java:13: error: cannot find symbol
      float kaku=toRadians(abs((jikan*30+30*hun/60)-hun*6));
                           ^
  symbol:   method abs(int)
  location: class Main
Main.java:14: error: cannot find symbol
      float kai=(sqrt(hena*hena+henb*henb+hena*henb*cos(kaku)));
                                                    ^
  symbol:   method cos(float)
  location: class Main
2 errors
Language: C++

import math

a, b, h, m = map(int,input().split())
d = abs(0.5*(60*h+m) - 6*m)
if d > 180:
  d = 360 - d
c = math.cos(math.radians(d))
e = a*a + b*b - 2*a*b*c
f = math.sqrt(e)
print(f)

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: Java

import java.util.*;
import java.Math.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// スペース区切りの整数の入力
       int tyoushin=sc.nextInt();
       int tanshin=sc.nextInt();
       int jikan=sc.nextInt();
       int hun=sc.nextInt();
       float hena=tyoushin;
      float henb=tanshin;
      float kaku=toRadians(abs((jikan*30+30*hun/60)-hun*6));
      float kai=(sqrt(hena*hena+henb*henb+hena*henb*cos(kaku)));
}
}


Compiler output:
Main.java:2: error: package java.Math does not exist
import java.Math.*;
^
Main.java:13: error: cannot find symbol
      float kaku=toRadians(abs((jikan*30+30*hun/60)-hun*6));
                           ^
  symbol:   method abs(int)
  location: class Main
Main.java:14: error: cannot find symbol
      float kai=(sqrt(hena*hena+henb*henb+hena*henb*cos(kaku)));
                                                    ^
  symbol:   method cos(float)
  location: class Main
3 errors
Language: C++

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

int main () {
  double A, B, H, M, a, b, p, r;
  double cos(double x);
  cin >> A >> B >> H >> M;
  p==3.1415926535;
  a==p*H/6;
  b==p*M/30;
  x==a-b;
  r==cos(a-b);
   cout << pow(A*A+B*B-2*A*B*r,1/2) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'x' was not declared in this scope
   11 |   x==a-b;
      |   ^
Language: Java

import java.util.*;
import java.
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// スペース区切りの整数の入力
       int tyoushin=sc.nextInt();
       int tanshin=sc.nextInt();
       int jikan=sc.nextInt();
       int hun=sc.nextInt();
       float hena=tyoushin;
      float henb=tanshin;
      float kaku=toRadians(abs((jikan*30+30*hun/60)-hun*6));
      float kai=(sqrt(hena*hena+henb*henb+hena*henb*cos(kaku)));
}
}


Compiler output:
Main.java:2: error: <identifier> expected
import java.
            ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A, B, H, M;
  cin >> A >> B >> H >> M;
  double c, d, e;
  c = H * 30 + M * 0.5;
  d = M * 6;
  if (c < d) {
    e = sqrt(A * A + B * B - 2 * A * B * cos(dc));
  }
  else if（c > d) {
    e = sqrt(A * A + B * B - 2 * A * B * cos(cd));
  }
  else {
    e = max(A - B, B - A);
  }
  cout << e << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:46: error: 'dc' was not declared in this scope; did you mean 'd'?
   11 |     e = sqrt(A * A + B * B - 2 * A * B * cos(dc));
      |                                              ^~
      |                                              d
a.cc:13:8: error: 'if\U0000ff08c' was not declared in this scope
   13 |   else if（c > d) {
      |        ^~~~~
a.cc:16:3: error: 'else' without a previous 'if'
   16 |   else {
      |   ^~~~
Language: C++


#include<algorithm>
#include<cstring>
#include<string>
#include<cassert>
#include<cmath>
#include<climits>
#include<iomanip>
#include<stack>
#include<unordered_map>
#include<bitset>
#include<limits>
#include<complex>
#include<array>
#include<math.h>
#include<stdio.h>
#include <bits/stdc++.h>

using namespace std;
#difine PI 3.14159265358979323846 //円周率
#define rep(i,m,n) for(int (i)=(int)(m);i<(int)(n);i++)
#define REP(i,n) rep(i,0,n)
#define ll long long
#define ull unsigned long long
#define all(hoge) (hoge).begin(),(hoge).end()
typedef pair<ll, ll> P;
constexpr ll INF = 1LL << 60;
typedef vector<ll> Array;
typedef vector<Array> Matrix;
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}


int main() {
  // ここにプログラムを追記
  cout <<sin(PI)<<endl;
  
}

Compiler output:
a.cc:20:2: error: invalid preprocessing directive #difine; did you mean #define?
   20 | #difine PI 3.14159265358979323846 //円周率
      |  ^~~~~~
      |  define
a.cc: In function 'int main()':
a.cc:48:14: error: 'PI' was not declared in this scope; did you mean 'P'?
   48 |   cout <<sin(PI)<<endl;
      |              ^~
      |              P
Language: C++

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

int main() {
  int A, B, H, M, R;
  cin >> A >> B >> H >> M;
  R = A*A + B*B - 2*A*B*cos(asin(-1) * (5 * H - M) / 30)
  cout << sqrt(R) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:57: error: expected ';' before 'cout'
    7 |   R = A*A + B*B - 2*A*B*cos(asin(-1) * (5 * H - M) / 30)
      |                                                         ^
      |                                                         ;
    8 |   cout << sqrt(R) << endl;
      |   ~~~~
Language: C++

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

int main(){
    double a,b,h,m,kakudo_a,kakudo_b,kakudo_sa,r ;
    const double PI=3.14159265358979323846;
    cin >> a >> b >> h >> m;
    
   kakudo_a=30*h + m/2;
   kakudo_b=6*m;
   kakudo_sa=kakudo_b - kakudo_b;
   r=(kakudo_a)*(kakudo_a) + (kakudo_b)*(kakudo_b) - 2*(kakudo_a)*(kakudo_b)*cos(kakudo_sa*PI／180);
   cout << r << endl;
   
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:92: error: 'PI\U0000ff0f180' was not declared in this scope
   19 |    r=(kakudo_a)*(kakudo_a) + (kakudo_b)*(kakudo_b) - 2*(kakudo_a)*(kakudo_b)*cos(kakudo_sa*PI／180);
      |                                                                                            ^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A, B, H, M;
  cin >> A >> B >> H >> M;
  double c, d, e;
  c = H * 30 + M * 0.5;
  d = M * 6;
  if (c < d) {
    e = sqrt(A * A + B * B-2 * A * B * cos(dc));
  }
  else if（c > d) {
    e = sqrt(A * A + B * B-2 * A * B * cos(cd));
  }
  else {
    e = max(A - B, B - A);
  }
  cout << e << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:44: error: 'dc' was not declared in this scope; did you mean 'd'?
   11 |     e = sqrt(A * A + B * B-2 * A * B * cos(dc));
      |                                            ^~
      |                                            d
a.cc:13:8: error: 'if\U0000ff08c' was not declared in this scope
   13 |   else if（c > d) {
      |        ^~~~~
a.cc:16:3: error: 'else' without a previous 'if'
   16 |   else {
      |   ^~~~
Language: C++

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

int main(){
   int A , B , H , M ;
  cin >> A >> B >> H >> M ;
  sita1 = 0;
  float sita2 =0;
  sita1 = H*0.5;
  sita2 = M*6%360;
  const double PI=3.14159265358979323846;
  float sita = abs(sita1-sita2);
  float y  = cos(PI / 180 * sita);
  cout <<double( pow(A*A+B*B-2*A*B*y,0.5)) << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'sita1' was not declared in this scope
    7 |   sita1 = 0;
      |   ^~~~~
Language: C++

#include<algorithm>
#include<cstring>
#include<string>
#include<cassert>
#include<cmath>
#include<climits>
#include<iomanip>
#include<stack>
#include<unordered_map>
#include<bitset>
#include<limits>
#include<complex>
#include<array>
#include<math.h>
#include<stdio.h>


using namespace std;
#define PI 3.14159265358979323846 //円周率
#define rep(i,m,n) for(int (i)=(int)(m);i<(int)(n);i++)
#define REP(i,n) rep(i,0,n)
#define ll long long
#define ull unsigned long long
#define all(hoge) (hoge).begin(),(hoge).end()
typedef pair<ll, ll> P;
constexpr ll INF = 1LL << 60;
typedef vector<ll> Array;
typedef vector<Array> Matrix;
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}


int main() {
  // ここにプログラムを追記
  cout<<sin(PI)<<endl;
}


Compiler output:
a.cc:27:9: error: 'vector' does not name a type
   27 | typedef vector<ll> Array;
      |         ^~~~~~
a.cc:28:9: error: 'vector' does not name a type
   28 | typedef vector<Array> Matrix;
      |         ^~~~~~
a.cc: In function 'int main()':
a.cc:47:3: error: 'cout' was not declared in this scope
   47 |   cout<<sin(PI)<<endl;
      |   ^~~~
a.cc:15:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   14 | #include<math.h>
  +++ |+#include <iostream>
   15 | #include<stdio.h>
Language: C++

import math
a,b,h,m = map(int,input().split())
hour_angle = 0.5 * (h * 60 + m)  
minute_angle = 6 * m

angle = abs(hour_angle - minute_angle)
angle = min(360.0 - angle, angle)
ans= (a*a) + (b*b) - (2.0*a*b*math.cos(angle * math.pi /180))
ans = math.sqrt(ans)
print(ans)

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  long long A,B,H,M;
  cin>>A>>B>>H>>M;
  double a,b,h,m;
  a=double(A);
  b=double(B);
  h=double(H);
  m=double(M);
  double f=(60*h+m)*0.5;//分針（度）
  double j=m*6;//時針（度）
  if(f>j){
    double s=(f-j)*0.0174533;//ラジアン
  }
  else
    double s=(j-f)*0.0174533;
  } 
  double c=a*a+b*b-2*a*b*cos(s);
  double ans=sqrt(c);
  cout<<ans<<endl;
  
}


Compiler output:
a.cc:19:12: error: 'a' was not declared in this scope
   19 |   double c=a*a+b*b-2*a*b*cos(s);
      |            ^
a.cc:19:14: error: 'a' was not declared in this scope
   19 |   double c=a*a+b*b-2*a*b*cos(s);
      |              ^
a.cc:19:16: error: 'b' was not declared in this scope
   19 |   double c=a*a+b*b-2*a*b*cos(s);
      |                ^
a.cc:19:18: error: 'b' was not declared in this scope
   19 |   double c=a*a+b*b-2*a*b*cos(s);
      |                  ^
a.cc:19:22: error: 'a' was not declared in this scope
   19 |   double c=a*a+b*b-2*a*b*cos(s);
      |                      ^
a.cc:19:24: error: 'b' was not declared in this scope
   19 |   double c=a*a+b*b-2*a*b*cos(s);
      |                        ^
a.cc:19:30: error: 's' was not declared in this scope
   19 |   double c=a*a+b*b-2*a*b*cos(s);
      |                              ^
a.cc:21:3: error: 'cout' does not name a type
   21 |   cout<<ans<<endl;
      |   ^~~~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++


#include<algorithm>
#include<cstring>
#include<string>
#include<cassert>
#include<cmath>
#include<climits>
#include<iomanip>
#include<stack>
#include<unordered_map>
#include<bitset>
#include<limits>
#include<complex>
#include<array>
#include<math.h>
#include<stdio.h>


using namespace std;
#difine PI 3.14159265358979323846 //円周率
#define rep(i,m,n) for(int (i)=(int)(m);i<(int)(n);i++)
#define REP(i,n) rep(i,0,n)
#define ll long long
#define ull unsigned long long
#define all(hoge) (hoge).begin(),(hoge).end()
typedef pair<ll, ll> P;
constexpr ll INF = 1LL << 60;
typedef vector<ll> Array;
typedef vector<Array> Matrix;
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}


int main() {
  // ここにプログラムを追記
  cout<<sin(PI)<<endl;
}

Compiler output:
a.cc:20:2: error: invalid preprocessing directive #difine; did you mean #define?
   20 | #difine PI 3.14159265358979323846 //円周率
      |  ^~~~~~
      |  define
a.cc:28:9: error: 'vector' does not name a type
   28 | typedef vector<ll> Array;
      |         ^~~~~~
a.cc:29:9: error: 'vector' does not name a type
   29 | typedef vector<Array> Matrix;
      |         ^~~~~~
a.cc: In function 'int main()':
a.cc:48:3: error: 'cout' was not declared in this scope
   48 |   cout<<sin(PI)<<endl;
      |   ^~~~
a.cc:16:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   15 | #include<math.h>
  +++ |+#include <iostream>
   16 | #include<stdio.h>
a.cc:48:13: error: 'PI' was not declared in this scope; did you mean 'P'?
   48 |   cout<<sin(PI)<<endl;
      |             ^~
      |             P
Language: C++

#include<iostream>
#include<math.h>
using namespace std;

int main(){
    double rad,a_2;
    double A,B,H,M;
    const double PI = 3.14159265358979323846;
    cin >> A >> B >> H >> M;
    rad=double(abs(H*30+H*M/2-M*6));
    if(rad>180){
        rad=rad-180;
    }
    a_2=A*A+B*B-2*A*B*cos(rad*PI/180.0);
    cout << setprecision(15) << sqrt(a_2);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'setprecision' was not declared in this scope
   15 |     cout << setprecision(15) << sqrt(a_2);
      |             ^~~~~~~~~~~~
a.cc:3:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    2 | #include<math.h>
  +++ |+#include <iomanip>
    3 | using namespace std;
Language: C

#include <iostream>
#include <cstdlib>
#include <cmath>
#include <math.h> 
using namespace std;
int main() {
long double A,B,H,M;
long double pi = 3.14159265358979323846264338327950288419;
long double HS,MS,S,L;
  cin>>A>>B>>H>>M;
 HS=0.5*(H*60+M);
 MS=6*M;
 S=HS-MS;
 S=abs(S);
 if(S>180){S-=180;}
  S=cos(S*(pi/180));
 L=sqrtf((A*A)+(B*B)-(2*A*B*S));
cout<<L;
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A, B, H, M;
  cin >> A >> B >> H >> M;
  double c, d, e;
  c = H * 30 + M * 0.5;
  d = M * 6;
  if (c < d) {
    e = sqrt(A * A + B * B-2 * A * B * cos(dc));
  }
  else if（c> d）{
    e = sqrt(A * A + B * B-2 * A * B * cos(cd));
  }
  else {
    e = 0;
  }
  cout << e << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:44: error: 'dc' was not declared in this scope; did you mean 'd'?
   11 |     e = sqrt(A * A + B * B-2 * A * B * cos(dc));
      |                                            ^~
      |                                            d
a.cc:13:8: error: 'if\U0000ff08c' was not declared in this scope
   13 |   else if（c> d）{
      |        ^~~~~
a.cc:13:15: error: 'd\U0000ff09' was not declared in this scope
   13 |   else if（c> d）{
      |               ^~~
a.cc:16:3: error: 'else' without a previous 'if'
   16 |   else {
      |   ^~~~
Language: C

#include <stdio.h>
#include <math.h>
#define PI 3.141592653

int main(){
  
  double a, b, h, m, third;
  scanf("%lf%lf%lf%lf", &a, &b, &h, &m);
  // 把时针换算成 60 的情况 = h*5
  h *= 5;
  // 时针每个数字差 30°
  // 分针每个数字差 6°
  
  // 两种特殊情况：
  // 重合
  if(h == m){
    printf("0\n");
  }
  // 连成直线
  else if(fabs(h-m) == 30){
    printf("%lf\n", h+m);
  }
  else{
    double tengle;
    if(fabs(h-m) < 30){
      tengle = fabs(h-m) * 6;
    }
    else{
      if(h > m){
        h += 60;
      }
      else{
        m += 60;
      }
      tengle = fabs(h-m) * 6;
    }
    tengle = cos(tengle * PI / 180);
    third = sqrt(b*b + c*c - 2*b*c*tengle);
    printf("%lf\n", third);
  }
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:38:24: error: 'c' undeclared (first use in this function)
   38 |     third = sqrt(b*b + c*c - 2*b*c*tengle);
      |                        ^
main.c:38:24: 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(){
  long long A,B,H,M;
  cin>>A>>B>>H>>M;
  double a,b,h,m;
  a=double(A);
  b=double(B);
  h=double(H);
  m=double(M);
  double f=(60*h+m)*0.5;//分針（度）
  double j=m*6;//時針（度）
  if(f>m){
    double s=(f-j)*0.0174533;//ラジアン
  }
  else
    double s=(j-f)*0.0174533;
  } 
  double c=a*a+b*b-2*a*b*cos(s);
  double ans=sqrt(c);
  cout<<ans<<endl;
  
}

Compiler output:
a.cc:20:12: error: 'a' was not declared in this scope
   20 |   double c=a*a+b*b-2*a*b*cos(s);
      |            ^
a.cc:20:14: error: 'a' was not declared in this scope
   20 |   double c=a*a+b*b-2*a*b*cos(s);
      |              ^
a.cc:20:16: error: 'b' was not declared in this scope
   20 |   double c=a*a+b*b-2*a*b*cos(s);
      |                ^
a.cc:20:18: error: 'b' was not declared in this scope
   20 |   double c=a*a+b*b-2*a*b*cos(s);
      |                  ^
a.cc:20:22: error: 'a' was not declared in this scope
   20 |   double c=a*a+b*b-2*a*b*cos(s);
      |                      ^
a.cc:20:24: error: 'b' was not declared in this scope
   20 |   double c=a*a+b*b-2*a*b*cos(s);
      |                        ^
a.cc:20:30: error: 's' was not declared in this scope
   20 |   double c=a*a+b*b-2*a*b*cos(s);
      |                              ^
a.cc:22:3: error: 'cout' does not name a type
   22 |   cout<<ans<<endl;
      |   ^~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A、B、H、M;
  cin >> A >> B >> H >> M;
  double c、d、e;
  c = H * 30 + M * 0.5;
  d = M * 6;
  if (c < d) {
    e = sqrt(A * A + B * B-2 * A * B * cos(dc));
  }
  else if（c> d）{
    e = sqrt(A * A + B * B-2 * A * B * cos(cd));
  }
  else {
    e = 0;
  }
  cout << e << endl;
}

Compiler output:
a.cc:5:7: error: extended character 、 is not valid in an identifier
    5 |   int A、B、H、M;
      |       ^
a.cc:5:7: error: extended character 、 is not valid in an identifier
a.cc:5:7: error: extended character 、 is not valid in an identifier
a.cc:7:10: error: extended character 、 is not valid in an identifier
    7 |   double c、d、e;
      |          ^
a.cc:7:10: error: extended character 、 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:6:10: error: 'A' was not declared in this scope
    6 |   cin >> A >> B >> H >> M;
      |          ^
a.cc:6:15: error: 'B' was not declared in this scope
    6 |   cin >> A >> B >> H >> M;
      |               ^
a.cc:6:20: error: 'H' was not declared in this scope
    6 |   cin >> A >> B >> H >> M;
      |                    ^
a.cc:6:25: error: 'M' was not declared in this scope
    6 |   cin >> A >> B >> H >> M;
      |                         ^
a.cc:8:3: error: 'c' was not declared in this scope
    8 |   c = H * 30 + M * 0.5;
      |   ^
a.cc:9:3: error: 'd' was not declared in this scope
    9 |   d = M * 6;
      |   ^
a.cc:11:5: error: 'e' was not declared in this scope
   11 |     e = sqrt(A * A + B * B-2 * A * B * cos(dc));
      |     ^
a.cc:11:44: error: 'dc' was not declared in this scope
   11 |     e = sqrt(A * A + B * B-2 * A * B * cos(dc));
      |                                            ^~
a.cc:13:8: error: 'if\U0000ff08c' was not declared in this scope
   13 |   else if（c> d）{
      |        ^~~~~
a.cc:13:15: error: 'd\U0000ff09' was not declared in this scope
   13 |   else if（c> d）{
      |               ^~~
a.cc:16:3: error: 'else' without a previous 'if'
   16 |   else {
      |   ^~~~
a.cc:17:5: error: 'e' was not declared in this scope
   17 |     e = 0;
      |     ^
a.cc:19:11: error: 'e' was not declared in this scope
   19 |   cout << e << endl;
      |           ^
Language: C

#include <stdio.h>
#include <math.h>
#define PI 3.141592653

int main(){
  
  double a, b, h, m, third;
  scanf("%lf%lf%lf%lf", &a, &b, &h, &m);
  // 把时针换算成 60 的情况 = h*5
  h *= 5;
  // 时针每个数字差 30°
  // 分针每个数字差 6°
  
  // 两种特殊情况：
  // 重合
  if(h == m){
    printf("0\n");
  }
  // 连成直线
  else if(abs(h-m) == 30){
    printf("%lf\n", h+m);
  }
  else{
    double tengle;
    if(abs(h-m) < 30){
      tengle = abs(h-m) * 6;
    }
    else{
      if(h > m){
        h += 60;
      }
      else{
        m += 60;
      }
      tengle = abs(h-m) * 6;
    }
    tengle = cos(tengle * PI / 180);
    third = sqrt(b*b + c*c - 2*b*c*tengle);
    printf("%lf\n", third);
  }
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:20:11: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
   20 |   else if(abs(h-m) == 30){
      |           ^~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    2 | #include <math.h>
  +++ |+#include <stdlib.h>
    3 | #define PI 3.141592653
main.c:20:16: warning: 'abs' argument 1 type is 'double' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
   20 |   else if(abs(h-m) == 30){
      |               ~^~
<built-in>: note: built-in 'abs' declared here
main.c:25:13: warning: 'abs' argument 1 type is 'double' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
   25 |     if(abs(h-m) < 30){
      |            ~^~
<built-in>: note: built-in 'abs' declared here
main.c:26:21: warning: 'abs' argument 1 type is 'double' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
   26 |       tengle = abs(h-m) * 6;
      |                    ~^~
<built-in>: note: built-in 'abs' declared here
main.c:35:21: warning: 'abs' argument 1 type is 'double' where 'int' is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
   35 |       tengle = abs(h-m) * 6;
      |                    ~^~
<built-in>: note: built-in 'abs' declared here
main.c:38:24: error: 'c' undeclared (first use in this function)
   38 |     third = sqrt(b*b + c*c - 2*b*c*tengle);
      |                        ^
main.c:38:24: 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 a,b,h,m;
  cin >> a >> b >> h >> m;
  
  cout << fixed <<setprecision(20);
  
  if (h*30 == m*6) {
    cout << a-b <<endl;
  }
  else if (h*30-m*6 == 180 || m*6-h*30 == 180) {
    cout << a+b <<endl;
  }
  else {
    double deg = h*30-m*6;
    double pi,unit,deg_r;
    pi = 2.o* asin(1.0);
    unit = pi / 180.0;
    deg_r = deg*unit;
    double x;
    x = cos(deg_r);
    double ans;
    ans = sqrt(a*a + b*b - 2*a*b*x);
    cout << ans <<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: unable to find numeric literal operator 'operator""o'
   19 |     pi = 2.o* asin(1.0);
      |          ^~~
Language: Java

import java.util.Scanner;

public class Main{
 public static void main(String[] args) {
   Scanner kbd =new Scanner(System.in);
    int a=kbd.nextInt();
    int b=kbd.nextInt();
    int h=kbd.nextInt();
    int m=kbd.nextInt();

    double A=h*30+m*0.5;
    double B=m*6;
    double C=0;
    if(A-B>=0){
      C=A-B;
    }else{
      C=B-A;
    }
    if(C>180){
      C=360-C;
    }
    C=Math.toRadians(C);
    double x=b*Math.sin(C)*b*Math.sin(C);
    double y=(b*Math.cos(C)-a)*(b*Math.cos(C)-a);
    System.out.println(Math.sqrt(x+y));
 }
  

Compiler output:
Main.java:26: error: reached end of file while parsing
 }
  ^
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define PI 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679

int main(){
  int a, b, h, m;

  cin >> a >> b >> h >> m;
  cin.ignore();

  long double theta_m, theta_h;
  theta_m = m / (long double)60 * PI;
  theta_h = (h / (long double)12 + m / (long double) 12 / 60) * PI;
  long double result = sqrtles((b * sin(theta_m) - a * sin(theta_h)) * (b * sin(theta_m) - a * sin(theta_h)) + (b * cos(theta_m) - a * cos(theta_h)) * (b * cos(theta_m) - a * cos(theta_h)));
  std::printf("%.100Lf\n", result);

  return 0;
}
    
  


Compiler output:
a.cc: In function 'int main()':
a.cc:16:24: error: 'sqrtles' was not declared in this scope; did you mean 'sqrtl'?
   16 |   long double result = sqrtles((b * sin(theta_m) - a * sin(theta_h)) * (b * sin(theta_m) - a * sin(theta_h)) + (b * cos(theta_m) - a * cos(theta_h)) * (b * cos(theta_m) - a * cos(theta_h)));
      |                        ^~~~~~~
      |                        sqrtl
Language: C++

#include <bits / stdc ++。h>
名前空間stdを使用します。
 
int main（）{
  int A、B、H、M;
  cin >> A >> B >> H >> M;
  double c、d、e;
  c = H * 30 + M * 0.5;
  d = M * 6;
  if（c <d）{
    e = sqrt（A * A + B * B-2 * A * B * cos（dc））;
  }
  else if（c> d）{
    e = sqrt（A * A + B * B-2 * A * B * cos（cd））;
  }
  そうしないと {
    e = 0;
  }
  cout << e << endl;
}


Compiler output:
a.cc:1:10: fatal error: bits / stdc ++。h: No such file or directory
    1 | #include <bits / stdc ++。h>
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main() {
  int A, B, H, M;
  cin >> A >> B >> H >> M;
  cout << sqrt(A*A + B*B + 2*sin(asin(-1))*A*B*cos(asin(-1) * (5 * H - M) / 30) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:81: error: invalid operands of types 'double' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |   cout << sqrt(A*A + B*B + 2*sin(asin(-1))*A*B*cos(asin(-1) * (5 * H - M) / 30) << endl;
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
Language: C++

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

int main() {
   double A, B, H, M;
   cin >> A >> B >> H >> M;
   double pi = 3.14159265358979323846;
   double X = cos((M / 30 - H / 6) * pi);
   double Y = cos((H / 6 - M / 30) * pi);
  if(double(M / 30 - H / 6) >= 0){
   cout << double(sqrt(A ^ 2 + B ^ 2 - 2 * A * B * X)) <<endl;
  }
  else{
   cout << double(sqrt(A ^ 2 + B ^ 2 - 2 * A * B * Y)) << endl;
  }
  return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: invalid operands of types 'double' and 'double' to binary 'operator^'
   11 |    cout << double(sqrt(A ^ 2 + B ^ 2 - 2 * A * B * X)) <<endl;
      |                        ~ ^ ~~~~~
      |                        |     |
      |                        |     double
      |                        double
a.cc:14:26: error: invalid operands of types 'double' and 'double' to binary 'operator^'
   14 |    cout << double(sqrt(A ^ 2 + B ^ 2 - 2 * A * B * Y)) << endl;
      |                        ~ ^ ~~~~~
      |                        |     |
      |                        |     double
      |                        double
Language: C++

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

int main(){
  int A,B,H,M;
  cin >> A >> B >> H >> M;
  
  double a_hari;
  a_hari = 30 * H + 0.5*M;
  double b_hari;
  b_hari = 6 *M;
   //角度を求める
  double kakudo;
  if(a_hari>=b_hari){
    kakudo = a_hari - b_hari;
  }else{
     kakudo = b_hari - a_hari;
  }
  if(kakudo >=180){
    kakudo = 360 -kakudo;
  }
   //cout << kakudo << endl;
  kakudo = kakudo * (M_PI /180);
  double c = cos(kakudo);
  //cout << c << endl;
  
  //長さを求める
 double ans;
  ans = sqrt(A*A + B*B -(2*A*B*c));
  cout << ans << endl;
}

Compiler output:
a.cc:2:1: error: 'clude' does not name a type
    2 | clude <iostream>using namespace std;
      | ^~~~~
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 >> A >> B >> H >> M;
      |   ^~~
      |   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
      |                  ^~~
a.cc:30:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   30 |   cout << ans << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:30:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   30 |   cout << ans << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define PI 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513282306647093844609550582231725359408128481117450284102701938521105559644622948954930381964428810975665933446128475648233786783165
int main(){
  int A, B, H, M;
  long double At, Bt, rad;
  cin >> A >> B >> H >> M;
  //At = 30*H+(long double)M/(long double)2;//360*H/12 + 360/12*M/60
  //Bt = 6*M;//360*M/60
  //rad = (At-Bt)*PI/180;
  rad = (30*H+(long double)M/(long double)2-6*M)*PI/(long double)180;
  cout << setprecision(20) << sqrtl(A*A+B*B-2*A*B*cosl(rad);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:60: error: expected ')' before ';' token
   12 |   cout << setprecision(20) << sqrtl(A*A+B*B-2*A*B*cosl(rad);
      |                                    ~                       ^
      |                                                            )
Language: C

#include <stdio.h>
#include <math.h>


int main() {
	int A, B, H, M;
	double PI = 3.141592;
	scanf_s("%d %d %d %d", &A, &B, &H, &M);
	double a, b;
	a = (double)M * 6;
	
	b = (double)H * 30 + M * 0.5;
	double radA, radB;
	radA = (double)(90-a) * PI / 180.0;
	radB = (double)(90-b) * PI / 180.0;
	//printf("%f", radA);
	double ax = A * cos(radA);
	double ay = A * sin(radA);
	double bx = B * cos(radB);
	double by = B * sin(radB);
	//printf("%f %f \n%f %f", ax, ay, bx, by);
	double c =sqrt((ax - bx) * (ax - bx) + (ay - by) * (ay - by));
	printf("%f", c);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    8 |         scanf_s("%d %d %d %d", &A, &B, &H, &M);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 int A,B,H,M;
  cin>>A>>B>>H>>M;
  int theta1 =abs(5*H-M);
  int theta = min(theta1, 60-theta1)
  cout << sqrt(A*A+B*B-2*A*B*cos(theta*M_PI/30))
  return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'cout'
    9 |   cout << sqrt(A*A+B*B-2*A*B*cos(theta*M_PI/30))
      |   ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A, B, H, M;
  cin >> A >> B >> H >> M;
  int a;
  a = abs(H * 30 - M * 6);
  if(a > 180){
    a = 360 - a;
  }
  a = a * pi / 180;
  if(a == pi ){
    cout << A + B << endl;
  } else if (a == 0){
    cout << abs(A - B) << endl;
  } else {
    cout << sqrt(A*A + B*B - 2*A*B*cos(a)) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: 'pi' was not declared in this scope
   11 |   a = a * pi / 180;
      |           ^~
Language: C++

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

int main(){
    double a,b,h,m,kakudo_a,kakudo_b,kakudo_sa,r ;
    cin >> a >> b >> h >> m;
    
   kakudo_a=30*h + m/2;
   kakudo_b=6*m;
   kakudo_sa=kakudo_b - kakudo_b;
   r=(kakudo_a)^2 + (kakudo_b)^2 - 2*(kakudo_a)*(kakudo_b)*cos(kakudo_sa);
   cout << r << endl;
   
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: invalid operands of types 'double' and 'double' to binary 'operator^'
   18 |    r=(kakudo_a)^2 + (kakudo_b)^2 - 2*(kakudo_a)*(kakudo_b)*cos(kakudo_sa);
      |      ~~~~~~~~~~^~~~~~~~~~~~~~~
      |       |           |
      |       double      double
Language: C++

#include "iostream"
#include "vector"
#include "string"

const double PI = 3.14159265358979323846;

using namespace std;

int main() {
	int A,B,H,M;
	cin >> A >> B >> H >> M;

	double xa = A * sin(2 * PI * H / 12);
	double ya = A * cos(2 * PI * H / 12);

	double xb = B * sin(2 * PI * M / 60);
	double yb = B * cos(2 * PI * M / 60);

	double X = pow(xb -xa, 2.0);
	double Y = pow(yb- ya, 2.0);
	double L = sqrt(X + Y);
		//double L = sqrt(pow(xa - xb, 2.0)+ pow(ya - yb, 2.0));

	cout << L;




	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: 'sin' was not declared in this scope
   13 |         double xa = A * sin(2 * PI * H / 12);
      |                         ^~~
a.cc:14:25: error: 'cos' was not declared in this scope
   14 |         double ya = A * cos(2 * PI * H / 12);
      |                         ^~~
a.cc:19:20: error: 'pow' was not declared in this scope
   19 |         double X = pow(xb -xa, 2.0);
      |                    ^~~
a.cc:21:20: error: 'sqrt' was not declared in this scope
   21 |         double L = sqrt(X + Y);
      |                    ^~~~
Language: C++

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

int main() {
   int A, B, H, M;
   cin >> A >> B >> H >> M;
   double pi = 3.14159265358979323846;
   double X = cos((M / 30 - H / 6) * pi);
   double Y = cos((H / 6 - M / 30) * pi);
  if(double(M / 30 - H / 6) >= 0){
   cout << double(sqrt(A ^ 2 + B ^ 2 - 2 * A * B * X)) <<endl;
  }
  else{
   cout << double(sqrt(A ^ 2 + B ^ 2 - 2 * A * B * Y)) << endl;
  }
  return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:34: error: invalid operands of types 'int' and 'double' to binary 'operator^'
   11 |    cout << double(sqrt(A ^ 2 + B ^ 2 - 2 * A * B * X)) <<endl;
      |                        ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
      |                          |           |
      |                          int         double
a.cc:14:34: error: invalid operands of types 'int' and 'double' to binary 'operator^'
   14 |    cout << double(sqrt(A ^ 2 + B ^ 2 - 2 * A * B * Y)) << endl;
      |                        ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
      |                          |           |
      |                          int         double
Language: C

#include <stdio.h>
#include <math.h>

int main(void) {
	int A, B, H, M;
	if(scanf("%d %d %d %d", &A, &B, &H, &M) == -1){
      return -1;
    }

	double argA, argB, arg;
	double C;
	double rad;

	argA = ((double)H / 12) * 360;
	argB = ((double)M / 60) * 360;
	
	
	printf("%lf %lf\n", argA, argB);
	if (argA < argB) {
		if (argB - argA > 180) {
			rad = (argB - argA - 180) * M_PI / 180;
			C = sqrt(A * A + B * B - (2 * A * B * cos(rad)));
		}
		else {
			rad = (argB - argA) * M_PI / 180;
			C = sqrt(A * A + B * B - (2 * A * B * cos(rad)));
		}
		
	}
	else {
		if (argA - argB > 180) {
			rad = (argA - argB - 180) * M_PI / 180;
			C = sqrt(double(A * A + B * B) - (2 * A * B * cos(rad)));
		}
		else {
			rad = (argA - argB) * M_PI / 180;
			C = sqrt(double(A * A + B * B) - (2 * A * B * cos(rad)));
		}
	}

	printf("%lf\n", C);
	

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:33:34: error: expected expression before 'double'
   33 |                         C = sqrt(double(A * A + B * B) - (2 * A * B * cos(rad)));
      |                                  ^~~~~~
main.c:37:34: error: expected expression before 'double'
   37 |                         C = sqrt(double(A * A + B * B) - (2 * A * B * cos(rad)));
      |                                  ^~~~~~
Language: C

#include<stdio.h>
#include<math.h>
int main(){
int A,B,H,M,Angle,result=0;
  scanf("%d %d %d %d",&A,&B,&H,&M);
  Angle=0.5(60*H-11*M);
    if (Angle<0)
      Angle=Angle*-1;
  result=sqrt(A*A + B*B - 2*A*B*cos(Angle));
  printf("%d",result);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: called object is not a function or function pointer
    6 |   Angle=0.5(60*H-11*M);
      |         ^~~
Language: C

#include<stdio.h>
#include<math>
int main(){
int A,B,H,M,Angle,result=0;
  scanf("%d %d %d %d",&A,&B,&H,&M);
  Angle=0.5(60*H-11*M);
    if (Angle<0)
      Angle=Angle*-1;
  result=sqrt(A*A + B*B - 2*A*B*cos(Angle));
  printf("%d",result);
  return 0;
}

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

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

int main () {
  double A, B, H, M, a, b, p, x;
  double cos();
  cin >> A >> B >> H >> M;
  p==3.1415926535;
  a==p*H/6;
  b==p*M/30;
  x==cos(a-b);
   cout << pow(A*A+B*B-2*A*B*x,1/2) << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    6 |   double cos();
      |             ^~
a.cc:6:13: note: remove parentheses to default-initialize a variable
    6 |   double cos();
      |             ^~
      |             --
a.cc:6:13: note: or replace parentheses with braces to value-initialize a variable
a.cc:11:9: error: too many arguments to function 'double cos()'
   11 |   x==cos(a-b);
      |      ~~~^~~~~
a.cc:6:10: note: declared here
    6 |   double cos();
      |          ^~~
Language: C++

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


int main() {
  int A,B,H,M;
  cin >> A >> B >> H >> M;
  
  double pi =3.14159265359;
  
  double C;
  C = 2*pi/12;
  double D;
  D = 2*pi/60;
    
  double S;
  S=(A*A+B*B-2*A*B*cos((H*C+M*D/12)-M*D));
  
  cout << long double sqrtl((long double) S) <<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:11: error: expected primary-expression before 'long'
   22 |   cout << long double sqrtl((long double) S) <<endl;
      |           ^~~~
Language: C++

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

int main(){
   int A , B , H , M ;
  cin >> A >> B >> H >> M ;
  float sita1 = 0;
  float sita2 =0;
  sita1 = H*0.5;
  sita2 = M*6%360;
  const double PI=3.14159265358979323846;
  float sita = abs(sita1-sita2);
  float y  = cos(PI / 180 * sita)
  cout << pow(A*A+B*B-2*A*B*y,0.5) << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: expected ',' or ';' before 'cout'
   14 |   cout << pow(A*A+B*B-2*A*B*y,0.5) << endl;
      |   ^~~~
Language: C++

#include<string>
#include<vector>
#include<cmath>
#include <math.h>
using namespace std;

int main() {
	double hl, ml, h, m;
	double ans;
	double angm, angh;
	double delta;
	cin >> hl >> ml >> h >> m;
	angm = m * 6;
	angh = (h+m/60) * 30;
	delta = abs(angm - angh);
	ans = pow(hl, 2) + pow(ml, 2) - 2 * ml * hl * cos(delta * M_PI / 180);
	cout << pow(ans,0.5);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'cin' was not declared in this scope
   12 |         cin >> hl >> ml >> h >> m;
      |         ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 | #include <math.h>
  +++ |+#include <iostream>
    5 | using namespace std;
a.cc:17:9: error: 'cout' was not declared in this scope
   17 |         cout << pow(ans,0.5);
      |         ^~~~
a.cc:17:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class C {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String line = reader.readLine();
        String[] strings = new String[4];
        strings = line.split(" ");
        int[] ints = new int[4];
        for (int i = 0; i < 4; i++) {
            ints[i] = Integer.parseInt(strings[i]);
        }
        int A = ints[0];

        int B = ints[1];

        int H = ints[2];

        int M = ints[3];

        H =  H % 12;
        double Hr = H * 30 + 0.5 * M;
        double Mr = M * 6.0;

        double cha = Math.abs(Hr - Mr);


        double jiaoducha = Math.toRadians(cha);
        double cq  = A*A + B*B - 2 * A * B * Math.cos(jiaoducha);

        double c = Math.sqrt(cq);
        System.out.println(c);

    }
}


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

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


int main() {
  int A,B,H,M;
  cin >> A >> B >> H >> M;
  
  double pi =3.14159265359;
  
  double C;
  C = 2*pi/12;
  double D;
  D = 2*pi/60;
    
  double S;
  S=(A*A+B*B-2*A*B*cos((H*C+M*D/12)-M*D));
  
  cout << long double sqrtl(long double S) <<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:11: error: expected primary-expression before 'long'
   22 |   cout << long double sqrtl(long double S) <<endl;
      |           ^~~~
Language: C

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

int main(void){
    double a,b;
    int h,m;
    scanf("%lf %lf %d %d",&a,&b,&h,&m);
    
    double ax,ay,bx,by;
    double M_PI=3.14159265358979323846;

    ax=cos(M_PI*h/6+M_PI*m/360);
    ay=sin(M_PI*h/6+M_PI*m/360);
    bx=cos(M_PI*m/30);
    by=sin(M_PI*m/30);
    
    //printf("%lf %lf %lf %lf\n",ax,ay,bx,by);
    double ans = (a*ax-b*bx)*(a*ax-b*bx)+(a*ay-b*by)*(a*ay-b*by);
    printf("%.20lf",sqrt(ans));
   
    return 0;
}


Compiler output:
In file included from main.c:4:
main.c: In function 'main':
main.c:12:12: error: expected identifier or '(' before numeric constant
   12 |     double M_PI=3.14159265358979323846;
      |            ^~~~