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

#include<iostream>
#include<utility>
#include<cstdlib>

typedef std::pair<double, int> P;

const int INF = 1 << 30;

int n;

int main()
{
	while( std::cin >> n, n )
	{
		P ans( INF, INF );
		
		while( n-- )
		{
			int i; 
			double h, w;
			std::cin >> i >> h >> w;
			h /= 100.0;
			ans = std::min( ans, P( fabs( w / ( h * h ) - 22.0 ), i ) );
		}

		std::cout << ans.second << std::endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:49: error: 'fabs' was not declared in this scope; did you mean 'labs'?
   23 |                         ans = std::min( ans, P( fabs( w / ( h * h ) - 22.0 ), i ) );
      |                                                 ^~~~
      |                                                 labs
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		
		while(true){
			int baggageNum = stdIn.nextInt();
			if(baggageNum = 0)break;
			int cost = 0;
			for(int i=0;i < baggageNum;i++){
				int w,size = 0;
				for(int i=0;i<3;i++)size += stdIn.nextInt();
				w = stdIn.nextInt();
				if(size <= 60 || w <= 2){
					cost += 600;
				}else if(size <= 80 || w <= 5){
					cost += 800;
				}else if(size <= 100 || w <= 10){
					cost += 1000;
				}else if(size <= 120 || w <= 15){
					cost += 1200;
				}else if(size <= 140 || w <= 20){
					cost += 1400;
				}else if(size <= 160 || w <= 25){
					cost += 1600;
				}
			}
			System.out.println(cost);
		}
		}
	}
}

Compiler output:
Main.java:33: error: class, interface, enum, or record expected
}
^
1 error
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		
		while(true){
			int baggageNum = stdIn.nextInt();
			if(baggageNum = 0)break;
			int cost = 0;
			for(int i=0;i < baggageNum;i++){
				int size = 0;
				for(int i=0;i<3;i++)size += stdIn.nextInt();
				int w = stdIn.nextInt();
				if(size <= 60 || w <= 2){
					cost += 600;
				}else if(size <= 80 || w <= 5){
					cost += 800;
				}else if(size <= 100 || w <= 10){
					cost += 1000;
				}else if(size <= 120 || w <= 15){
					cost += 1200;
				}else if(size <= 140 || w <= 20){
					cost += 1400;
				}else if(size <= 160 || w <= 25){
					cost += 1600;
				}
			}
			System.out.println(cost);
		}
	}
}

Compiler output:
Main.java:9: error: incompatible types: int cannot be converted to boolean
			if(baggageNum = 0)break;
			              ^
Main.java:13: error: variable i is already defined in method main(String[])
				for(int i=0;i<3;i++)size += stdIn.nextInt();
				        ^
2 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner stdIn = new Scanner(System.in);
		
		while(true){
			int baggageNum = stdIn.nextInt();
			if(baggageNum == 0)break;
			int cost = 0;
			for(int i=0;i < baggageNum;i++){
				int size = 0;
				for(int i=0;i<3;i++)size += stdIn.nextInt();
				int w = stdIn.nextInt();
				if(size <= 60 || w <= 2){
					cost += 600;
				}else if(size <= 80 || w <= 5){
					cost += 800;
				}else if(size <= 100 || w <= 10){
					cost += 1000;
				}else if(size <= 120 || w <= 15){
					cost += 1200;
				}else if(size <= 140 || w <= 20){
					cost += 1400;
				}else if(size <= 160 || w <= 25){
					cost += 1600;
				}
			}
			System.out.println(cost);
		}
	}
}

Compiler output:
Main.java:13: error: variable i is already defined in method main(String[])
				for(int i=0;i<3;i++)size += stdIn.nextInt();
				        ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Map.Entry;
import java.util.StringTokenizer;
import java.util.TreeMap;

/**
 * Delivery Fee
 */
public class Main {

	static P0160 main = new P0160();
	static TreeMap<Parcel, Integer> fee = new TreeMap<Parcel, Integer>() {
		{
			put(main.new Parcel(60, 2), 600);
			put(main.new Parcel(80, 5), 800);
			put(main.new Parcel(100, 10), 1000);
			put(main.new Parcel(120, 15), 1200);
			put(main.new Parcel(140, 20), 1400);
			put(main.new Parcel(160, 25), 1600);
		}
	};

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = "";

		while (!(line = br.readLine()).equals("0")) {
			int n, sum = 0;
			n = Integer.parseInt(line);
			for (int i = 0; i < n; ++i) {
				Parcel p = main.new Parcel(br.readLine());
				Entry<Parcel, Integer> e;
				if ((e = fee.ceilingEntry(p)) != null) {
					sum += e.getValue();
				}
			}
			System.out.println(sum);
		}
	}

	class Parcel implements Comparable<Parcel> {
		int size, weight;

		Parcel(int size, int weight) {
			this.size = size;
			this.weight = weight;
		}

		Parcel(int x, int y, int h, int w) {
			this(x + y + h, w);
		}

		Parcel(String info) {
			StringTokenizer st = new StringTokenizer(info);
			int x, y, h, w;
			x = Integer.parseInt(st.nextToken());
			y = Integer.parseInt(st.nextToken());
			h = Integer.parseInt(st.nextToken());
			w = Integer.parseInt(st.nextToken());
			size = x + y + h;
			weight = w;
		}

		@Override
		public int compareTo(Parcel o) {
			int r1 = this.weight - o.weight;
			int r2 = this.size - o.size;
			if (r1 > 0 || r2 > 0) {
				return 1;
			} else {
				return 0;
			}
		}
	}
}

Compiler output:
Main.java:13: error: cannot find symbol
	static P0160 main = new P0160();
	       ^
  symbol:   class P0160
  location: class Main
Main.java:13: error: cannot find symbol
	static P0160 main = new P0160();
	                        ^
  symbol:   class P0160
  location: class Main
2 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Map.Entry;
import java.util.StringTokenizer;
import java.util.TreeMap;

/**
 * Delivery Fee
 */
public class Main {

	static P0160 main = new P0160();
	static TreeMap<Parcel, Integer> fee = new TreeMap<Parcel, Integer>() {
		{
			put(main.new Parcel(60, 2), 600);
			put(main.new Parcel(80, 5), 800);
			put(main.new Parcel(100, 10), 1000);
			put(main.new Parcel(120, 15), 1200);
			put(main.new Parcel(140, 20), 1400);
			put(main.new Parcel(160, 25), 1600);
		}
	};

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = "";

