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

#include <bits/stdc++.h>
using namespace std;
#include <math.h>
#define PI 3.141592
#include <stdio.h>
#include <iostream>

int main(){
  int A, B, H, M;
  cin >> A >> B >> H >> M;
  int ac = H * 0.5 - 0.5 * H / 360 * 360;
  int bc = H * 6 - H * 6 / 360 * 360;
  int c = 0;
  int out = 0;
  
  if (ac > bc){
    c = ac - bc;
  }
  else{
    c = bc - ac;
  }
  
  double cos(double c);
  
  out = (int)pow(A, 2.0) + (int)pow(B, 2.0) - 2 * A * B * double c;
  
  cout << out << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:25:59: error: expected primary-expression before 'double'
   25 |   out = (int)pow(A, 2.0) + (int)pow(B, 2.0) - 2 * A * B * double c;
      |                                                           ^~~~~~
Language: C++

#include <bits/stdc++.h>
#include <cmath>
#include <iostream>
using namespace std;
typedef long long ll;
#define INF 1LL<<62
#define inf 1000000007
int main() {
	long double a,b,h,m;
	cin>>a>>b>>h>>m;
	long double A=h*30.0+m/2.0;
	long double B=6.0*m;
	long double now=double(abs(A-B));
	if(now>=180.0){
		now=now-180.0;
	}
	now=now*2.0*M_PI/360.0;
	long double NOW=long double cos( now);
    long double ans=-2.0*a*b*NOW+a*a+b*b;
	ans=sqrt(ans);
	cout <<printf("%.10Lf",ans);
	// your code goes here
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:25: error: expected primary-expression before 'long'
   18 |         long double NOW=long double cos( now);
      |                         ^~~~
Language: C++

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

int main() {
  int a,b,h,m;
  double pi = 3.141592653589793
  double aa, ab,angle ;
  double d;
  cin >> a >> b >> h >> m;
  aa = a * 30 + b * 30 / 60 ; 
  bb = b * 6 ;
  if(aa >= bb) angle = aa - bb ;
  else angle = bb - aa ;
  if(angle == 0) cout << b - a;
  else if(angle == 180) cout << b + a ;
  else{
    angle = pi / angle ;
    d = a * a + b * b - 2 * a * b *　cos(angle);
    d = sqrt(d);
    cout << d ;
  }
}

Compiler output:
a.cc:18:36: error: extended character 　 is not valid in an identifier
   18 |     d = a * a + b * b - 2 * a * b *　cos(angle);
      |                                    ^
a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'double'
    7 |   double aa, ab,angle ;
      |   ^~~~~~
a.cc:10:3: error: 'aa' was not declared in this scope; did you mean 'a'?
   10 |   aa = a * 30 + b * 30 / 60 ;
      |   ^~
      |   a
a.cc:11:3: error: 'bb' was not declared in this scope; did you mean 'b'?
   11 |   bb = b * 6 ;
      |   ^~
      |   b
a.cc:12:16: error: 'angle' was not declared in this scope
   12 |   if(aa >= bb) angle = aa - bb ;
      |                ^~~~~
a.cc:13:8: error: 'angle' was not declared in this scope
   13 |   else angle = bb - aa ;
      |        ^~~~~
a.cc:14:6: error: 'angle' was not declared in this scope
   14 |   if(angle == 0) cout << b - a;
      |      ^~~~~
a.cc:18:36: error: '\U00003000cos' was not declared in this scope
   18 |     d = a * a + b * b - 2 * a * b *　cos(angle);
      |                                    ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
double calcAngle(double h, double m)  
{  
    // validate the input  
    if (h <0 || m < 0 || h >12 || m > 60)  
        printf("Wrong input");  
  
    if (h == 12) h = 0;  
    if (m == 60) m = 0;  
  
    // Calculate the angles moved  
    // by hour and minute hands  
    // with reference to 12:00  
    double hour_angle = 0.5 * (h * 60 + m);  
    double minute_angle = 6 * m;  
  
    // Find the difference between two angles  
    double angle = abs(hour_angle - minute_angle);  
  
    // Return the smaller angle of two possible angles  
    angle = min(360 - angle, angle);  
  
    return angle;  
}  
int main()
{
  double pi=3.1415926535897932384;
  double a,b,h,m;
  cin>>a>>b>>h>>m;
  double ang=calcAngle(h,m);
  float ans=sqrt(a*a+b*b-2*a*b*cos(ang*180/pi);
  printf("%0.21f",ans);       
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:47: error: expected ')' before ';' token
   32 |   float ans=sqrt(a*a+b*b-2*a*b*cos(ang*180/pi);
      |                 ~                             ^
      |                                               )
Language: C++

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

int main(){  
  int A,B,H,M;
  cin >> A >> B >> H >> M;
  static const double pi=3.141592653589793238;
  std::cout << std::fixed;
  double angleH=H*pi/6;
  double angleM=M*pi/30;
  double theta=angleH-angleM;
  
  double L;
  L=A*A+B*B-2*A*B*cos(theta);
  cout << sqrt(L) << endl;
}
  

Compiler output:
a.cc:4:2: error: invalid preprocessing directive #inclede; did you mean #include?
    4 | #inclede <math.h>
      |  ^~~~~~~
      |  include
Language: C++

#include<bits/stdc++.h>
using namespace std;
template <class A, class B> inline bool chmax(A &a, const B &b) { return b > a && (a = b, true); }
template <class A, class B> inline bool chmin(A &a, const B &b) { return b < a && (a = b, true); }
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
typedef vector<long long> vlong;
typedef vector<string> vstring;
#define _GLIBCXX_DEBUG
#define vpush(a,x) a.push_back(x);
#define rep(i, n) REP(i, 0, n)
#define all(v) v.begin(), v.end()
#define REP(i, x, n) for(int i = x; i < n; i++)
const int INF = 1 << 30;
const int dx[] = {1,0,-1,0,1,1,-1,-1};
const int dy[] = {0,-1,0,1,1,-1,-1,1};
#define stp(x)  setprecision(x)
const double PI=3.14159265358979323846;
int main(){
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  double a,b,h,m;
  cin>>a>>b>>h>>m;
  double sa=abs(h*30-m*6);
  cout<<sa
  if(sa>180){
    sa=abs(sa-180);
  }
  sa=sa*PI/180;
  cout<<fixed<<stp(11)<<sqrt((double)(a*a)+(double)(b*b)-(double)(2.0*a*b*cos(sa)))<<'\n';
  return(0);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:11: error: expected ';' before 'if'
   26 |   cout<<sa
      |           ^
      |           ;
   27 |   if(sa>180){
      |   ~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#include <math.h>
#define PI 3.141592
#include <stdio.h>
#include <iostream>

int main(){
  int A, B, H, M;
  cin >> A >> B >> H >> M;
  int ac = H * 0.5 - 0.5 * H / 360 * 360;
  int bc = H * 6 - H * 6 / 360 * 360;
  int c = 0;
  int out = 0;
  
  if (ac > bc){
    c = ac - bc;
  }
  else{
    c = bc - ac;
  }
  
  out = (int)pow(A, 2.0) + (int)pow(B, 2.0) - 2 * A * B * double cos(double c);
  
  cout << out << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:23:59: error: expected primary-expression before 'double'
   23 |   out = (int)pow(A, 2.0) + (int)pow(B, 2.0) - 2 * A * B * double cos(double c);
      |                                                           ^~~~~~
Language: Java


import java.util.*;

class Main {


	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int H = sc.nextInt();
		int M = sc.nextInt();
		double x1 = B * Math.cos((Math.PI)/2 - (M*Math.PI)/30);
		double y1 = B * Math.sin((Math.PI)/2 - (M*Math.PI)/30);
		double x2 = A * Math.cos((Math.PI)/2 - (H*Math.PI)/6);
		double y2 = A * Math.sin((Math.PI))/2 - (H*Math.PI)/6);
		double dx = Math.abs(x1 - x2);
		double dy = Math.abs(y1 - y2);
		double ansans = Math.pow(dx,2) + Math.pow(dy, 2);
		double ans = Math.sqrt(ansans);
		
		System.out.println(ans);
		
	}



}




Compiler output:
Main.java:16: error: ';' expected
		double y2 = A * Math.sin((Math.PI))/2 - (H*Math.PI)/6);
		                                                     ^
1 error
Language: C++

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

const long double PI = 3.1415926535897932384626338;
signed main(void)
{
	long double a, b, h, m;
	long double O, ans;

	cin >> a >> b >> h >> m;
	O = (double)abs(30.0 * h - 59.5 * m);
	if (O > 180.0) O = 360.0 - O;
	O = (double)O * PI 
	O /= (double)180.0;
	ans = (double)a * a;
	ans += (double)b * b;
	ans -= (double)2 * a * b * cos(O);
	ans = (double)sqrt(ans);
	cout << fixed << setprecision(20) << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: expected ';' before 'O'
   14 |         O = (double)O * PI
      |                           ^
      |                           ;
   15 |         O /= (double)180.0;
      |         ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main () {
    int A, B, H, M;
    cin >> A >> B >> H >> M;
    double pi = 3.141592653589793238;
    double aa = 11 / 2 * M - 30 * H;
    double angle = abs(aa);
    double X = pow(A, 2) + pow(B, 2) - 2 * A * B * cos(angle / 180.0 * pi);
    double ans = sqrt(X);
    printf("%.10f\n", X);

Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: expected '}' at end of input
   11 |     printf("%.10f\n", X);
      |                          ^
a.cc:3:13: note: to match this '{'
    3 | int main () {
      |             ^
Language: C++

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

int main(){  
  int A,B,H,M;
  cin >> A >> B >> H >> M;
  static const double pi=3.141592653589793238;
  std::cout << std::fixed;
  double angleH=H*pi/6;
  double angleM=M*pi/30;
  double theta=angleH-angleM;
  
  double L;
  L=A*A+B*B-2*A*B*cos(theta);
  cout << sqrt(L) << endl:
}
  

Compiler output:
a.cc:4:2: error: invalid preprocessing directive #inclede; did you mean #include?
    4 | #inclede <math.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:18:26: error: expected ';' before ':' token
   18 |   cout << sqrt(L) << endl:
      |                          ^
      |                          ;
Language: C++

#include<iostream>
#include<string>
#include<cmath>
using namespace std;
int main(){
double A,B,H,M,rA,rB,xf,xs,yf,ys,z,PI=acos(-1);
cin >>A>>B>>H>>M;
rA=2*PI*H*60/720;
rB=2*PI*M/60;
double cos(double rA);
double cos(double rB);
double sin(double rA);
double sin(double rB);
xf=A*sin(double rA);
yf=A*cos(double rA);
xs=B*sin(double rB);
ys=B*cos(double rB);
z=sqrt((xf-xs)*(xf-xs)+(yf-ys)*(yf-ys));

cout << z << endl;

return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: expected primary-expression before 'double'
   14 | xf=A*sin(double rA);
      |          ^~~~~~
a.cc:15:10: error: expected primary-expression before 'double'
   15 | yf=A*cos(double rA);
      |          ^~~~~~
a.cc:16:10: error: expected primary-expression before 'double'
   16 | xs=B*sin(double rB);
      |          ^~~~~~
a.cc:17:10: error: expected primary-expression before 'double'
   17 | ys=B*cos(double rB);
      |          ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#include <math.h>
#define PI 3.141592
#include <stdio.h>

int main(){
  int A, B, H, M;
  cin >> A >> B >> H >> M;
  int ac = H * 0.5 - 0.5 * H / 360 * 360;
  int bc = H * 6 - H * 6 / 360 * 360;
  int c = 0;
  int out = 0;
  
  if (ac > bc){
    c = ac - bc;
  }
  else{
    c = bc - ac;
  }
  
  out = (int)pow(A, 2.0) + (int)pow(B, 2.0) - 2 * A * B * double cos(double c);
  
  cout << out << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:22:59: error: expected primary-expression before 'double'
   22 |   out = (int)pow(A, 2.0) + (int)pow(B, 2.0) - 2 * A * B * double cos(double c);
      |                                                           ^~~~~~
Language: C++

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

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

    double ang1 = (h * 60.0 + m)/ 720.0 * 360.0;
    double ang2 = m/60.0 * 360;
    double angBetween = abs(ang2 - ang1);

    cout << setprecision(20) << sqrt((a*a) + (b*b) - (2*a*b*cos(angBetween * PI / 180)));

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:78: error: 'PI' was not declared in this scope
   12 |     cout << setprecision(20) << sqrt((a*a) + (b*b) - (2*a*b*cos(angBetween * PI / 180)));
      |                                                                              ^~
Language: C

import math
a,b,h,m=map(int,input().split())
ha=h * 30 + (30 * (m / 60))
ma=360 * (m / 60)
angle=max(ha,ma)-min(ha,ma)
if angle>=180:
  angle-=180
if angle==90:
  print(math.sqrt(a*a+b*b))
elif angle==0 or angle==180:
  if angle==0:
    print(abs(a-b))
  else:
    print(a+b)
else:
  angle=angle/180*math.pi
  #print(ha,ma,angle,math.cos(angle))
  ans=math.sqrt(a*a+b*b-2*a*b*math.cos(angle))
  print(ans)


Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import math
      | ^~~~~~
main.c:2:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'a'
    2 | a,b,h,m=map(int,input().split())
      | ^
main.c:17:4: error: invalid preprocessing directive #print
   17 |   #print(ha,ma,angle,math.cos(angle))
      |    ^~~~~
Language: C++

#include<iostream>
#include<string>
#include<cmath>
using namespace std;
int main(){
double A,B,H,M,rA,rB,xf,xs,yf,ys,z,PI=acos(-1);
cin >>A>>B>>H>>M;
rA=2*PI*H*60/720;
rB=2*PI*M/60;
double cos(rA);
double cos(rB);
double sin(rA);
double sin(rB);
xf=A*sin(rA);
yf=A*cos(rA);
xs=B*sin(rB);
ys=B*cos(rB);
z=sqrt((xf-xs)*(xf-xs)+(yf-ys)*(yf-ys));

cout << z << endl;

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: redeclaration of 'double cos'
   11 | double cos(rB);
      |        ^~~
a.cc:10:8: note: 'double cos' previously declared here
   10 | double cos(rA);
      |        ^~~
a.cc:13:8: error: redeclaration of 'double sin'
   13 | double sin(rB);
      |        ^~~
a.cc:12:8: note: 'double sin' previously declared here
   12 | double sin(rA);
      |        ^~~
a.cc:14:9: error: 'sin' cannot be used as a function
   14 | xf=A*sin(rA);
      |      ~~~^~~~
a.cc:15:9: error: 'cos' cannot be used as a function
   15 | yf=A*cos(rA);
      |      ~~~^~~~
a.cc:16:9: error: 'sin' cannot be used as a function
   16 | xs=B*sin(rB);
      |      ~~~^~~~
a.cc:17:9: error: 'cos' cannot be used as a function
   17 | ys=B*cos(rB);
      |      ~~~^~~~
Language: C

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

    double min(double a,double b){
        if(a<b) return a;
        else return b;
    }
    int main(){
      double rad = 0.01745329251994329576923690768489‬;
      int a,b,h,m;
      scanf("%d",&a);
      scanf("%d",&b);
      scanf("%d",&h);
      scanf("%d",&m);
      double angle = (h*30)+(m/2)-(m*6);
      angle = min(angle,360-angle);
      angle = angle*rad;
      double ca = cos(angle);
      double temp = 2*a*b*ca;
      double ans = sqrt((a*a)+(b*b)-temp);
      printf("%0.21f\n",ans);
      return 0;
    }


Compiler output:
main.c: In function 'main':
main.c:10:20: error: invalid suffix "‬" on floating constant
   10 |       double rad = 0.01745329251994329576923690768489‬;
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#include <math.h>
#define PI 3.141592

int main(){
  int A, B, H, M;
  cin >> A >> B >> H >> M;
  int ac = H * 0.5 - 0.5 * H / 360 * 360;
  int bc = H * 6 - H * 6 / 360 * 360;
  int c = 0;
  int out = 0;
  
  if (ac > bc){
    c = ac - bc;
  }
  else{
    c = bc - ac;
  }
  
  out = (int)pow(A, 2.0) + (int)pow(B, 2.0) - 2 * A * B * double cos(double c);
  
  cout << out << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:21:59: error: expected primary-expression before 'double'
   21 |   out = (int)pow(A, 2.0) + (int)pow(B, 2.0) - 2 * A * B * double cos(double c);
      |                                                           ^~~~~~
Language: C

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

int main(void){

    int A;
    int B;
    int H;
    int M;
    int k;
    int l;
    int x;
    int y;
    int z;

    scanf("%d", &A);
    scanf("%d", &B);
    scanf("%d", &H);
    scanf("%d", &M);

    k = M * 6; 
    l = H * 30 + 0.5 * M;　
    x = k - l;
    y = abs(x);

    z = pow(A, 2.0) + pow(B, 2.0) - A * B *  cos(y);
    z = sqrt(z);

    printf("%d¥n", z);

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:23:26: error: stray '\343' in program
   23 |     l = H * 30 + 0.5 * M;<U+3000>
      |                          ^~~~~~~~
Language: Java

import java.util.Scanner;
import java.util.*;
public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
      //数字の数を入力
		int a = sc.nextInt();
		int b = sc.nextInt();
		int h = sc.nextInt();
		int m = sc.nextInt();
      //短針が進む角度
      double tanshin = 0.5 *m + 30*h;
      //長針
      double tyoshin = 6 * m;
      //なす角度
      double kakudo = tanshin - tyoshin;
      if(kakudo == 180){
        System.out.println( a + b );
      }else if(kakudo == 0　|| kakudo == 180){
        System.out.println(0);
      }else {
        if(kakudo > 180){
        	kakudo = 360 - kakudo;
      	}
        if(kakudo < 0){
        	kakudo *= -1;
        }
        
      	double result2 = a*a + b*b - 2*a*b* Math.cos(Math.toRadians(kakudo));
      	double result = Math.sqrt(result2);
      	System.out.println(result);
      
      }             
      
	}

}


Compiler output:
Main.java:20: error: illegal character: '\u3000'
      }else if(kakudo == 0?|| kakudo == 180){
                          ^
Main.java:20: error: not a statement
      }else if(kakudo == 0?|| kakudo == 180){
                                     ^
Main.java:20: error: ';' expected
      }else if(kakudo == 0?|| kakudo == 180){
                                           ^
Main.java:22: error: 'else' without 'if'
      }else {
       ^
4 errors
Language: C++

#include <bits/stdc++.h>
#include <cmath>
#include <iostream>

using namespace std;
int main(){
  static const double pi = 3.141592653589793;
  int A,B,H,M;
  float x;
  cin>>A>>B>>H>>M;
  
  x=A*A+B*B-2*A*B*cos(abs((H*pi/6-M*pi/30));
  
  cout<<x<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:44: error: expected ')' before ';' token
   12 |   x=A*A+B*B-2*A*B*cos(abs((H*pi/6-M*pi/30));
      |                      ~                     ^
      |                                            )
Language: Java


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

        double ans = 0;
        double r = Math.abs(((((h * 60) + m) / 2) - (m * 6)));

        if ( r == 0) {
            System.out.println(Math.abs(a - b));
        } else if (r == 180) {
            System.out.println(a + b);
        } else {
            ans = Math.sqrt((a * a) + (b * b) - (2 * a * b * Math.cos(Math.toRadians(r))));
            System.out.println(ans);
        }

        scn.close();
    }
}

Compiler output:
Main.java:4: error: cannot find symbol
        Scanner scn = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
        Scanner scn = new Scanner(System.in);
                          ^
  symbol:   class Scanner
  location: class Main
2 errors
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, X, Y, f;
  c = H * 30 + M * 0.5;
  d = M * 6;
  if (d - c > 0) {
    f = max(d-c, 360 - d + c);
  }
  if (d - c < 0) {
    f = max(c-d, 360 - c + d);
  }
  
  if (c < d) {
    X = A * A + B * B;
    Y = 2 * A * B * cos(f)
    e = sqrt(X - Y);
  }
  else if (c > d) {
    X = A * A + B * B;
    Y = 2 * A * B * cos(f)
    e = sqrt(X - Y);
  }
  else {
    e = max(A - B, B - A);
  }
  cout << e << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:27: error: expected ';' before 'e'
   19 |     Y = 2 * A * B * cos(f)
      |                           ^
      |                           ;
   20 |     e = sqrt(X - Y);
      |     ~                      
a.cc:24:27: error: expected ';' before 'e'
   24 |     Y = 2 * A * B * cos(f)
      |                           ^
      |                           ;
   25 |     e = sqrt(X - Y);
      |     ~
Language: C++

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

int main(){
  int A, B, H, M;
  cin >> A >> B >> H >> M;
  int ac = H * 0.5 - 0.5 * H / 360 * 360;
  int bc = H * 6 - H * 6 / 360 * 360;
  int c = 0;
  int out = 0;
  
  if (ac > bc){
    c = ac - bc;
  }
  else{
    c = bc - ac;
  }
  
  out = (int)pow(A, 2.0) + (int)pow(B, 2.0) - 2 * A * B * double cos(double c);
  
  cout << out << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:20:59: error: expected primary-expression before 'double'
   20 |   out = (int)pow(A, 2.0) + (int)pow(B, 2.0) - 2 * A * B * double cos(double c);
      |                                                           ^~~~~~
Language: C++

#include <bits/stdc++.h>
#include <cmath>
#include <iostream>

using namespace std;
int main(){
  int A,B,H,M;
  float x;
  cin>>A>>B>>H>>M;
  
  x=A*A+B*B-2*A*B*cos(abs((H*pi/6-M*pi/30));
  
  cout<<x<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:30: error: 'pi' was not declared in this scope
   11 |   x=A*A+B*B-2*A*B*cos(abs((H*pi/6-M*pi/30));
      |                              ^~
Language: C++

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

int main(){
  int A, B, H, M;
  cin >> A >> B >> H >> M;
  int ac = H * 0.5 - 0.5 * H / 360 * 360;
  int bc = H * 6 - H * 6 / 360 * 360;
  int c = 0;
  int out = 0;
  
  if (ac > bc){
    c = ac - bc;
  }
  else{
    c = bc - ac;
  }
  
  double cos(double c);
  
  out = (int)pow(A, 2.0) + (int)pow(B, 2.0) - 2 * A * B * double c;
  
  cout << out << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:22:59: error: expected primary-expression before 'double'
   22 |   out = (int)pow(A, 2.0) + (int)pow(B, 2.0) - 2 * A * B * double c;
      |                                                           ^~~~~~
Language: C++

#define PI 3.14
#include<bits/stdc++.h>
#include<math.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
# define ALL(x) (x).begin(), (x).end()
using namespace std;
int main()
{int A,B,H,M;
 float K;
 cin>>A>>B>>H>>M;
 cos(abs(H/12*PI-M/60*PI)=K;
 cout<<sqrt(A*A+B*B-2*A*B*K)<<endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: lvalue required as left operand of assignment
   11 |  cos(abs(H/12*PI-M/60*PI)=K;
      |      ~~~^~~~~~~~~~~~~~~~~
Language: C

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

int main(void){

    int A;
    int B;
    int H;
    int M;
    int k;
    int l;
    int x;
    int y;
    int z;

    scanf("%d", &A);
    scanf("%d", &B);
    scanf("%d", &H);
    scanf("%d", &M);

    k = M * 6; 
    l = H * 30 + 0.5 * M;　
    x = k - l;
    y = abs(x);

    z = pow(A, 2.0) + pow(B, 2.0) - A * B *  cos(y);
    z = sqrt(z);

    printf("%d¥n", z);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:26: error: stray '\343' in program
   23 |     l = H * 30 + 0.5 * M;<U+3000>
      |                          ^~~~~~~~
Language: C++

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

int main(){
  int A, B, H, M;
  cin >> A >> B >> H >> M;
  int ac = H * 0.5 - 0.5 * H / 360 * 360;
  int bc = H * 6 - H * 6 / 360 * 360;
  int c = 0;
  int out = 0;
  
  if (ac > bc){
    c = ac - bc;
  }
  else{
    c = bc - ac;
  }
  
  double cos(double c);
  
  out = (int)pow(A, 2.0) + (int)pow(B, 2.0) - 2 * A * B * double c;
  
  cout << out << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:21:59: error: expected primary-expression before 'double'
   21 |   out = (int)pow(A, 2.0) + (int)pow(B, 2.0) - 2 * A * B * double c;
      |                                                           ^~~~~~
Language: C++

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

int main() {
    double A,B,H,M;
    cin >> A >> B >> H >> M;
    double X = H*30+M*0.5;
    double Y = M*6;
    double Z = max(X,Y)-min(X,Y)
    double D = min(Z,360-Z)
    double pi = 3.141592653589793238;
    double ans = A*A+B*B-2*A*B*cos(D/180.0*pi);
    ans = sqrt(ans);
    cout << fixed << setprecision(20) << ans << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: expected ',' or ';' before 'double'
   10 |     double D = min(Z,360-Z)
      |     ^~~~~~
a.cc:12:36: error: 'D' was not declared in this scope
   12 |     double ans = A*A+B*B-2*A*B*cos(D/180.0*pi);
      |                                    ^
a.cc:12:44: error: 'pi' was not declared in this scope
   12 |     double ans = A*A+B*B-2*A*B*cos(D/180.0*pi);
      |                                            ^~
Language: C++

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

int main() {
  int A,B,H,M;
  cin >> A >> B >> H >> M;
  
  double pi =3.1415926535897932;
  
  double C; 
  C = pi/6.0; //長針の角速度(rad/h)
  double D;
  D = pi/30.0; //短針の角速度(rad/m)
    
  long double S;
  S=(A*A+B*B-2*A*B*cos(H*C-M*D*11.0/12.0);//余弦定理
  
  cout << sqrtl((long double) S) <<endl;//最後にルートをとる
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:42: error: expected ')' before ';' token
   17 |   S=(A*A+B*B-2*A*B*cos(H*C-M*D*11.0/12.0);//余弦定理
      |     ~                                    ^
      |                                          )
Language: C++

#include<bits/stdc++.h>
#define     ll          long long
#define     MOD         10e9+7
#define     pb          push_back
#define     vll         vector<long long>
#define     vi          vector<int>
#define     vl          vector<long>
#define     pii         pair<int, int>
#define     all(a)      (a).begin(),(a).end()
#define     rep(i,a,b)  for(int i=a;i<b;i++)
#define     MAX         100002 
#define     ios	      ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;

#define PI 3.14159265
int main() {
   
    	ios
    	ll a,b,h,m;
    	cin >> a >> b >> h >> m;
      	ll hour_angle = 0.5 * (h * 60 + m);  
        ll minute_angle = 6 * m;  
        ll angle = abs(hour_angle - minute_angle);  
        angle = min(360 - angle, angle); 
        double r= angle*PI/180.0;
        double ans = a*a+b*b-2*a*b*cos(r);
        ans=sqrt(ans);
        printf("%.20lf",ans);
        
  
    }
   
    return 0;
  
}

Compiler output:
a.cc:33:5: error: expected unqualified-id before 'return'
   33 |     return 0;
      |     ^~~~~~
a.cc:35:1: error: expected declaration before '}' token
   35 | }
      | ^
Language: C++

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

int main() {
  int A,B,H,M;
  cin >> A >> B >> H >> M;
  
  double pi =3.1415926535897932;
  
  double C; 
  C = pi/6.0; //長針の角速度(rad/h)
  double D;
  D = pi/30.0; //短針の角速度(rad/m)
    
  long double S;
  S=(A*A+B*B-2*A*B*cos((H*C-M*D*11.0/12.0);//余弦定理
  
  cout << sqrtl((long double) S) <<endl;//最後にルートをとる
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:43: error: expected ')' before ';' token
   17 |   S=(A*A+B*B-2*A*B*cos((H*C-M*D*11.0/12.0);//余弦定理
      |                       ~                   ^
      |                                           )
a.cc:17:43: error: expected ')' before ';' token
   17 |   S=(A*A+B*B-2*A*B*cos((H*C-M*D*11.0/12.0);//余弦定理
      |     ~                                     ^
      |                                           )
Language: C++

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

int main(){
  int A, B, H, M;
  cin >> A >> B >> H >> M;
  int ac = H * 0.5 - 0.5 * H / 360 * 360;
  int bc = H * 6 - H * 6 / 360 * 360;
  int c = 0;
  int out = 0;
  
  if (ac > bc){
    c = ac - bc;
  }
  else{
    c = bc - ac;
  }
  
  out = (int)pow(A, 2.0) + (int)pow(B, 2.0) - 2 * A * B * double cos(double c);
  
  cout << out << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:19:59: error: expected primary-expression before 'double'
   19 |   out = (int)pow(A, 2.0) + (int)pow(B, 2.0) - 2 * A * B * double cos(double c);
      |                                                           ^~~~~~
Language: C++

#include <cmath>
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A,B,H,M;
  cin >> A >> B >> H >> M;
  double nagasa;
  double iroiro;
  double kakudo;
  kakudo = abs(30*H - 5.5*M * 3.141592653589793 / 180);
  
  iroiro = A*A*sin(kakudo)*sin(kakudo)+B*B-2*A*B*cos(kakudo)+A*A*cos(kakudo)*cos(kakudo);
  nagasa = sqrt(iroiro)
    cout << nagasa << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: expected ';' before 'cout'
   14 |   nagasa = sqrt(iroiro)
      |                        ^
      |                        ;
   15 |     cout << nagasa << endl;
      |     ~~~~
Language: C++

#include <iostream>
#include <cmath>
#include <cstdlib>
using namespace std;

int main(){
  int A;
  int B;
  int H;
  int M;
  int C;
  int r1;
  int r2;
  int f;
  cin >> A >> B >> H >> M;
  
  r1 = 360/(60*60*12);
  r2 = 360/(60*60);
  
  f = (M*60*60)*r1 - (H*60)*r2;
  f = |f|;
  
  C = A*A + B*B - 2*A*B*cos(f);
  C = sqrt(C);
  
  cout << C << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:7: error: expected primary-expression before '|' token
   21 |   f = |f|;
      |       ^
a.cc:21:10: error: expected primary-expression before ';' token
   21 |   f = |f|;
      |          ^
Language: C++

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

int main()
{
      double A,B,H,M,kakua,kakub,kaku;

    cin>>A>>B>>H>>M;

     kakua = 360*H/12;
     kakub = 360+M/60;
     kaku = abs(kakua-kakub)*PI/180.0;
  
    double s = 2*A*sin(kaku);

  cout<<setprecision(10)<<s<<endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: 'PI' was not declared in this scope
   12 |      kaku = abs(kakua-kakub)*PI/180.0;
      |                              ^~
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int h = sc.nextInt();
    int m = sc.nextInt();
    
    double angH = 30*h;
    double angM = 5.5*m;
    double ang = Math.abs(angH - angM);
    double c = 0;
    c = a*a + b*b - 2*a*b*Math.cos(ang);
    System.out.print(c);
  }
}
r


Compiler output:
Main.java:18: error: reached end of file while parsing
r
^
1 error
Language: C

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

Compiler output:
main.c: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;
#define ll long long int
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(x) x.begin(), x.end()
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
typedef vector<int> vi;
const int mod = 1000000007;





int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    std::cout << std::setprecision();
    double a,b,h,m;
    cin>>a>>b>>h>>m;
    h  = (h*60 + m)/2;
    double angle = abs(h- 6*m);
    //cout<<angle<<endl;
    if(angle>180.0){
        angle = angle-180.0;
    }
   //cout<<angle<<endl;
    //angle = (angle*3.141592653)/180;
   // cout<<cos(angle)<<endl;
    double ans = sqrt(a*a + b*b - 2*a*b*cos(angle)) ;
    
    cout<<ans<<endl;



  






}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:20:35: error: too few arguments to function 'std::_Setprecision std::setprecision(int)'
   20 |     std::cout << std::setprecision();
      |                  ~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143,
                 from a.cc:1:
/usr/include/c++/14/iomanip:202:3: note: declared here
  202 |   setprecision(int __n)
      |   ^~~~~~~~~~~~
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(A * A + B * B - (2 * A * B * cos(rad)));
		}
        else if(argB - argA == 180){
           C = A + B;
        }
		else {
			rad = (argB - argA) * M_PI / 180;
			C = sqrt(A * A + B * B - (2 * A *B * cos(rad)));
		}
		
	}
  	else if(argB  == argA){
        if(A < B){
          C = B - A;
        }
      else{
        C = A - B;
    }
	else {
		if (argA - argB > 180) {
			rad = (argA - argB - 180) * M_PI / 180;
			C = sqrt(A * A + B * B- (2 * A * B * cos(rad)));
		}
        else if(argA - argB == 180){
          C = A + B;
        }
		else {
			rad = (argA - argB) * M_PI / 180;
			C = sqrt(A * A + B * B - (2 * A * B * cos(rad)));
		}
	}

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

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:38:9: error: expected '}' before 'else'
   38 |         else {
      |         ^~~~
Language: C++

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

int main(){
  int A;
  int B;
  int H;
  int M;
  int C;
  int r1;
  int r2;
  int f;
  cin >> A >> B >> H >> M;
  
  r1 = 360/(60*60*12);
  r2 = 360/(60*60);
  
  f = (M*60*60)*r1 - (H*60)*r2;
  
  C = A*A + B*B - 2*A*B*cos(|f|);
  C = sqrt(C)
  
  cout << C << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:29: error: expected primary-expression before '|' token
   21 |   C = A*A + B*B - 2*A*B*cos(|f|);
      |                             ^
a.cc:21:32: error: expected primary-expression before ')' token
   21 |   C = A*A + B*B - 2*A*B*cos(|f|);
      |                                ^
a.cc:22:14: error: expected ';' before 'cout'
   22 |   C = sqrt(C)
      |              ^
      |              ;
   23 | 
   24 |   cout << C << endl;
      |   ~~~~
Language: C++

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

int main(){
  cout << fixed << setprecision(10) ;
  
   int A , B , H , M ;
  cin >> A >> B >> H >> M ;
  sita1 = 0;
  double sita2 =0;
  sita1 = H*0.5;
  sita2 = M*6%360;
  const double PI=3.14159265358979323846;
  double sita = abs(sita1-sita2);
  double 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:10:3: error: 'sita1' was not declared in this scope
   10 |   sita1 = 0;
      |   ^~~~~
Language: C++

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

int main(){
  cout << fixed << setprecision(10) 
  
   int A , B , H , M ;
  cin >> A >> B >> H >> M ;
  sita1 = 0;
  double sita2 =0;
  sita1 = H*0.5;
  sita2 = M*6%360;
  const double PI=3.14159265358979323846;
  double sita = abs(sita1-sita2);
  double 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:6:36: error: expected ';' before 'int'
    6 |   cout << fixed << setprecision(10)
      |                                    ^
      |                                    ;
    7 | 
    8 |    int A , B , H , M ;
      |    ~~~                              
a.cc:9:10: error: 'A' was not declared in this scope
    9 |   cin >> A >> B >> H >> M ;
      |          ^
a.cc:9:15: error: 'B' was not declared in this scope
    9 |   cin >> A >> B >> H >> M ;
      |               ^
a.cc:9:20: error: 'H' was not declared in this scope
    9 |   cin >> A >> B >> H >> M ;
      |                    ^
a.cc:9:25: error: 'M' was not declared in this scope
    9 |   cin >> A >> B >> H >> M ;
      |                         ^
a.cc:10:3: error: 'sita1' was not declared in this scope
   10 |   sita1 = 0;
      |   ^~~~~
Language: C

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

void main(void)
{
    double a, b, c, h, m;
    scanf("%lf", &a);
    scanf("%lf", &b);
    scanf("%lf", &h);
    scanf("%lf", &m);
    double rad = fabs(30 * h + 0.5 * m - 6 * m);
    if (rad > 180)
    {
        rad -= 180;
    }

    rad = (rad / 180) * M_PI;
    double ans = b * b + a * a - 2 * b * a * cos(rad);
    /* 平方根 */
    ans = sqrt(ans);

    printf("%lf\n", ans);
}

Compiler output:
/usr/bin/ld: /tmp/cczF7EDb.o: in function `main':
main.c:(.text+0x15d): undefined reference to `cos'
/usr/bin/ld: main.c:(.text+0x186): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

#include<bits/stdc++.h>
using namespace std;
int n,m;
bool flag;
int a[1000][1000];
bool ip(int x){
	if(x==1||x==0)
	return false;
	for(int j=2;j<=sqrt(x);j++)
	if(x%j==0)
	return false;
	return true;}
bool use[10000];
void dfs(int x,int y,int step){
	if(step==n*m+1){
		for(int i=1;i<=n;i++){
			for(int j=1;j<=m;j++)
			cout<<a[i][j];
			cout<<endl;}
		flag=true;
		return;}
	for(int i=1;i<=n*m&&!flag;i++) {
		if(!use[i]){
		    int ux=x-1,uy=y;
			if(ux>0&&ux<=n&&uy>0&&uy<=m){
				if(!ip(a[ux][uy]+i))
				continue;} 
			int lx=x,ly=y-1;
			if(lx>0&&lx<=n&&ly>0&&ly<=m){
				if(ip(a[lx][ly]+i)==false)
				continue;}
			a[x][y]=i;
			use[i]=true;
			int nx=x,ny=1+y;
			if(ny>m){
				ny=1;nx++;}
			if(nx>n){
				for(int i=1;i<=n;i++)
			   	for(int j=1;j<=m;j++)
			    cout<<a[i][j];flag=true;
				return;} 
			dfs(nx,ny,step+1);
use[i]=false;
}}}
int main(){
	cin>>n>>m;
	flag=false;
	dfs(1,1,1);
	if(!flag)
	cout<<"NO"<<endl;
	return 0;
}

Compiler output:
main.c:1:9: 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;
	
cout << fixed << setprecision(10) 
int main(){
  
   int A , B , H , M ;
  cin >> A >> B >> H >> M ;
  sita1 = 0;
  double sita2 =0;
  sita1 = H*0.5;
  sita2 = M*6%360;
  const double PI=3.14159265358979323846;
  double sita = abs(sita1-sita2);
  double y  = cos(PI / 180 * sita);
  cout <<double( pow(A*A+B*B-2*A*B*y,0.5)) << endl;
  
}


Compiler output:
a.cc:4:1: error: 'cout' does not name a type
    4 | cout << fixed << setprecision(10)
      | ^~~~
Language: C

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

int main(){

    int A;
    int B;
    int H;
    int M;
    int k;
    int l;
    int x;
    int y;
    int z;

    scanf("%d", &A);
    scanf("%d", &B);
    scanf("%d", &H);
    scanf("%d", &M);

    k = M * 6; 
    l = H * 30 + 0.5 * M;　
    x = k - l;
    y = abs(x);

    z = pow(A, 2.0) + pow(B, 2.0) - A * B *  cos(y);
    z = sqrt(z);

    printf("%d", z);

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:23:26: error: stray '\343' in program
   23 |     l = H * 30 + 0.5 * M;<U+3000>
      |                          ^~~~~~~~
Language: C++

import numpy as np

i = list(map(int, input().split()))
a = i[0]
b = i[1]
h = i[2]
m = i[3]
arg1 = (float((h * 60 + m)*2)/float((12 * 60)))
arg2 = float(m*2 )/60
arg = abs(arg1 - arg2) * np.pi
print(np.sqrt(a*a + b*b - 2*a*b*np.cos(arg)))

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

#include <iostream>
using namespace std;

int main(){
  int A;
  int B;
  int H;
  int M;
  int C;
  int r1;
  int r2;
  int f;
  cin >> A >> B >> H >> M;
  
  r1 = 360/(60*60*12);
  r2 = 360/(60*60);
  
  f = (M*60*60)*r1 - (H*60)*r2;
  
  C = A*A + B*B - 2*A*B*cos(|f|);
  C = sqrt(C)
  
  cout << C << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:29: error: expected primary-expression before '|' token
   20 |   C = A*A + B*B - 2*A*B*cos(|f|);
      |                             ^
a.cc:20:32: error: expected primary-expression before ')' token
   20 |   C = A*A + B*B - 2*A*B*cos(|f|);
      |                                ^
a.cc:20:25: error: 'cos' was not declared in this scope
   20 |   C = A*A + B*B - 2*A*B*cos(|f|);
      |                         ^~~
a.cc:21:7: error: 'sqrt' was not declared in this scope
   21 |   C = sqrt(C)
      |       ^~~~
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();
       double hena=tyoushin;
      double henb=tanshin;
      double kaku=toRadians(Math.abs((jikan*30+30*hun/60)-hun*6));
      double kai=(Math.sqrt(hena*hena+henb*henb+hena*henb*Math.cos(kaku)));
}
}

Compiler output:
Main.java:13: error: cannot find symbol
      double kaku=toRadians(Math.abs((jikan*30+30*hun/60)-hun*6));
                  ^
  symbol:   method toRadians(int)
  location: class Main
1 error
Language: Java

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

public class one {
    public static void main(String[] args){
        int a,b,h,m;
        double result;
        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            String[] temp = reader.readLine().split(" ");
            a = Integer.parseInt(temp[0]);
            b = Integer.parseInt(temp[1]);
            h = Integer.parseInt(temp[2]);
            m = Integer.parseInt(temp[3]);
        }catch (Exception e){
            e.printStackTrace();
        }

        double angle=0;
        angle=m/60.0*2*Math.PI-H/12.0*2*Math.PI;
        if(angle>=Math.PI){
            angle=2*Math.PI-angle;
        }
        result=Math.sqrt(a*a+b*b-2*a*b*Math.cos(angle));
        System.out.println(result);

    }
}


Compiler output:
Main.java:4: error: class one is public, should be declared in a file named one.java
public class one {
       ^
Main.java:20: error: cannot find symbol
        angle=m/60.0*2*Math.PI-H/12.0*2*Math.PI;
                               ^
  symbol:   variable H
  location: class one
2 errors
Language: C

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

int main(){

    int A;
    int B;
    int H;
    int M;
    int k;
    int l;
    int x;
    int y;
    int z;

    scanf("%d", &A);
    scanf("%d", &B);
    scanf("%d", &H);
    scanf("%d", &M);

    k = M * 6; /*M分での角度*/
    l = H * 30 + 0.5 * M;　/*H時での角度*/
    x = k - l;
    y = abs(x);

    z = pow(A, 2.0) + pow(B, 2.0) - A * B *  cos(y);
    z = sqrt(z);

    printf(%d, z);

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:23:26: error: stray '\343' in program
   23 |     l = H * 30 + 0.5 * M;<U+3000>/*H<U+6642><U+3067><U+306E><U+89D2><U+5EA6>*/
      |                          ^~~~~~~~
main.c:30:12: error: expected expression before '%' token
   30 |     printf(%d, z);
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    long long A,B,H,M;
    double temp =0,result = 0,kakudo=0,radians=0,tankakudo=0,chokakudo=0;
    const double PI = acos(-1);
    cin >> A >> B >> H >> M;

    tankakudo = 30 * H + (30 * M / 60);

    chokakudo = 6 * M;

    kakudo = abs(tankakudo - chokakudo);

    if (kakudo == 180) {
        result = A + B;
        cout << fixed << setprecision(20) << result << endl;
        return 0;
    }
    else if (kakudo >= 180) {
        kakudo = 360 - kakudo;
    }

    radians = kakudo * PI / 180;
    temp = pow(A,2) + pow(B,2) - (2*A*B*cos(radians));

    result = sqrt(temp);

    cout << fixed << setprecision(20) << result << endl;

    return 0;
}

Compiler output:
a.cc:12:23: error: stray '\16' in program
   12 |     chokakudo = 6 * M;<U+000E>
      |                       ^~~~~~~~
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();
       double hena=tyoushin;
      double henb=tanshin;
      double kaku=toRadians(abs((jikan*30+30*hun/60)-hun*6));
      double kai=(sqrt(hena*hena+henb*henb+hena*henb*cos(kaku)));
}
}


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

#include <bits/stdc++.h>
#define REP(i, n) REPI(i, 0, n)
#define REPI(i, a, b) for (int i = (int)(a) ; i < (int)(b) ; i++)

#define SZ(x) ((int)(x).size())
#define pi 3.141592653589793


using ll = long long;
using ull = unsigned long long;
using namespace std;




int main()
{
    int A, B, H, M;
    cin >> A >> B >> H >> M;
    cout <<  << ":" << 30*H << endl;
    cout << sqrt(pow(A, 2.0) + pow(B, 2.0) - 2 * A * B * (cos((5.5 * M - 30 * H) * pi / 180))) << endl;



    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:14: error: expected primary-expression before '<<' token
   20 |     cout <<  << ":" << 30*H << endl;
      |              ^~
Language: Java


import java.util.*;

public class Colon {
    public static void main(final String[] args) {
        final Scanner sc = new Scanner(System.in);
        // 整数の入力
        // final int a = sc.nextInt();
        // 文字列の入力
        // final String s1 = sc.next();
        final double a = sc.nextInt();
        final double b = sc.nextInt();
        final double h = sc.nextInt();
        final double m = sc.nextInt();
        double h_deg = h * 360 / 12 + m * 360 / 12 / 60;
        double m_deg = m * 360 / 60;
        sc.close();
        double result = 0;
        result = Math.pow(
                (Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(Math.abs(h_deg - m_deg)))), 0.5);

        System.out.println(result);
    }
}

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

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

int main(void)
{
  long long int a,b,h,m;
  scanf("%lld %lld %lld %lld", &a, &b, &h, &m);
  long long double deg,c;
  deg = fabsl(30*h+0.5*m-6*m);
  if(deg>180){
    deg = 360-deg;
  }
  c=sqrtl(a*a+b*b-2*a*b*cosl(deg*3.14159265/180));
  printf("%17.11llf\n", c);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:13: error: both 'long long' and 'double' in declaration specifiers
    8 |   long long double deg,c;
      |             ^~~~~~
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: C

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

int main(void)
{
  int a, b, h, m;
  int time_m;
  double kakudo_m, kakudo_h, kakudo, len;
  
  scanf("%d%d%d%d", &a,&b,&h,&m);
  time_m = h * 60 + m;
  kakudo_m = (time_m　% 360) * 6;
  kakudo_h = (time_m * 360) / (12 * 60);
  kakudo = (double)(fabs(kakudo_h - kakudo_m));
  if (kakudo > 180)
    kakudo = 360 - kakudo;
  kakudo = (kakudo * M_PI) / 360;
  len =　sqrt(h * h + m * m - 2 * h * m * cos(kakudo));
  printf("%lf", len);
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:12:21: error: stray '\343' in program
   12 |   kakudo_m = (time_m<U+3000>% 360) * 6;
      |                     ^~~~~~~~
main.c:18:8: error: stray '\343' in program
   18 |   len =<U+3000>sqrt(h * h + m * m - 2 * h * m * cos(kakudo));
      |        ^~~~~~~~
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int h = sc.nextInt();
    int m = sc.nextInt();
    
    int angH = 30*h;
    int angM = 6*m;
    int ang = Math.abs(angH - angM);
    double c = 0;
    c = a*a + b*b - 2*a*b*Math.cos(ang);
    System.out.print(c);
  }
}
r

Compiler output:
Main.java:18: error: reached end of file while parsing
r
^
1 error