		while (!(line = br.readLine()).equals("0")) {
			int n, sum = 0;
			n = Integer.parseInt(line);
			for (int i = 0; i < n; ++i) {
				Parcel p = main.new Parcel(br.readLine());
				Entry<Parcel, Integer> e;
				if ((e = fee.ceilingEntry(p)) != null) {
					sum += e.getValue();
				}
			}
			System.out.println(sum);
		}
	}

	class Parcel implements Comparable<Parcel> {
		int size, weight;

		Parcel(int size, int weight) {
			this.size = size;
			this.weight = weight;
		}

		Parcel(int x, int y, int h, int w) {
			this(x + y + h, w);
		}

		Parcel(String info) {
			StringTokenizer st = new StringTokenizer(info);
			int x, y, h, w;
			x = Integer.parseInt(st.nextToken());
			y = Integer.parseInt(st.nextToken());
			h = Integer.parseInt(st.nextToken());
			w = Integer.parseInt(st.nextToken());
			size = x + y + h;
			weight = w;
		}

		@Override
		public int compareTo(Parcel o) {
			int r1 = this.weight - o.weight;
			int r2 = this.size - o.size;
			if (r1 > 0 || r2 > 0) {
				return 1;
			} else if (r1 == 0 && r2 == 0) {
				return 0;
			} else {
				return -1;
			}
		}
	}
}

Compiler output:
Main.java:13: error: cannot find symbol
	static P0160 main = new P0160();
	       ^
  symbol:   class P0160
  location: class Main
Main.java:13: error: cannot find symbol
	static P0160 main = new P0160();
	                        ^
  symbol:   class P0160
  location: class Main
2 errors
Language: C

include <stdio.h>
int main(void)
{
  int n,x,y,h,w,i,size,sum;
  while(scanf("%d",&n),n){
    sum=0;
    for(i=0;i<n;i++){
      scanf("%d %d %d %d",&x,&y,&h,&w);
      size=x+y+h;
      if(size<=60&&w<=2)sum+=600;
      else if(size<=80&&w<=5)sum+=800;
      else if(size<=100&&w<=10)sum+=1000;
      else if(size<=120&&w<=15)sum+=1200;
      else if(size<=140&&w<=20)sum+=1400;
      else if(size<=160&&w<=25)sum+=1600;
    }
    printf("%d\n",sum);
  }
  return 0;
}
    

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C++

#include<stdio.h>

int main(){

int n;

while(1){

scanf("%d",&n);if(n==0)break;

int x,y,h,w;
int S=0;
for(int i=0;i<n;i++)
{
scanf("%d %d %d %d",&x,&y,&h,&w);
int s=x+y+h;
int T1=0,T2=0;

if(s<=60)T1=1;
else if(s<=80)T1=2;
else if(s<=100)T1=3;
else if(s<=120)T1=4;
else if(s<=140)T1=5;
else if(s<=160)T1=6;
else if(s>160)T1=10;

if(w<=2)T2=1;
else if(w<=5)T2=2;
else if(w<=10)T2=3;
else if(w<=15)T2=4;
else if(w<=20)T2=5;
else if(w<=25)T2=6;
else if(w>25)T2=10;


if(T1<T2)T1=T2;

int p=0;
switch(T1){
case:1
p=600;break;

case:2
p=800;break;

case:3
p=1000;break;

case:4
p=1200;break;
case:5
p=1400;break;
case:6
p=1600;break;
case:10
p=0;break;
}
S+=p;
}
printf("%d\n",S);

}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:5: error: expected primary-expression before ':' token
   40 | case:1
      |     ^
a.cc:40:7: error: expected ';' before 'p'
   40 | case:1
      |       ^
      |       ;
   41 | p=600;break;
      | ~      
a.cc:43:5: error: expected primary-expression before ':' token
   43 | case:2
      |     ^
a.cc:43:7: error: expected ';' before 'p'
   43 | case:2
      |       ^
      |       ;
   44 | p=800;break;
      | ~      
a.cc:46:5: error: expected primary-expression before ':' token
   46 | case:3
      |     ^
a.cc:46:7: error: expected ';' before 'p'
   46 | case:3
      |       ^
      |       ;
   47 | p=1000;break;
      | ~      
a.cc:49:5: error: expected primary-expression before ':' token
   49 | case:4
      |     ^
a.cc:49:7: error: expected ';' before 'p'
   49 | case:4
      |       ^
      |       ;
   50 | p=1200;break;
      | ~      
a.cc:51:5: error: expected primary-expression before ':' token
   51 | case:5
      |     ^
a.cc:51:7: error: expected ';' before 'p'
   51 | case:5
      |       ^
      |       ;
   52 | p=1400;break;
      | ~      
a.cc:53:5: error: expected primary-expression before ':' token
   53 | case:6
      |     ^
a.cc:53:7: error: expected ';' before 'p'
   53 | case:6
      |       ^
      |       ;
   54 | p=1600;break;
      | ~      
a.cc:55:5: error: expected primary-expression before ':' token
   55 | case:10
      |     ^
a.cc:55:8: error: expected ';' before 'p'
   55 | case:10
      |        ^
      |        ;
   56 | p=0;break;
      | ~
Language: C++

#include <bits/stdc++.h>
#define r(i,a,n) for(i=a;i<n;i++)
#define R(i,a,n) for(int i=a;i>=n;i--)
using namespace std;
int main(){
	long int n,a,b,c,s,w;
	while(cin>>n,n){
		long int p=0;
		r(i,0,n){
		cin>>a>>b>>c>>w;
		s=a+b+c;
		if(s<=60&&w<=2)p+=600;
		else if(s<=80&&w<=5)p+=800;
		else if(s<=120&&w<=15)p+=1200;
		else if(s<=140&&w<=20)p+=1400;
		else if(s<=160&&w<=25)p+=1600;
	    }
	    cout<<p<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: 'i' was not declared in this scope
    9 |                 r(i,0,n){
      |                   ^
a.cc:2:22: note: in definition of macro 'r'
    2 | #define r(i,a,n) for(i=a;i<n;i++)
      |                      ^
Language: C++

#include <bits/stdc++.h>
#define r(i,a,n) for(i=a;i<n;++i)
#define R(i,a,n) for(int i=a;i>=n;i--)
using namespace std;
int main(){
	long int n,a,b,c,s,w;
	while(cin>>n,n){
		long int p=0;
		r(i,0,n){
		cin>>a>>b>>c>>w;
		s=a+b+c;
		if(s<=60&&w<=2)p+=600;
		else if(s<=80&&w<=5)p+=800;
		else if(s<=120&&w<=15)p+=1200;
		else if(s<=140&&w<=20)p+=1400;
		else if(s<=160&&w<=25)p+=1600;
	    }
	    cout<<p<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: 'i' was not declared in this scope
    9 |                 r(i,0,n){
      |                   ^
a.cc:2:22: note: in definition of macro 'r'
    2 | #define r(i,a,n) for(i=a;i<n;++i)
      |                      ^
Language: C++

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

int main(){
  int i,j,k,l,m,n,x,y,h,w,sum;
  int ans;
 

  
  while(1){
    ans=0;
    sum=0;
    cin >> n;
    if(n == 0)break;

    for(i=0;i<n;i++){
      cin >> x >> y >> h >> w;
      sum = x + y + h;
      if(w<=2){
	if(sum<=60)ans+=600;
	else if(sum<=80)ans+=800;
	else if(sum<=100)ans+=1000;
	else if(sum<=120)ans+=1200;
	else if(sum<=140)ans+=1400;
	else if(sum<=160)ans+=1600;
	else ans+=0;
      }
      else if(w<=5){
        if(sum<=80)ans+=800;
	else if(sum<=100)ans+=1000;
	else if(sum<=120)ans+=1200;
	else if(sum<=140)ans+=1400;
	else if(sum<=160)ans+=1600;
	else ans+=0;
      }
      else if(w<=10){
	 if(sum<=100)ans+=1000;
	else if(sum<=120)ans+=1200;
	else if(sum<=140)ans+=1400;
	else if(sum<=160)ans+=1600;
	else ans+=0;
      }
 else if(w<=15){
	
	 if(sum<=120)ans+=1200;
	else if(sum<=140)ans+=1400;
	else if(sum<=160)ans+=1600;
	else ans+=0;
      }
 else if(w<=20){

	
	 if(sum<=140)ans+=1400;
	else if(sum<=160)ans+=1600;
	else ans+=0;
      }
 else if(w<=25){



	if(sum<=160)ans+=1600;
	else ans+=0;
      }




    }
    cout << ans << endl;



  }

Compiler output:
a.cc: In function 'int main()':
a.cc:74:4: error: expected '}' at end of input
   74 |   }
      |    ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<stdio.h>

int mian(void){
	int x,y,z,w,n,i;
	int sum,l;

	while(scanf("%d",&n)!=0){
		sum=0;
		for(i=0;i<n,i++){
		  scanf("%d %d %d %d",&x,&y,&z,&w);
		  l=x+y+z;
		  if(l<=60 && w<=2) sum+=600;
		  else if(l<=80 && w<=5) sum+=800;
		  else if(l<=100 && w<=10) sum+=1000;
		  else if(l<=120 && w<=15) sum+=1200;
		  else if(l<=140 && w<=20) sum+=1400;
		  else if(l<=160 && w<=25) sum+=1600;
		}
		printf("%d\n",sum);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int mian()':
a.cc:9:32: error: expected ';' before ')' token
    9 |                 for(i=0;i<n,i++){
      |                                ^
      |                                ;
Language: C++

#include<stdio.h>

int mian(void){
	int x,y,z,w,n,i;
	int sum,l;

	while(scanf("%d",&n)!=0){
		sum=0;
		for(i=0;i<n;i++){
		  scanf("%d %d %d %d",&x,&y,&z,&w);
		  l=x+y+z;
		  if(l<=60 && w<=2) sum+=600;
		  else if(l<=80 && w<=5) sum+=800;
		  else if(l<=100 && w<=10) sum+=1000;
		  else if(l<=120 && w<=15) sum+=1200;
		  else if(l<=140 && w<=20) sum+=1400;
		  else if(l<=160 && w<=25) sum+=1600;
		}
		printf("%d\n",sum);
	}
	return 0;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: Java

import java.util.*;
public class SportMeet {
	static Scanner sc = new Scanner(System.in);
	static int team_number, minutes, seconds;
	static Map<Integer, Integer>map = new HashMap<Integer, Integer>();
	public static void main(String[] args) {
		while(read()){
			slove();
			map.clear();
		}

	}
	static boolean read(){
		team_number = sc.nextInt();
		if(team_number == 0)return false;

		for(int i = 0; i < team_number; i++){
			int index = sc.nextInt();
			int sum = 0;
			for(int j = 0; j < 4; j++){
				minutes = sc.nextInt();
				seconds = sc.nextInt();
				sum += minutes*60 + seconds;
			}
			map.put(index, sum);
		}
		return true;
	}
	static void slove(){
		int score = Integer.MAX_VALUE;
		int res = 0;
		for(int i = 1; i <= 1000000; i++){
			if(map.containsKey(i)){
				if(score > map.get(i)){
					score = map.get(i);
					res = i;
				}
			}
		}

		System.out.println(res);
		map.remove(res);

		score = Integer.MAX_VALUE;
		res = 0;
		for(int i = 1; i <= 1000000; i++){
			if(map.containsKey(i)){
				if(score > map.get(i)){
					score = map.get(i);
					res = i;
				}
			}
		}
		System.out.println(res);

		score = Integer.MIN_VALUE;
		res = 0;
		for(int i = 1; i <= 1000000; i++){
			if(map.containsKey(i)){
				if(score < map.get(i)){
					score = map.get(i);
					res = i;
				}
			}
		}
		map.remove(res);

		score = Integer.MIN_VALUE;
		res = 0;
		for(int i = 1; i <= 1000000; i++){
			if(map.containsKey(i)){
				if(score < map.get(i)){
					score = map.get(i);
					res = i;
				}
			}
		}
		System.out.println(res);
	}
}

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

#include<stdio.h>
int main (void)
{
int a,i,k,temp;
int s[][9]={};
int sec[1000000]={};
int min[1000000]={};
int sumsec[1000000]={}
int sumsec2[1000000]={};

scanf("%d",&a);

do{
for(i=0,i<a;i++)
for(k=0,k<9,k++)
scanf("%d",s[i][k]);

for(i=0,i<a;i++)
sec[i]=s[i][2]+s[i][4]+s[i][6]+s[i][8];
min[i]=(s[i][1]+s[i][3]+s[i][5]+s[i][7])*60;
sumsec[i]=sec[i]+min[i];
sumsec2[i]=sumsec[i];
}

for(i=0;i<a-1;i++)
for(k=0;k<a-1;k++)
if(sumsec[k]>sumsec[k+1]){
temp=sumsec[k];
sumsec[k]=sumsec[k+1];
sumsec[k+1]=temp;

int num[3]={};
int p=0;
for(i=0;i<3;i++)
for(j=0;j<a;j++){
if(sumsec2[j]==sumsec[i]){
num[p]=j;
p++;
}}

for(i=0;i<3;i++)
printf("%d\n",s[num[i]][0]);
scanf("%d",&a);
}while(a!=0);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:1: error: expected ',' or ';' before 'int'
    9 | int sumsec2[1000000]={};
      | ^~~
main.c:14:16: error: expected ';' before ')' token
   14 | for(i=0,i<a;i++)
      |                ^
      |                ;
main.c:15:16: error: expected ';' before ')' token
   15 | for(k=0,k<9,k++)
      |                ^
      |                ;
main.c:15:16: error: expected expression before ')' token
main.c:18:16: error: expected ';' before ')' token
   18 | for(i=0,i<a;i++)
      |                ^
      |                ;
main.c:22:1: error: 'sumsec2' undeclared (first use in this function); did you mean 'sumsec'?
   22 | sumsec2[i]=sumsec[i];
      | ^~~~~~~
      | sumsec
main.c:22:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:1: error: expected 'while' before 'for'
   25 | for(i=0;i<a-1;i++)
      | ^~~
main.c:25:18: error: expected ';' before ')' token
   25 | for(i=0;i<a-1;i++)
      |                  ^
      |                  ;
main.c:25:18: error: expected statement before ')' token
main.c:35:5: error: 'j' undeclared (first use in this function)
   35 | for(j=0;j<a;j++){
      |     ^
Language: C

#include<stdio.h>
int main (void)
{
int a,i,k,j,temp;
int s[][9]={};
int sec[1000000]={};
int min[1000000]={};
int sumsec[1000000]={};
int sumsec2[1000000]={};
 
scanf("%d",&a);
 
do{
for(i=0;<a;i++)
for(k=0;k<9;k++)
scanf("%d",s[i][k]);
 
for(i=0;i<a;i++)
sec[i]=s[i][2]+s[i][4]+s[i][6]+s[i][8];
min[i]=(s[i][1]+s[i][3]+s[i][5]+s[i][7])*60;
sumsec[i]=sec[i]+min[i];
sumsec2[i]=sumsec[i];
}
 
for(i=0;i<a-1;i++)
for(k=0;k<a-1;k++)
if(sumsec[k]>sumsec[k+1]){
temp=sumsec[k];
sumsec[k]=sumsec[k+1];
sumsec[k+1]=temp;
 
int num[3]={};
int p=0;
for(i=0;i<3;i++)
for(j=0;j<a;j++){
if(sumsec2[j]==sumsec[i]){
num[p]=j;
p++;
}}
 
for(i=0;i<3;i++)
printf("%d\n",s[num[i]][0]);
scanf("%d",&a);
}while(a!=0);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:9: error: expected expression before '<' token
   14 | for(i=0;<a;i++)
      |         ^
main.c:25:1: error: expected 'while' before 'for'
   25 | for(i=0;i<a-1;i++)
      | ^~~
main.c:25:18: error: expected ';' before ')' token
   25 | for(i=0;i<a-1;i++)
      |                  ^
      |                  ;
main.c:25:18: error: expected statement before ')' token
Language: C

#include<stdio.h>
int main (void)
{
int a,i,k,j,temp;
int s[][9]={};
int sec[1000000]={};
int min[1000000]={};
int sumsec[1000000]={};
int sumsec2[1000000]={};
 
scanf("%d",&a);
 
do{
for(i=0;<a;i++)
for(k=0;k<9;k++)
scanf("%d",s[i][k]);
 
for(i=0;i<a;i++){
sec[i]=s[i][2]+s[i][4]+s[i][6]+s[i][8];
min[i]=(s[i][1]+s[i][3]+s[i][5]+s[i][7])*60;
sumsec[i]=sec[i]+min[i];
sumsec2[i]=sumsec[i];
}
 
for(i=0;i<a-1;i++)
for(k=0;k<a-1;k++)
if(sumsec[k]>sumsec[k+1]){
temp=sumsec[k];
sumsec[k]=sumsec[k+1];
sumsec[k+1]=temp;
}
 
int num[3]={};
int p=0;
for(i=0;i<3;i++)
for(j=0;j<a;j++){
if(sumsec2[j]==sumsec[i]){
num[p]=j;
p++;
}}
 
for(i=0;i<3;i++)
printf("%d\n",s[num[i]][0]);
scanf("%d",&a);
}while(a!=0);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:9: error: expected expression before '<' token
   14 | for(i=0;<a;i++)
      |         ^
Language: C

#define _CRT_SECURE_NO_WARNINGS
//#define _USE_MATH_DEFINES
#include<stdio.h>
#include<stdlib.h>
//#include<math.h>
#include<string.h>
#include "Source.h"
//#include<time.h>
#define P(type,x) fprintf(stdout,"%"#type"\n",x)
typedef struct {
	int num,
		t;
}SPORT;
void sort(int, SPORT[]);
int main() {
	int n, m, s, i, j;
	SPORT d[100000];
	for (; ~fscanf(stdin, "%d", &n), n;P(d, d[0].num),P(d, d[1].num),P(d, d[n - 2].num)) {
		for (i = 0; i < n; i++) {
			fscanf(stdin, "%d", &d[i].num);
			j = 3;
			fscanf(stdin, "%d%d", &m, &s);
			d[i].t = m * 60 + s;
			while(j--) fscanf(stdin, "%d%d", &m, &s),d[i].t += m * 60 + s;
		}
		sort(n, d);
		
	}

	return 0;
}

void sort(int n, SPORT d[]){
	int i,j;
	SPORT tmp;
	for (i = 0; i < n - 1; i++)
		for (j = i + 1; j < n; j++)
			if (d[i].t > d[j].t) tmp = d[i], d[i] = d[j], d[j] = tmp;
}

Compiler output:
main.c:7:10: fatal error: Source.h: No such file or directory
    7 | #include "Source.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C

/*
現状さっぱりわからない。
*/

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

struct TEAM
{
	int c1;
	int m1;
	int s1;
	int m2;
	int s2;
	int m3;
	int s3;
	int m4;
	int s4;
	int time;
};
typedef struct TEAM team;

void sort00(team data[], int n);
int minindex00(team data[], int from, int to);

int main()
{
	int n[100];
	team data[100];
	int output[300];
	int i=0;
	int k=0;
	int sp=0;
	while(1){
		scanf("%d",&n[i]);
		if(n[i]==0){
			break;
		}
		for(k=0; k<n[i]; k++){
			scanf("%d %d %d %d %d %d %d %d %d",&data[k].c1, &data[k].m1, &data[k].s1, &data[k].m2, &data[k].s2, &data[k].m3, &data[k].s3, &data[k].m4, &data[k].s4);
			data[k].time=((data[k].m1+data[k].m2+data[k].m3+data[k].m4)*60)+(data[k].s1+data[k].s2+data[k].s3+data[k].s4);
		}
		sort00(data, n[i]);
		output[sp]=data[0];
		sp++;
		output[sp]=data[1];
		sp++;
		output[sp]=data[n[i]-2];
		sp++;
		i++;
	}
	for(i=0; i<sp; i++){
		printf("%d\n", output[i]);
	}
	return 0;
}

void sort00(team data[],int n)
{
	int i,minindex;
	team work;
	for(i=0;i<n;i++){
		minindex=minindex00(data,i,n);
		work=data[i];
		data[i]=data[minindex];
		data[minindex]=work;
	}
	return;
}

int minindex00(team data[], int from, int to)
{
	int i;
	int result=from;
	for(i=from;i<to;i++){
		if(data[result].time>data[i].time){
			result=i;
		}
	}
	return result;
}

Compiler output:
main.c: In function 'main':
main.c:44:28: error: incompatible types when assigning to type 'int' from type 'team' {aka 'struct TEAM'}
   44 |                 output[sp]=data[0];
      |                            ^~~~
main.c:46:28: error: incompatible types when assigning to type 'int' from type 'team' {aka 'struct TEAM'}
   46 |                 output[sp]=data[1];
      |                            ^~~~
main.c:48:28: error: incompatible types when assigning to type 'int' from type 'team' {aka 'struct TEAM'}
   48 |                 output[sp]=data[n[i]-2];
      |                            ^~~~
Language: C++

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

using namespace std;

int main()
{
	int n;
	while (cin >> n, n){
		vector<pair<int, int> > vp;
		for (int i = 0; i < n; i++){
			int id;
			cin >> id;
			int score = 0;
			for (int i = 0; i < 3; i++){
				int m, s;
				cin >> m >> s;
				score += m * 60 + s;
			}
			vp.push_back(make_pair(score, id));
		}
		sort(vp.begin(), vp.end());
		printf("%d\n%d\n%d\n", vp[0].second, vp[1].second, v[n - 2].second);
	}
	return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:68: error: 'v' was not declared in this scope; did you mean 'vp'?
   25 |                 printf("%d\n%d\n%d\n", vp[0].second, vp[1].second, v[n - 2].second);
      |                                                                    ^
      |                                                                    vp
Language: C++

#include<iostream>

using namespace std;



int main(){
	int win[2]={},semiwin[2]={},dobe[2]={},semidobe[2]={},jointeams,team,i,j,total,firstteam[4]={},firsttotal[4]={};



	cin >> jointeams;


	

	for(i=0;i<=3;i++){
		cin >> firstteam[i];

		for(j=1;j<=4;j++){
			cin >> temp;
			firsttotal[i] += temp*60;
			cin >> temp;
			firsttotal[i] += temp;
		}
	}

	for(i=2;i!=0;i--){
		for(j=0;j<=i;j++){
			if(firsttotal[j] > firsttotal[j+1]){
				temp = firsttotal[j];
				firsttotal[j] = firsttotal[j+1];
				firsttotal[j+1] = temp;
				temp = firstteam[j];
				firstteam[j] = firstteam[j+1];
				firstteam[j+1] = temp;
			}
		}
	}

		













	for(i=5;i<=jointeams;i++){
		total = 0;
		cin >> team
		for(j=1;j<=4;j++){
			cin >> temp;
			total = total + temp*60;
			cin >> temp;
			total = total + temp;
		}
		if(total>win[1]){
			semiwin[0] = win[0];
			semiwin[1] = win[1];
			win[0] = team;
			win[1] = total;

		}else(total>semiwin[1]){
			semiwin[0] = team;
			semiwin[1] = total;

		}else(total<dobe[1]){
			semidobe[0] = dobe[0];
			semidobe[1] = dobe[1];
			dobe[0] = team;
			dobe[1] = total;

		}else(total<semidobe[1]){
			semidobe[0] = team;
			semidobe[1] = total;
		}


	}

	cout << win[0] << endl;

	cout << semiwin[0] << endl;
	
	cout << dobe[0] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:32: error: 'temp' was not declared in this scope
   21 |                         cin >> temp;
      |                                ^~~~
a.cc:31:33: error: 'temp' was not declared in this scope
   31 |                                 temp = firsttotal[j];
      |                                 ^~~~
a.cc:57:28: error: expected ';' before 'for'
   57 |                 cin >> team
      |                            ^
      |                            ;
   58 |                 for(j=1;j<=4;j++){
      |                 ~~~         
a.cc:58:33: error: expected ';' before ')' token
   58 |                 for(j=1;j<=4;j++){
      |                                 ^
      |                                 ;
a.cc:70:40: error: expected ';' before '{' token
   70 |                 }else(total>semiwin[1]){
      |                                        ^
      |                                        ;
a.cc:74:18: error: 'else' without a previous 'if'
   74 |                 }else(total<dobe[1]){
      |                  ^~~~
a.cc:74:37: error: expected ';' before '{' token
   74 |                 }else(total<dobe[1]){
      |                                     ^
      |                                     ;
a.cc:80:18: error: 'else' without a previous 'if'
   80 |                 }else(total<semidobe[1]){
      |                  ^~~~
a.cc:80:41: error: expected ';' before '{' token
   80 |                 }else(total<semidobe[1]){
      |                                         ^
      |                                         ;
Language: C++

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


struct SKE{int c1;int m1;int s1;int m2;int s2;int m3;int s3;int m4;int s4;int SUM;};
struct SKE NUM[1000001];
int main (){
int N;
SKE Te,M1,M2,M3,M;
while(1){
cin>>N;if(N==0)break;
for(int i=0;i<N;i++){
	cin>>NUM[i].c1>>NUM[i].m1>>NUM[i].s1>>NUM[i].m2>>NUM[i].s2>>NUM[i].m3>>NUM[i].s3>>NUM[i].m4>>NUM[i].s4;
	NUM[i].SUM=NUM[i].s1+NUM[i].s2+NUM[i].s3+NUM[i].s4+60*(NUM[i].m1+NUM[i].m2+NUM[i].m3+NUM[i].m4);
}

M1=NUM[0];M2=NUM[0];M=NUM[0];M3=NUM[0];
for(int i=1;i<N;i++){
	if(NUM[i].SUM<M1.SUM){M2=M1;M1=NUM[i];}
	else if(NUM[i].SUM<M2.SUM){M2=NUM[i];}
	if(NUM[i].SUM>M.SUM){M3=M;M=NUM[i];}
	else if(NUM[i].SUM>M3.SUM){M3=NUM[i];}

	
for(int i=0;i<N;i++){

}
cout<<M1.c1<<endl<<M2.c1<<endl<<M3.c1<<endl;
for(int i=0;i<N;i++)
{NUM[i].c1=0;NUM[i].m1=0;NUM[i].s1=0;NUM[i].m2=0;NUM[i].s2=0;NUM[i].m3=0;NUM[i].s3=0;NUM[i].m4=0;NUM[i].s4=0;}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:2: error: expected '}' at end of input
   34 | }
      |  ^
a.cc:8:12: note: to match this '{'
    8 | int main (){
      |            ^
Language: C++

#include <iostream>
#include <map>
#include <vector>
using namespace std;

typedef pair<int, int> pii;

bool cmp(pii lhs, pii rhs)
{
	return (lhs.second < rhs.second);
}

int main()
{
	int n;
	
	while (cin >> n, n){
		vector <pii> p(n);
		
		for (int i = 0; i < n; i++){
			int num, t = 0;
			cin >> num;
			for (int j = 0; j < 4; j++){
				int m, s;
				cin >> m >> s;
				t += m * 60 + s;
			}
			p[i] = make_pair(num, t);
		}
		
		sort(p.begin(), p.end(), cmp);
		
		cout << p[0].first << endl << p[1].first << endl << p[n - 2].first << endl;
	}
	
	return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:17: error: 'sort' was not declared in this scope; did you mean 'short'?
   31 |                 sort(p.begin(), p.end(), cmp);
      |                 ^~~~
      |                 short
Language: C++

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

#define rep(i,j) REP((i), 0, (j))
#define REP(i,j,k) for(int i=(j);(i)<(k);++i)
#define BW(a,x,b) ((a)<=(x)&&(x)<=(b))
#define MP(a, b) make_pair(a, b)
#define F first
#define S second
#define INF 1 << 30

typedef pair<int, int> pi;
typedef pair<int, pi> pii;
typedef vector<int> vi;
typedef queue<int> qi;
typedef long long ll;

int n, m;
vector<pi> s;
int dp[1024];
int main() {
	int nn;
	while ((cin >> nn) && nn) {
		s.clear();
		for (int i = 0; i < nn; ++i) {
			int  a, b, c, d, e, f, g, h,iiii;
			cin >> a >> b >> c >> d >> e >> f >> g >> h>>iiii;
			s.push_back(make_pair(b*60+c+d*60+e+f*60+g+h*60+iiii,a));
		}
		sort(s.begin(),s.end());
		cout<<s[0].second<<endl;
		cout<<s[1].second<<endl;
		cout<<s[nn-2].second<<endl;
	}
	return 0;

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

M(int*a){return*a-*1[&a];}n,T[9999][2];j,m,s;main(i){for(;~scanf("%d",&n);qsort(T,n,8,M),n&&printf("%d\n%d\n%d\n",1[*T],T[1][1],T[n-2][1]))for(i=n;i--;)for(scanf("%d",T[i]+1),*T[i]=0,j=4;j--;*T[i]+=m*60+s)scanf("%d%d",&m,&s);}

Compiler output:
a.cc:1:1: error: ISO C++ forbids declaration of 'M' with no type [-fpermissive]
    1 | M(int*a){return*a-*1[&a];}n,T[9999][2];j,m,s;main(i){for(;~scanf("%d",&n);qsort(T,n,8,M),n&&printf("%d\n%d\n%d\n",1[*T],T[1][1],T[n-2][1]))for(i=n;i--;)for(scanf("%d",T[i]+1),*T[i]=0,j=4;j--;*T[i]+=m*60+s)scanf("%d%d",&m,&s);}
      | ^
a.cc:1:27: error: 'n' does not name a type
    1 | M(int*a){return*a-*1[&a];}n,T[9999][2];j,m,s;main(i){for(;~scanf("%d",&n);qsort(T,n,8,M),n&&printf("%d\n%d\n%d\n",1[*T],T[1][1],T[n-2][1]))for(i=n;i--;)for(scanf("%d",T[i]+1),*T[i]=0,j=4;j--;*T[i]+=m*60+s)scanf("%d%d",&m,&s);}
      |                           ^
a.cc:1:40: error: 'j' does not name a type
    1 | M(int*a){return*a-*1[&a];}n,T[9999][2];j,m,s;main(i){for(;~scanf("%d",&n);qsort(T,n,8,M),n&&printf("%d\n%d\n%d\n",1[*T],T[1][1],T[n-2][1]))for(i=n;i--;)for(scanf("%d",T[i]+1),*T[i]=0,j=4;j--;*T[i]+=m*60+s)scanf("%d%d",&m,&s);}
      |                                        ^
a.cc:1:50: error: expected constructor, destructor, or type conversion before '(' token
    1 | M(int*a){return*a-*1[&a];}n,T[9999][2];j,m,s;main(i){for(;~scanf("%d",&n);qsort(T,n,8,M),n&&printf("%d\n%d\n%d\n",1[*T],T[1][1],T[n-2][1]))for(i=n;i--;)for(scanf("%d",T[i]+1),*T[i]=0,j=4;j--;*T[i]+=m*60+s)scanf("%d%d",&m,&s);}
      |                                                  ^
Language: C++

#include <iostream>
#include <cstring>
#include <vector>
using namespace std;

typedef pair<int, int> P;

int n;
vector<P> ps;

int main()
{
    int c, m, s, sum;
    while(cin >> n && n) {
        ps.clear();
        for(int k = 0; k < n; k++) {
            cin >> c;
            sum = 0;
            for(int i = 0; i < 4; i++) {
                cin >> m >> s;
                sum += m * 60 + s;
            }
            ps.push_back(P(sum, c));
        }
        sort(ps.begin(), ps.end());
        
        cout << ps[0].second << endl;
        cout << ps[1].second << endl;
        cout << ps[ps.size() - 2].second << endl;

    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   25 |         sort(ps.begin(), ps.end());
      |         ^~~~
      |         short
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;

int main(){
  int h,n,i,j,num[1000][1000],sum[1000],xmax=0;

  while(1){
    xmax=0;
    cin >> n;
    for(i=0;i<n;i++){

      for(j=0;j<9;j++){
	cin >> num[i][j];

	if(j>0 && j%2 == 0){
	  sum[i]+=num[i][j];
	}
	else if(j>0 && j%2 != 0){
	  sum[i]+=(num[i][j]*60);
	}

      }

    }

    for(i=0;i<n;i++){
      xmax=i;
      for(j=i;j<n;j++){
	if(sum[xmax]<sum[j])xmax=j;
      }
      h=sum[xmax];
      sum[xmax]=sum[i];
      sum[i]=h;

      h=num[xmax][0];
      num[xmax][0]=num[i][0];
      num[i][0]=h;
    }

    /*
    for(i=0;i<n;i++){
	cout << "num["<<i<<"][0]="<<num[i][0];
	cout << "  sum["<<i<<"]="<<sum[i];
      cout << endl;
    }
    */

    cout<< num[n-1][0] << endl;
    cout << num[n-2][0] << endl;
    cout<< num[1][0] << endl;






  }

Compiler output:
a.cc: In function 'int main()':
a.cc:59:4: error: expected '}' at end of input
   59 |   }
      |    ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;
typedef pair<int,int> P;

vector<P> a;

int main() {
  int n,m,s,c1,m1,s1,m2,s2,m3,s3,m4,s4;
  while(cin >> n) {
    a.clear();
    if(n==0) break;
    for(int i=0;i<n;i++) {
      cin >> c1 >> m1 >> s1 >> m2 >> s2 >> m3 >> s3 >> m4 >> s4;
      m = m1+m2+m3+m4;
      s = s1+s2+s3+s4+m*60;
      P temp;
      temp.first = s;
      temp.second = c1;
      a.push_back(temp);
    }
    sort(a.begin(),a.end());
    cout << a[0].second << endl;
    cout << a[1].second << endl;
    cout << a[n-2].second << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   22 |     sort(a.begin(),a.end());
      |     ^~~~
      |     short
Language: C++

#include<iostream>
#include<cstdio>
#include<cmath>
#include<vector>
#include<string>
#include<queue>
#include<map>
#include<stack>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<sstream>

#define reps(i,f,n) for(int i = f; i < int(n); i++)
#define rep(i,n) reps(i,0,n)
#define PII pair<int,int>
#define PP pair< int,PII >
#define Sort(t) sort(t.begin(), t.end())

using namespace std;
typedef pair<int,int> PII;

priority_queue<PII,vector< PII > , greater< PII > > pq;

int main(void){
	int n;
	while(scanf("%d", &n),n){
		rep(i,n){
			int id;
			cin >> id;
			int sum = 0, x;
			rep(j,8){
				cin >> x;
				sum += j%2==0?x*60:x;
			}
			pq.push( pair<int,int>(sum,id));
		}
		/*
		while(!pq.empty()){
			printf("%d %d\n",pq.top().first, pq.top().second);
			pq.pop();
		}*/
		printf("%d\n", pq.top().second);pq.pop();
		printf("%d\n", pq.top().second);pq.pop();
		while(pq.size() > 2)pq.pop();
		printf("%d\n", pq.top().second);pq.pop();
		pq.pop();
	}
	
	return 0;
}

Compiler output:
a.cc:21:26: error: invalid declarator before ';' token
   21 | typedef pair<int,int> PII;
      |                          ^
Language: C++

#include <iostream>
#include <vector>
#include <utility>
using namespace std;

int main()
{
	int a, time, number, m1, s1, m2, s2, m3, s3, m4, s4;
	vector<pair <int, int> > team;
	
	while(1)
	{
		cin >> a;
		if (a == 0)
		{
			break;
		}
		team.clear();
		for(int i = 0; i < a; i++)
		{
			cin >> number;
			cin >> m1 >> s1 >> m2 >> s2 >> m3 >> s3 >> m4 >> s4;
			time = m1 *60  + s1 + m2 * 60 + s2 + m3 * 60 + s3 + m4 * 60 + s4;
		
			team. push_back(make_pair(time, number));
		
		}
	
		sort(team.begin(), team.end());
	
		cout << team[0].second << endl;
		cout << team[1].second << endl;
		cout << team[a - 2].second << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:17: error: 'sort' was not declared in this scope; did you mean 'short'?
   29 |                 sort(team.begin(), team.end());
      |                 ^~~~
      |                 short
Language: C++

#include <iostream>
#include <vector>
#include <utility>
using namespace std;

int main()
{
	int a, time, number, m1, s1, m2, s2, m3, s3, m4, s4;
	vector<pair<int, int> > team;
	
	while(1)
	{
		cin >> a;
		if (a == 0)
		{
			break;
		}
		team.clear();
		for(int i = 0; i < a; i++)
		{
			cin >> number;
			cin >> m1 >> s1 >> m2 >> s2 >> m3 >> s3 >> m4 >> s4;
			time = m1 *60  + s1 + m2 * 60 + s2 + m3 * 60 + s3 + m4 * 60 + s4;
		
			team.push_back(make_pair(time, number));
		
		}
	
		sort(team.begin(), team.end());
	
		cout << team[0].second << endl;
		cout << team[1].second << endl;
		cout << team[a - 2].second << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:17: error: 'sort' was not declared in this scope; did you mean 'short'?
   29 |                 sort(team.begin(), team.end());
      |                 ^~~~
      |                 short
Language: C++

#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
#include <boost/bind.hpp>
using namespace std;

int main(){
    int n;
    while(cin >> n, n){
        typedef pair<int, int> value_type;
        vector<value_type> team;
        int c, m, s;
        for(int j=0; j < n; j++){
            cin >> c;
            team.push_back(pair<int, int>(c, 0));
            for(int i=0; i < 4; i++){
                cin>> m >> s;
                team[j].second += 60*m + s;
            }
        }
        sort(team.begin(), team.end(), bind(&value_type::second, _1) < bind(&value_type::second, _2));

        cout << team[0].first << endl;
        cout << team[1].first << endl;
        cout << team[team.size()-2].first;
        team.clear();
    }
}

Compiler output:
a.cc:5:10: fatal error: boost/bind.hpp: No such file or directory
    5 | #include <boost/bind.hpp>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
Language: Java

#include<iostream>
#include<math.h>
#include<vector>
#include<algorithm>
#include<cstdio>
#include <string>
#include <complex>
#include <functional>
using namespace std;
typedef pair<int,int> P;

int h[1000001];
int main(){
    h[1]=1;
    for(int i=2;i<=1000000;i*=2)h[i]=1;
    for(int i=1;i<=1000000;i++){
        if(h[i]){
            for(int j=i*3;j<=1000000;j*=3)if(h[j]==0)h[j]=2;
        }
    }
    for(int i=1;i<=1000000;i++){
        if(h[i]){
            for(int j=i*5;j<=1000000;j*=5)if(h[j]==0)h[j]=3;
        }
    }
    int a,b;
    while(scanf("%d",&a),a){
        scanf("%d",&b);
        int ret=0;
        for(int i=a;i<=b;i++)if(h[i])ret++;
        printf("%d\n",ret);
    }
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include<iostream>
^
Main.java:2: error: illegal character: '#'
#include<math.h>
^
Main.java:3: error: illegal character: '#'
#include<vector>
^
Main.java:4: error: illegal character: '#'
#include<algorithm>
^
Main.java:5: error: illegal character: '#'
#include<cstdio>
^
Main.java:6: error: illegal character: '#'
#include <string>
^
Main.java:7: error: illegal character: '#'
#include <complex>
^
Main.java:8: error: illegal character: '#'
#include <functional>
^
Main.java:10: error: class, interface, enum, or record expected
typedef pair<int,int> P;
^
Main.java:12: error: class, interface, enum, or record expected
int h[1000001];
^
Main.java:27: error: not a statement
    while(scanf("%d",&a),a){
                         ^
Main.java:13: error: unnamed classes are a preview feature and are disabled by default.
int main(){
^
  (use --enable-preview to enable unnamed classes)
Main.java:27: error: illegal start of expression
    while(scanf("%d",&a),a){
                     ^
Main.java:27: error: ')' expected
    while(scanf("%d",&a),a){
                        ^
Main.java:27: error: ';' expected
    while(scanf("%d",&a),a){
                          ^
Main.java:28: error: illegal start of expression
        scanf("%d",&b);
                   ^
16 errors
Language: C

#include <stdio.h>          // printf(), scanf()
#include <stdbool.h>

#define MAX_N 1000000

bool f[MAX_N + 1];

void
preparation()
{
	for (int i = 0; i <= MAX_N; ++i)
		f[i] = false;

	for (int i = 1; i <= MAX_N; ++i)
	{
		int j = i;
		while (j % 2 == 0)
			j /= 2;

		while (j % 3 == 0)
			j /= 3;

		while (j % 5 == 0)
			j /= 5;

		if (j == 1)
			f[i] = true;
	}
}

int
main(int argc, char **argv)
{
	preparation();

	while (true)
	{
		int m, n;
		scanf("%d", &m);
		if (m == 0)
			break;

		scanf("%d", &n);
		int count = 0;
		for (int i = m; i <= n; ++i)
		{
			if (f2[i])
				count++;
		}

		printf("%d\n", count);
	}

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:47:29: error: 'f2' undeclared (first use in this function); did you mean 'f'?
   47 |                         if (f2[i])
      |                             ^~
      |                             f
main.c:47:29: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

const int MAX_NUM = 1000;

int main(){
	bool list[MAX_NUM + 1] = {0};
	
	for(int two = 0;two <= 20;two++){
		for(int three = 0;three <= 13;three++){
			for(int five = 0;five <= 9;five++){
				int num = pow(2, two) * pow(3, three) * pow(5, five);
				if(1 <= num && num <= MAX_NUM) list[num] = true;
			}
		}
	}
	int m, n;
	while(1){
		cin >> m;
		if(m == 0) break;
		cin >> n;
		int ans = 0;
		for(int i = m;i <= n;i++){
			if(list[i]) ans++;
		}
		cout << ans << endl;
	}
	
	return 0;
}

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

#include<stdio.h>

int main(){

int x,y,c=0;

while(scanf("%d %d",&x,&y)
{
for(int i=x;i<=y;y++)
{
if(i%2==0)c++;
else if(i%3==0)c++;
else if(i%5==0)c++;
}
printf("%d\n",c);c=0;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: error: expected ')' before '{' token
    7 | while(scanf("%d %d",&x,&y)
      |      ~                    ^
      |                           )
    8 | {
      | ~
Language: C++

#include<stdio.h>

int main(){

int x,y,c=0;

while(scanf("%d %d",&x,&y)
{
for(int i=x;i<=y;y++)
{
if(i%2==0)c++;
else if(i%3==0)c++;
else if(i%5==0)c++;
}
printf("%d\n",c);c=0;
}
return 0;
}

#include<stdio.h>

int main(){

int x,y,c=0;

while(scanf("%d %d",&x,&y))
{
for(int i=x;i<=y;i++)
{
if(i%2==0)c++;
else if(i%3==0)c++;
else if(i%5==0)c++;
}
printf("%d\n",c);c=0;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: error: expected ')' before '{' token
    7 | while(scanf("%d %d",&x,&y)
      |      ~                    ^
      |                           )
    8 | {
      | ~                          
a.cc: At global scope:
a.cc:22:5: error: redefinition of 'int main()'
   22 | int main(){
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main(){
      |     ^~~~
Language: C++

#include<stdio.h>

int main(){

int x,y,c=0;
bool f[1000001];
for(int i=0;i<=1000001;i++)
	f[i]=false;
for(int i=0;i<=1000001;i++)
{
if(i%2==0)f[i]=true;
else if(i%3==0)f[i]=true;
else if(i%5==0)f[i]=true;
}

while(scanf("%d %d",&x,&y))
{
	for(int i=x;i<=y;i++)
{if(bool[i]==true)c++;
	}
	
	
	/*
for(int i=x;i<=y;i++)
{
if(i%2==0)c++;
else if(i%3==0)c++;
else if(i%5==0)c++;
}
*/
printf("%d\n",c);c=0;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: expected unqualified-id before '[' token
   19 | {if(bool[i]==true)c++;
      |         ^
Language: C++

#include <iostream>
using namespace std;

int isHammingNumber(int n){
	int p=n;
	while(p%2 == 0)p/=2;
	while(p%3 == 0)p/=3;
	while(p%5 == 0)p/=5;
	return p==1;
}

int main() {
	
	int m,n;
	int count;
	
	while(count=0,cin>>m>>n,m){
		for(int i=m;i<=n;++i)if(HammingNumber(i))++count;
		cout << count << endl;
	}
	return 0;	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:41: error: 'HammingNumber' was not declared in this scope; did you mean 'isHammingNumber'?
   18 |                 for(int i=m;i<=n;++i)if(HammingNumber(i))++count;
      |                                         ^~~~~~~~~~~~~
      |                                         isHammingNumber
Language: C++

#include<iostream>
using namespace std;
typedef long long L;
int main() {
	L m,n;
	L a = pow(60,9);
	while (cin >> m, m) {
		cin >> n;
		int ans = 0;
		for (L i = m; i <= n; i++) {
			if (a%i==0)ans++;
		}
		cout << ans << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'pow' was not declared in this scope
    6 |         L a = pow(60,9);
      |               ^~~
Language: C++

#include <iostream>
using namespace	std;

int main() {
  int m, n;
  int num;

  while(1) {
    cin >> m >> n;
    if(m == 0)
      break;

    int count = 0;
    for(int i = m; i <= n; i++) {
      num = i;
      while(1) {
        if(num == 1) {
          count++;
          break;
        }
        if(num % 2 == 0)
          num =	num / 2;
        else if(num % 3 == 0)
          num =	num / 3;
        else if(num % 5 == 0)
          num = num / 5;
	else
          break;
      }
    cout << count << endl;
  }
  return 0;
}



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

#include<queue>
#include<iostream>
#include<functional>

using namespace std;

bool bh[1000001];

int main()
{
	priority_queue< int,vector<int>,greater<int> > pq;
	pq.push(1);	bh[1]=true;
	while(pq.top()<1000000){
		int a=pq.top();	pq.pop();
		if(2*a<=1000000&&!bh[2*a])	pq.push(2*a),bh[2*a]=true;
		if(3*a<=1000000&&!bh[3*a])	pq.push(3*a),bh[3*a]=true;
		if(5*a<=1000000&&!bh[5*a])	pq.push(5*a),bh[5*a]=true;
	}

	vector<int> ham;
	for(int i=0;i<=1000000;i++)	if(bh[i])	ham.push_back(i);

	for(int m,n;scanf("%d%d",&m,&n),m;){
		printf("%d\n",
			distance(lower_bound(ham.begin(),ham.end(),m),
					 upper_bound(ham.begin(),ham.end(),n))
		);
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:42: error: 'upper_bound' was not declared in this scope
   26 |                                          upper_bound(ham.begin(),ham.end(),n))
      |                                          ^~~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
/*
bool sw[1000001];
int i;
 
void sws(int k){
        if(k==1){
                sw[i]=true;
                return;
        }
        if(k%2==0) sws(k/2);
        else if(k%3==0) sws(k/3);
        else if(k%5==0) sws(k/5);
        return;
}
*/
// korenisuru
int dp[1000001];
int f(int n){
        if(~dp[n]) return dp[n];
        int ans = 0;
        else if(n%2==0) ans |= f(n/2);
        else if(n%3==0) ans |= f(n/3);
        if(n%5==0) ans |= f(n/5);
        return dp[n] = ans;
}
 
int main() {
        int k,m,n;
        for(int i = 0 ; i <= 1000000 ; i++) dp[i] = -1;
        dp[1] = 1;
        /*
        for(int j=0;j<1000001;j++) sw[j]=false;
        for(i=1;i<1000001;i++) sws(i);
        while(cin >> m,m){
                int ans=0;
                cin >> n;
                for(int j=m;j<=n;j++) if(sw[j]==true) ans++;
                cout << ans << endl;
        }*/
        while(cin >> m && m){
                cin >> n;
                int ans = 0;
                for(int i = m ; i <= n ; i++) ans += f(i);
                cout << ans << endl;
        }
        return 0;
}

Compiler output:
a.cc: In function 'int f(int)':
a.cc:23:9: error: 'else' without a previous 'if'
   23 |         else if(n%2==0) ans |= f(n/2);
      |         ^~~~
Language: C++

#include<iostream>
#define N 1000001
using namespace std;

int main(){
int num;
int sum[N];
int n,m;

sum[0] = 0;
num = 0;
for(int i=1;i<N;i++){
int tmp = i;
while(!(tmp%2))tmp/=2;
while(!(tmp%3))tmp/=3;
while(!(tmp%5))tmp/=5;
if(tmp==1)num++;
sum[i] = num;
}

while(1){
cin >> m;
if(!m)break;
cin >>n;
cout << sum[m] - sum[n-1] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^