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

# include <iostream>
# include <cstring>

int n;
int a[3];
int x[4001];

int main() {
	while (1) {
		std::cin >> n;
		if (n == 0)
			break;
		int count = 0;
		std::memset(x, 0, sizeof(x));
		for (int i = 0; i < n; ++i) {
			for (int j = 0; j < 3; ++j)
				std::cin >> a[j];
			x[a[0]] += a[1] * a[2];
		}
		for (int i = 1; i <= 4000; ++i) {
			if (x[i] >= 1000000) {
				std::cout << i << std::endl;
				++count;
			}
		}
		if (count==0)
			std::cout << "NA" << std::endl;
	}
	return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
# include <iostream>
^
Main.java:2: error: illegal character: '#'
# include <cstring>
^
Main.java:5: error: class, interface, enum, or record expected
int a[3];
^
Main.java:6: error: class, interface, enum, or record expected
int x[4001];
^
Main.java:10: error: not a statement
		std::cin >> n;
		         ^
Main.java:14: error: not a statement
		std::memset(x, 0, sizeof(x));
		^
Main.java:14: error: not a statement
		std::memset(x, 0, sizeof(x));
		            ^
Main.java:17: error: not a statement
				std::cin >> a[j];
				         ^
Main.java:22: error: not a statement
				std::cout << i << std::endl;
				               ^
Main.java:27: error: not a statement
			std::cout << "NA" << std::endl;
			                  ^
Main.java:8: error: unnamed classes are a preview feature and are disabled by default.
int main() {
^
  (use --enable-preview to enable unnamed classes)
Main.java:14: error: ';' expected
		std::memset(x, 0, sizeof(x));
		           ^
Main.java:14: error: ';' expected
		std::memset(x, 0, sizeof(x));
		             ^
Main.java:14: error: ';' expected
		std::memset(x, 0, sizeof(x));
		                           ^
14 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

class Main {
    private long sales;
    boolean isAchieved;

    Salesman(long price, long goodsnum){
        addSales(price,goodsnum);
    }
    void addSales(long price, long number) {
        this.sales += price * number;
        this.isAchieved = isAchieved();
    }

    private boolean isAchieved() {
        return sales >= 1000000;
    }
}

public class AOJ100 {
    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        StringTokenizer st;
        try {
            while (true) {
                String line;
                long price,goodsnum;
                int num;
                int n = Integer.parseInt(br.readLine());
                if(n ==0){
                    break;
                }
                HashMap<Integer, Salesman> list = new HashMap<>();

                for (int i = 0; i < n; i++) {
                    line = br.readLine();
                    st = new StringTokenizer(line);
                    num = Integer.parseInt(st.nextToken());
                    price = Long.parseLong(st.nextToken());
                    goodsnum= Long.parseLong(st.nextToken());
                    if(list.containsKey(num)){
                        list.get(num).addSales(price,goodsnum);
                    }else{
                        list.put(num,new Salesman(price,goodsnum));
                    }
                }

                List<Map.Entry<Integer,Salesman>> entries = new ArrayList<>(list.entrySet());
                Collections.sort(entries, new Comparator<Map.Entry<Integer, Salesman>>() {
                    @Override
                    public int compare(Map.Entry<Integer, Salesman> o1, Map.Entry<Integer, Salesman> o2) {
                        return o1.getKey().compareTo(o2.getKey());
                    }
                });
                boolean isExist = false;
                for (Map.Entry<Integer, Salesman> entry : entries) {
                    if(entry.getValue().isAchieved){
                        System.out.println(entry.getKey());
                        isExist = true;
                    }
                }
                if (!isExist){
                    System.out.println("NA");
                }
            }


        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}

Compiler output:
Main.java:9: error: invalid method declaration; return type required
    Salesman(long price, long goodsnum){
    ^
1 error
Language: Java


import java.util.Hashtable;
import java.util.Scanner;


public class BestEmployee {

	public static void main(String[] args) {
		int total = 0, id =0, p=0, q = 0, i=1;
		long mul = 1;
		 Scanner sc = new Scanner(System.in);
		 while(true) {
			 total = sc.nextInt();
			 
			 if(total==0 ) {
				 return;
			 }
			 
			
			 Hashtable<Integer, Long> sales = new Hashtable<Integer, Long>();
			 for(i=1; i<=total; i++) {
				 id = sc.nextInt();
				 p = sc.nextInt();
				 q = sc.nextInt();
				 
				 mul = p*q;
				 if(sales.containsKey(id) ) {
					 if(sales.get(id).longValue() < 1000000) {
					  sales.put(id, mul + sales.get(id).longValue());
					 }
				 } else {
					 sales.put(id, mul );
				 }
				 
				
			 }
			 
			
			 boolean hasMax = false;
			 for (int key : sales.keySet()) {
				 mul = sales.get(key);
				 if(mul >= 1000000 ) {	
					 hasMax = true;
					 System.out.println(key);
				 } 
				}
			  
		 
		     if(hasMax == false) {
				 System.out.println("NA");
			 }
			 
		 }

	}

}

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

import java.util.Scanner;
import java.util.HashMap;
import java.util.Comparator;
import java.util.Arrays;
class Record
{
    int id;
    int uriage;
    int jyun;

    Record(int id, int uriage, int jyun)
    {
	this.id = id;
	this.uriage = uriage;
	this.jyun = jyun;
    }
    
    int getId()
    {
	return this.id;
    }
    int getUriage()
    {
	return this.uriage;
    }
    int getJyun()
    {
	return this.jyun;
    }
    int addUriage(int uri)
    {
	this.uriage += uri;
	return this.uriage; 
    }
}

class CmpJyun implements Comparator<Record> {
    public int compare(Record record1, Record record2) {
	return record1.getJyun() - record2.getJyun();
  }
}

public class Main
{
    public static void main(String[] args)
    {
	final int lim=1000000;
	Cmp rc = new Cmp();
	Scanner scan = new Scanner(System.in);
	while (true) {
	    HashMap<Integer,Record> h = new HashMap<Integer,Record>();
	    int n = scan.nextInt();
	    if (n==0) 
		break;

	    for (int jyun=0; jyun<n; jyun++){
		int id    = scan.nextInt();
		int tanka = scan.nextInt();
		int ryou  = scan.nextInt();
		if  (h.containsKey(id)){
		    h.get(id).addUriage(tanka*ryou);
 		} else {
		    h.put(id,new Record(id, tanka*ryou, jyun));
		}
	    }

	    Record[] rec = new Record[h.size()];
	    int j=0;
	    for (Integer id : h.keySet()) {
		rec[j] = h.get(id);
		j += 1;
	    }
	    boolean none=true;
	    Arrays.sort(rec, rc);
	    for (int i=0; i<h.size(); i++){
		if (rec[i].getUriage() >= lim){
		    System.out.println(rec[i].getId());
		    none=false;
		}
	    }
	    if (none)
		System.out.println("NA");
	}
    }
}

Compiler output:
Main.java:48: error: cannot find symbol
	Cmp rc = new Cmp();
	^
  symbol:   class Cmp
  location: class Main
Main.java:48: error: cannot find symbol
	Cmp rc = new Cmp();
	             ^
  symbol:   class Cmp
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
	class Main{

		public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
int n;
int b;
int t;
int s;
int gaku=0;
int flag=0;
int ban=0;
int count=0;

	for(;flag!=9;){
		n=sc.nextInt();
		int AA[]=new int[n];
		for(int i=0;i<n;i++){
		b=sc.nextInt();
		t=sc.nextInt();
		s=sc.nextInt();
		if(ban==b){
			gaku = gaku+(t*s);
		}else{
			gaku = t*s;	
		}
		
		if(gaku>=1000000){
			System.out.println(b);
			count++;
		}
		if(count==0){
			System.out.println("NA");
		}
		
		ban=b;	
		}
		gaku=0;
		count=0;
		ban=0;
		
		if(n==0){
			flag=9;
		}
	}

Compiler output:
Main.java:45: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.Scanner;
	class Main{

		public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
int n;
int b;
int t;
int s;
int gaku=0;
int flag=0;
int ban=0;
int count=0;

	for(;flag!=9;){
		n=sc.nextInt();
		
		for(int i=0;i<n;i++){
		b=sc.nextInt();
		t=sc.nextInt();
		s=sc.nextInt();
		if(ban==b){
			gaku = gaku+(t*s);
		}else{
			gaku = t*s;	
		}
		
		if(gaku>=1000000){
			System.out.println(b);
			count++;
		}
				
		ban=b;	
		}
		gaku=0;
		count=0;
		ban=0;
		
		if(n==0){
			flag=9;
		}else {
			System.out.prinln("NA");
		}
	}

		}
	}

Compiler output:
Main.java:42: error: cannot find symbol
			System.out.prinln("NA");
			          ^
  symbol:   method prinln(String)
  location: variable out of type PrintStream
1 error
Language: Java

import java.util.Scanner;
	class ?????????{

		public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
int n;
int b;
int t;
int s;
int gaku=0;
int flag=0;
int ban=0;
int count=0;

	for(;flag!=9;){
		n=sc.nextInt();
		
		for(int i=0;i<n;i++){
		b=sc.nextInt();
		t=sc.nextInt();
		s=sc.nextInt();
		if(ban==b){
			gaku = gaku+(t*s);
		}else{
			gaku = t*s;	
		}
		
		if(gaku>=1000000){
			System.out.println(b);
			count++;
		}
				
		ban=b;	
		}
		gaku=0;
		count=0;
		ban=0;
		
		if(n==0){
			flag=9;
		}else {
			System.out.println("NA");
		}
	}

		}
	}

Compiler output:
Main.java:2: error: <identifier> expected
	class ?????????{
	     ^
1 error
Language: Java

import java.util.Scanner;
	class Main{

		public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
int n;
int b;
int t;
int s;
int gaku=0;
int flag=0;
int ban=0;
int count=0;

	for(;flag!=9;){
		n=sc.nextInt();
		
		for(int i=0;i<n;i++){
		b=sc.nextInt();
		t=sc.nextInt();
		s=sc.nextInt();
		if(ban==b){
			gaku = gaku+(t*s);
		}else{
			gaku = t*s;	
		}
		
		if(gaku>=1000000){
			System.out.println(b);
			count++;
		}
		if(n!=0&&count==0){
			System.out.println("NA");
		}

		ban=b;	
		}
		gaku=0;
		count=0;
		ban=0;
		
		if(n==0){
			flag=9;
		}
		
	}

Compiler output:
Main.java:46: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.*;

public class SaleResult {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		final int THRESHOLD = 1000000;
		final int MAX_EMPLOYEE = 3999;
		
		Map<Integer, Integer> data = new HashMap<Integer, Integer>(3999);
		
		int n;
		int id, numOfSale, price;
		int count;
		while((n=in.nextInt()) != 0) {
			for(int i=0; i<n; i++) {
				id = in.nextInt();
				price = in.nextInt();
				numOfSale = in.nextInt();
				
				if(data.containsKey(id)) {
					data.put(id, data.get(id)+(price*numOfSale));
				} else {
					data.put(id, price*numOfSale);
				}
			}
			count = 0;
			for(int x: data.keySet()) {
				if(data.get(x)>=THRESHOLD) {
					System.out.println(x);
					count++;
				}
			}
			if(count==0) System.out.println("NA");
			
			data.clear();
		}
		
	}

}

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

import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		
		for(; ;)
		{
			int n = scanner.nextInt();
			if(n == 0)
			{
				break;
			}
			
			class Data
			{
				int e;
				long sum;
				boolean is_view;
			}
			Data[] data = new Data[n];		
			
			for(int i=0; i<n; i++)
			{
				data[i] = new Data();
				data[i].e = scanner.nextInt();
				long p = scanner.nextLong();
				long q = scanner.nextLong();
				data[i].sum = p * q;
				data[i].is_view = true;
			}
			
			for(int i=0; i<n; i++)
			{
				if(data[i].is_view)
				{
					for(int j=i+1; j<n; j++)
					{
						if(data[i].e == data[j].e)
						{
							data[i].sum += data[j].sum;
							data[j].is_view = false;
						}
					}
				}
			}
			
			int count = 0;
			for(int i=0; i<n; i++)
			{
				if(data[i].is_view && data[i].sum>=1000000)
				{
					System.out.println(data[i].e);
					count ++;
				}
			}
			
			if(count == 0)
			{
				System.out.println("NA");
			}
		}
	}

Compiler output:
Main.java:65: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.HashMap;
import java.util.Scanner;

public class Main {
	private Scanner sc;
	
	public static void main(String[] args) {
		new Main();
	}
	
	public Main() {
		sc = new Scanner(System.in);
		
		int lines = Integer.parseInt(sc.nextLine());
		while (lines != 0) {
			HashMap<String, Integer> nico = new HashMap<String, Integer>();
			
			for (int i = 0; i < lines; i++) {
				String line = sc.nextLine();
				String[] data = line.split(" ");
				
				int sales = Integer.parseInt(data[1]) * Integer.parseInt(data[2]);
				if (nico.containsKey(data[0]) == true) {
					nico.put(data[0], nico.get(data[0]) + sales);
				} else {
					nico.put(data[0], sales);
				}
	
			
			boolean na = true;
			for (String key : nico.keySet()) {
				if (nico.get(key) >= 1000000) {
					System.out.println(key);
					na = false;
				}
			}
			if (na == true) System.out.println("NA");
			
			lines = Integer.parseInt(sc.nextLine());
		}
	}
}

Compiler output:
Main.java:42: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import Control.Monad
import Control.Applicative
import Data.List
  
main :: IO ()
main = do
  n <- readLn :: IO Int
  if n == 0
    then return ()
    else do
    ns <- getData n
    let ans = solve ns
    if null ans then putStrLn "NA"
                else mapM_ print ans
    main
  
getData :: Int -> IO [((Int, Int), Int)]
getData n = go 0
  where
    go :: Int -> IO [((Int, Int), Int)]
    go m
      | m == n = return []
      | otherwise = do
          [i, x, y] <- map read . words <$> getLine :: IO [Int]
          (:) ((m, i), x * y) <$> go (m+1)

solve :: [((Int, Int), Int)] -> [Int]
solve ns = map fst
           $ sortBy (\(x,_) (x2,_) -> compare x x2)
           $ filter ((>= 1000000) . snd)
           $ map (\ls -> (snd (fst (head ls)), sum (map snd ls)))
           $ groupBy (\((_, y1), _) ((_, y2), _) -> y1 == y2)
           $ sortBy (\((_, y1), _) ((_, y2), _) ->
                       compare y1 y2) ns

Compiler output:
Main.java:1: error: ';' expected
import Control.Monad
                    ^
Main.java:2: error: ';' expected
import Control.Applicative
                          ^
Main.java:3: error: ';' expected
import Data.List
                ^
Main.java:29: error: illegal character: '\'
           $ sortBy (\(x,_) (x2,_) -> compare x x2)
                     ^
Main.java:31: error: illegal character: '\'
           $ map (\ls -> (snd (fst (head ls)), sum (map snd ls)))
                  ^
Main.java:32: error: illegal character: '\'
           $ groupBy (\((_, y1), _) ((_, y2), _) -> y1 == y2)
                      ^
Main.java:33: error: illegal character: '\'
           $ sortBy (\((_, y1), _) ((_, y2), _) ->
                     ^
7 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

public class Sale_Result {

	public static void main(String[] args) throws Exception {
		// TODO ?????????????????????????????????????????????
		boolean[] arg = null;
		int length=0;
        int i=0;
        boolean first=false;
        ArrayList arr=new ArrayList();
        Map<Integer,Integer> map=new HashMap<Integer,Integer>();

		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
            String line;
            while ((line = br.readLine()) != null ) {
            	if(line.equals("0")){
            		break;
            	}
            	String[] tokens = line.split(" ");
            	if(tokens.length==1){
            		i=0;
            		first=false;
            		map=new HashMap();
            		length=Integer.parseInt(tokens[0]);
            	}else{
            		int a= Integer.parseInt(tokens[0]);
            		int b = Integer.parseInt(tokens[1]);
            		int c = Integer.parseInt(tokens[2]);
            		if(map.get(a)==null){
            			map.put(a, b*c);
            		}else{
            			map.put(a, map.get(a)+b*c);
            		}
            		i++;
            	}
            	if(i==length){
            		for(Map.Entry<Integer, Integer> entry : map.entrySet()) {
            			if(entry.getValue()>=1000000){
            				arr.add(entry.getKey());
                			first=true;
                		}
            		}

            		if(!first){
            			arr.add("NA");
            		}
            	}
            }
		}
		for(int k=0;k<arr.size();k++){
			System.out.println(arr.get(k));
		}
	}

}

Compiler output:
Main.java:7: error: class Sale_Result is public, should be declared in a file named Sale_Result.java
public class Sale_Result {
       ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: Java

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Scanner;

public class ID0100 {

	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);

		int n;//????????????????????°
		int e;//????????????
		BigDecimal p;//????£???????
		BigDecimal q;//?£??????°???


		//?????????????????????????????§??????????¶??¶??????????????????¢????????§??????????????\
		while(sc.hasNext()){
			Map<Integer,BigDecimal> saleResultMap=new HashMap<Integer,BigDecimal>();
			n=sc.nextInt();
			if(n==0)break;
			for(int i=0;i<n;i++){
				e=sc.nextInt();
				p=new BigDecimal(sc.nextInt());
				q=new BigDecimal(sc.nextInt());

				if(saleResultMap.get(e)==null){
					saleResultMap.put(e, p.multiply(q));
				}else{
					saleResultMap.put(e, saleResultMap.get(e).add(p.multiply(q)));
				}
			}
			boolean existMillionSeller=false;
			Iterator<Integer> it=saleResultMap.keySet().iterator();
			while(it.hasNext()){
				e=it.next();
				BigDecimal result=saleResultMap.get(e);
				if(result.compareTo(new BigDecimal(1000000))!=-1){
					existMillionSeller=true;
					System.out.println(e);
				}
			}
			if(!existMillionSeller)
				System.out.println("NA");
		}

	}
}

Compiler output:
Main.java:7: error: class ID0100 is public, should be declared in a file named ID0100.java
public class ID0100 {
       ^
1 error
Language: Java

import java.io.*;
import java.util.*;
import java.math.*;
public class Main {
    public static void main(String[] args)
            throws java.io.IOException{
        Scanner scan = new Scanner(System.in);
   long [] syatiku = new String[4000];
 boolean flag =true;
while(flag){
        int n= scan.nextInt();
if(n==0){flag =false;break;}
       for(int i=0;i<n;i++){

    syatiku[scan.nextInt()] = scan.nextLong() * scan.nextLong();
}int max =0;
int number=0;
for(int i=0;i<n;i++){
if(syatiku[i]>max){max = syatiku[max]; number =i;}
}
System.out.println(number);
}

            


   }
}

Compiler output:
Main.java:8: error: incompatible types: String[] cannot be converted to long[]
   long [] syatiku = new String[4000];
                     ^
Main.java:19: error: incompatible types: possible lossy conversion from long to int
if(syatiku[i]>max){max = syatiku[max]; number =i;}
                                ^
2 errors
Language: Java

import java.io.*;
import java.util.*;
import java.math.*;
public class Main {
    public static void main(String[] args)
            throws java.io.IOException{
        Scanner scan = new Scanner(System.in);
   long [] syatiku = new long[4000];
 boolean flag =true;
while(flag){
        int n= scan.nextInt();
if(n==0){flag =false;break;}
       for(int i=0;i<n;i++){

    syatiku[scan.nextInt()] = scan.nextLong() * scan.nextLong();
}int max =0;
int number=0;
for(int i=0;i<n;i++){
if(syatiku[i]>max){max = syatiku[max]; number =i;}
}
System.out.println(number);
}

            


   }
}

Compiler output:
Main.java:19: error: incompatible types: possible lossy conversion from long to int
if(syatiku[i]>max){max = syatiku[max]; number =i;}
                                ^
1 error
Language: Java

import java.io.*;
import java.util.*;
import java.math.*;
public class Main {
    public static void main(String[] args)
            throws java.io.IOException{
        Scanner scan = new Scanner(System.in);
   long [] syatiku = new long[4000];
 boolean flag =true;
while(flag){
        int n= scan.nextInt();
if(n==0){flag =false;break;}
       for(int i=0;i<n;i++){

    syatiku[scan.nextInt()] = scan.nextLong() * scan.nextLong();
}long max =0;
int number=0;
for(int i=0;i<n;i++){
if(syatiku[i]>max){max = syatiku[max]; number =i;}
}
System.out.println(number);
}

            


   }
}

Compiler output:
Main.java:19: error: incompatible types: possible lossy conversion from long to int
if(syatiku[i]>max){max = syatiku[max]; number =i;}
                                 ^
1 error
Language: Java

import java.util.*;

public class AOJ0100 {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int i,n,no,k,t;;
		int p[];
		long workers[]=new long[4001];
		Set<Integer> s=new TreeSet<Integer>();
		boolean flag;
		while(true){
			flag=false;
			Arrays.fill(workers, 0);
			n=sc.nextInt();
			if(n==0) break;
			p=new int[n];
			for(i=0;i<n;i++){
				no=sc.nextInt();
				k=sc.nextInt();
				t=sc.nextInt();
				if(s.add(no)){
					p[i]=no;
				}
				workers[no]+=k*t;
			}
			for(i=0;i<n;i++){
				if(1000000<=workers[p[i]]){
					System.out.println(p[i]);
					flag=true;
				}
			}
			if(!flag){
				System.out.println("NA");
			}
		}
	}
}

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

import java.io.*;

public class Main
{
    public static void main(String[] args)
    {
        int overCount = 0;
        BufferedReader bReader = new BufferedReader(new InputStreamReader(System.in));

        int n, count;
        int[] emp;

        emp = new int[4001];

        clearAry(emp);

        while ( (count = strRead()) != 0 )
            {
                n = 0;

                while ( n < count )
                    {
                        String str = bReader.readLine();
                        String[] strEd = str.split(" ");

                        int empCnt = Integer.parseInt(strEd[0]);
                        int emp_price = Integer.parseInt(strEd[1]);
                        int emp_q = Integer.parseInt(strEd[2]);

                        emp[empCnt] = emp[empCnt] + emp_price * emp_q;
                        n++;
                    }
                for ( int i = 0; i < 4000; i++ )
                    {
                        if ( emp[i] >= 1000000 )
                            {
                                System.out.println(i);
                                overCount++;
                            }
                    }

                if ( overCount == 0 )
                    {
                        System.out.println("NA");
                    }
                overCount = 0;
                clearAry(emp);
            }

    }

    public static int strRead()
    {

        BufferedReader br_dataCount = new BufferedReader(new InputStreamReader(System.in));
        return Integer.parseInt(br_dataCount.readLine());
    }

    public static void clearAry(int[] ar)
    {
        for ( int i = 0; i <= 4000; i++ )
            {
                ar[i] = 0;
            }
    }
}

Compiler output:
Main.java:23: error: unreported exception IOException; must be caught or declared to be thrown
                        String str = bReader.readLine();
                                                     ^
Main.java:56: error: unreported exception IOException; must be caught or declared to be thrown
        return Integer.parseInt(br_dataCount.readLine());
                                                     ^
2 errors
Language: Java


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.LinkedList;
import java.util.Queue;
import sun.java2d.Disposer;

public class Main
{

    public static void main(String[] args) throws IOException
    {
        BufferedReader bReader = new BufferedReader(new InputStreamReader(System.in));
        int overCount = 0, count, n, empID, price, quantitiy;
        long total;

        Queue<Integer> iQueue = new LinkedList<Integer>();

        long[] emp = new long[4000];

        while ( (count = Integer.parseInt(bReader.readLine())) != 0 )
        {
            n = 0;
            while ( n < count )
            {
                String str = bReader.readLine();
                String[] editedstr = str.split(" ");

                empID = Integer.parseInt(editedstr[0]);         //社員番号
                price = Integer.parseInt(editedstr[1]);         //単価
                quantitiy = Integer.parseInt(editedstr[2]);     //販売個数
                total = price * quantitiy;                      //実績

                if ( emp[empID] == 0 )                          //初めての入力
                {
                    emp[empID] = total;
                    iQueue.offer(empID);
                }
                else if ( emp[empID] <= 1000000 )               //2回目以降の入力かつ100万を超えない値の場合
                {
                    emp[empID] += total;
                }
                else
                {
                }

                n++;

            }

            for ( int a : iQueue )
            {
                if(emp[a] >= 1000000)
                {
                    System.out.println(a);
                    overCount++;
                }
            }

            if ( overCount == 0 )
            {
                System.out.println("NA");
            }
            overCount = 0;
            iQueue.clear();
            emp = null;
            emp = new long[4000];
        }
    }
}

Compiler output:
Main.java:7: error: package sun.java2d is not visible
import sun.java2d.Disposer;
          ^
  (package sun.java2d is declared in module java.desktop, which does not export it)
1 error
Language: Java

package test;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Main {

	public static void main(String[] args) throws IOException{
		BufferedReader br = null;
		try{
			br = new  BufferedReader (new InputStreamReader(System.in));
			while(true){
				int n = Integer.parseInt(br.readLine());
				if(n == 0)break;
				List list = new ArrayList<int[]>();
				for(int i = 0; i < n;i++){
					String[] buf = br.readLine().split(" ");
					int p ,q,id;
					id = Integer.parseInt(buf[0]);
					p = Integer.parseInt(buf[1]);q = Integer.parseInt(buf[2]);
					int[] data = null;
					boolean bool = false;
					for(int j = 0; j<list.size();j++){
						data = (int[])list.get(j);
						if(data[0] == id){
							data[1] += p*q;
							list.set(j, data);
							bool = true;
							break;
						}
					}
					if(!bool){
						data= new int[2];
						data[0] = id;
						data[1] = p*q;
						list.add(data);
					}
				}
				boolean bool = false;
				Iterator it = list.iterator();
				while(it.hasNext()){
					int[] data = (int[])it.next();
					if(data[1] >=1000000){
						bool = true;
						System.out.println(data[0]);
					}
				}
				if(!bool){
					System.out.println("NA");
				}
			}
		}finally{
			br.close();
		}
	}

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

#include <stdio.h>
main(){
  int n,i,j,con=0,ans[111111]={0},bangou[4000]={0},tanka[1111111]={0},kazu[100000]={0};
  while(1){
    scanf("%d",&n);
    if(n==0)break;
    for(i=0;i<n;i++){
      scanf("%d %d %d",&bangou[i],&tanka[i],&kazu[i]);
      ans[i]=tanka[i]*kazu[i];
      for(j=0;j<i;j++){
	if(ans[i]==ans[j]){
	  ans[j]=ans[i]+ans[j];
	  ans[i]=0;
	}
      }
    }
    for(j=0;j<n;j++){
      if(ans[j]>=1000000){
	printf("%d\n",bangou[j]);
	con++;
      }
    }
    if(con==0){
      printf("NA\n");
    }
    con=0
  }
  return 0;
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:26:10: error: expected ';' before '}' token
   26 |     con=0
      |          ^
      |          ;
   27 |   }
      |   ~
Language: C

#include <cstdio>
#include <map>
using namespace std;
typedef long long ll;
 
int n;
 
int main(){
	while(scanf("%d", &n),n){
		map<int,ll> m;
		map<int,ll>::iterator it;
		for(int i = 0; i < n; i++){
			int x; ll p, q;
			scanf("%d%lld%lld", &x, &p, &q);
			m[x] += p*q;
		}
		bool ok = true;
		for(it = m.begin(); it != m.end(); it++){
			if(it->second >= 1000000){
				ok = false;
				printf("%d\n", it->first);
			}
		}
		if(ok) printf("NA\n");
	}
	return 0;
}

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

#include <stdio.h>

int main(void)
{
	__int64 member[4000];
	int n, i, number, unit, num, f;
	
	while (scanf("%d", &n), n != 0){
		f = 0;
		for (i = 0; i < 4000; i++){
			member[i] = 0;
		}
		
		for (i = 0; i < n; i++){
			scanf("%d %d %d", &number, &unit, &num);
			member[number - 1] += unit * num;
		}
		
		for (i = 0; i < 4000; i++){
			if (member[i] >= 1000000){
				printf("%d\n", i + 1);
				f = 1;
			}
		}
		
		if (f == 0){
			printf("NA\n");
		}
	}
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: unknown type name '__int64'; did you mean '__int64_t'?
    5 |         __int64 member[4000];
      |         ^~~~~~~
      |         __int64_t
Language: C

#include <stdio.h>

int main(void)
{
	__int64 member[4000], unit, num;
	int n, i, number, f;
	
	while (scanf("%d", &n), n != 0){
		f = 0;
		for (i = 0; i < 4000; i++){
			member[i] = 0;
		}
		
		for (i = 0; i < n; i++){
			scanf("%d %I64d %I64d", &number, &unit, &num);
			member[number - 1] += (unit * num);
		}
		
		for (i = 0; i < n; i++){
			if (member[i] >= 1000000){
				printf("%d\n", i + 1);
				f = 1;
			}
		}
		
		if (f == 0){
			printf("NA\n");
		}
	}
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: unknown type name '__int64'; did you mean '__int64_t'?
    5 |         __int64 member[4000], unit, num;
      |         ^~~~~~~
      |         __int64_t
Language: C

#include<stdio.h>
int main(void){
	int n,i,number,price,howmany;
	long long int score[4001];
	scanf("%d",n);
	while(n!=0){
		count
		for(i=0; i<=4000; i++){
			score[i]=0;
		}
		for(i=0; i<n; i++){
			scanf("%d%d%d",number,price,howmany);
			score[number]+=price*howmany;
		}
		for(i=1; i<=4000; i++){
			if(score[i]>=1000000){
				printf("%d\n",i+1);
				score[0]++;
			}
		}
		if(score[0]==0){
			printf("NA\n",i+1);
		}
		scanf("%d",n);
	}
}

Compiler output:
main.c: In function 'main':
main.c:7:17: error: 'count' undeclared (first use in this function)
    7 |                 count
      |                 ^~~~~
main.c:7:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:22: error: expected ';' before 'for'
    7 |                 count
      |                      ^
      |                      ;
    8 |                 for(i=0; i<=4000; i++){
      |                 ~~~
Language: C

#include<stdio.h>
int main(void){
	int n,i,number,price,howmany;
	long long int score[4001];
	scanf("%d",n);
	while(n!=0){
		count
		for(i=0; i<=4000; i++){
			score[i]=0;
		}
		for(i=0; i<n; i++){
			scanf("%d%d%d",number,price,howmany);
			score[number]+=price*howmany;
		}
		for(i=1; i<=4000; i++){
			if(score[i]>=1000000){
				printf("%lld\n",i+1);
				score[0]++;
			}
		}
		if(score[0]==0){
			printf("NA\n",i+1);
		}
		scanf("%d",n);
	}
}

Compiler output:
main.c: In function 'main':
main.c:7:17: error: 'count' undeclared (first use in this function)
    7 |                 count
      |                 ^~~~~
main.c:7:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:22: error: expected ';' before 'for'
    7 |                 count
      |                      ^
      |                      ;
    8 |                 for(i=0; i<=4000; i++){
      |                 ~~~
Language: C

#include <stdio.h>

long long int members_number[4001];

void reset(void) {
  int i;
  for(i = 0; i < 4001; i++ ) {
    members_number[i] = 0;
  }
}

void scan_result(long int n) {
  int staff, number, i;
  long long int price;
  for(i = 0; i < n; i++ ) {
    scanf("%d %lld %d",&staff, &price, &number);
    members_number[staff] += price * number;
  }
}

void output(void) {
  int i, flag = 0;
  for(i = 1; i < 4001; i++ ) {
    if(members_number[i] >= 1000000) {
      printf("%d\n",i);
      flag = 1;
    }
  }
  if(!count) {
    puts("NA");
  }
}

int main(void) {
  long int n;
  scanf("%ld",&n);
  while(n) {
    reset();
    scan_result(n);
    output();
    scanf("%ld",&n);
  }
  return 0;
}

Compiler output:
main.c: In function 'output':
main.c:29:7: error: 'count' undeclared (first use in this function)
   29 |   if(!count) {
      |       ^~~~~
main.c:29:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void){
	int n;
	int number[4001];
	int price[4001];
	int kosu[4001];
	int harasyo[4001];
	long long int  sum[4001];
	int i,j;
	int flag;
	while(scanf("%d",&n)){
		harasyo[4001]={0};
		sum[4001]={0};
		flag=0;
		if(n==0){
			break;
		}
		for(i=0;i<n;i++){
			scanf("%d %d %d",&number[i],&price[i],&kosu[i]);
			sum[i]=price[i]*kosu[i];
		}
		for(i=0;i<n;i++){
			for(j=1;j<n;j++){
				if(number[i]==number[i+j]){
					sum[i]+=sum[i+j];
				}
			}
		}
		for(i=0;i<n;i++){
			if(sum[i]>=1000000){
				harasyo[i]=number[i];
				flag=1;
			}
		}
		if(flag==0){
			printf("NA\n");
		}
			for(i=0;i<=4000;i++){
				if(harasyo[i]!=0){
				printf("%d\n",harasyo[i]);
				
			}
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:31: error: expected expression before '{' token
   12 |                 harasyo[4001]={0};
      |                               ^
main.c:13:27: error: expected expression before '{' token
   13 |                 sum[4001]={0};
      |                           ^
Language: C

#include <stdio.h>
#include <stdlib.h>
int checkProfit (long long int);

typedef struct {
	int Number;
	int price;
	int sold;
	long long int profit;
} employee;

int main () {
	employee data[4096];
	int n, i, j, k;
	while (scanf ("%d", &n) != EOF) {
		if (n == 0) break;
		k = 0;
		for (i = 0;i < n;i++) {
			scanf ("%d %d %d", &data[i].Number, &data[i].price, &data[i].sold);
			data[i].profit = data[i].price * data[i].sold
		}
		for (i = 0;i < n-1;i++) {
			for (j = i+1;j < n;j++) {
				if (data[i].profit != 0 && data[j].profit != 0) {
					if (data[i].Number == data[j].Number) {
						data[i].profit += data[j].profit;
						data[j].profit = 0;
						data[j].Number = 0;
					}
				}
			}
		}
		for (i = 0;i < n;i++) {
			if (checkProfit(data[i].profit) == 1) {
				printf ("%d\n", data[i].Number);
				k = 1;
			}
		}
		if (k == 0) printf ("NA\n");
	}
	return 0;
}

int checkProfit (long long int a) {
	if (a >= 1000000) {
		return 1;
	} else {
		return 0;
	}
}

Compiler output:
main.c: In function 'main':
main.c:20:70: error: expected ';' before '}' token
   20 |                         data[i].profit = data[i].price * data[i].sold
      |                                                                      ^
      |                                                                      ;
   21 |                 }
      |                 ~
Language: C

#include<stdio.h>
int main()
{
	int i,n;
	int tag=0;
	int flag=0;
	int t;
	__int64 p,q;
	__int64 id[4001];
	int ord[4001];
	for(i=0;i<4001;i++)
		id[i]=0;

	while(scanf("%d",&n)&&n!=0)
	{
		for(i=0;i<n;i++)
		{
			scanf("%d%I64d%I64d",&t,&p,&q);
			id[t]+=p*q;
			ord[flag++]=t;
		}
		for(i=0;i<flag;i++)
		{
			if(id[ord[i]]>=1000000)
			{
				printf("%I64d\n",ord[i]);
				id[ord[i]]=0;
				tag++;
			}
		}
		if(tag==0)
			printf("NA\n");
		
		tag=0;
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: unknown type name '__int64'; did you mean '__int64_t'?
    8 |         __int64 p,q;
      |         ^~~~~~~
      |         __int64_t
main.c:9:9: error: unknown type name '__int64'; did you mean '__int64_t'?
    9 |         __int64 id[4001];
      |         ^~~~~~~
      |         __int64_t
Language: C

// a.c.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//

#include <stdio.h>
int main(void){
	int n;
	int ban, tan, suu;
	long long int bango[4001];
	int flg,i;
	while (1){
		for (i = 1; i <= 4000; i++){
			bango[i] = 0;
		}
		scanf_s("%d", &n);
		if (n == 0){
			break;
		}
		for (i = 0; i < n; i++){
			scanf_s("%d %d %d", &ban, &tan, &suu);
			bango[ban] += tan*suu;
		}
		flg = 0;
		for (i = 1; i <= 4000; i++){
			if (bango[i]>=1000000){
				printf("%d\n", i);
				flg = 1;
			}
		}
		if (!flg){
			printf("NA\n");
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   14 |                 scanf_s("%d", &n);
      |                 ^~~~~~~
      |                 scanf
Language: C

#include <stdio.h>

int main() {
	int n, num, val, sell, flag;

	while (1) {
		flag = 0;

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

		for (int i = 0; i < n; i++) {
			scanf("%d", &num);
			scanf("%d", &val);
			scans("%d", &sell);

			if (val * sell >= 1000000) {
				printf("%d\n", num);
				flag = 1;
			}
		}

		if (flag == 0) {
			printf("NA\n");
		}
		
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:25: error: implicit declaration of function 'scans'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   17 |                         scans("%d", &sell);
      |                         ^~~~~
      |                         scanf
Language: C

#include <stdio.h>

int main() {
	int i, n, num, val, sell, flag;

	while (1) {
		flag = 0;

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

		for (i = 0; i < n; i++) {
			scanf("%d", &num);
			scanf("%d", &val);
			scans("%d", &sell);

			if (val * sell >= 1000000) {
				printf("%d\n", num);
				flag = 1;
			}
		}

		if (flag == 0) {
			printf("NA\n");
		}
		
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:25: error: implicit declaration of function 'scans'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   17 |                         scans("%d", &sell);
      |                         ^~~~~
      |                         scanf
Language: C

int main() {
	int n, num, val, sell, flag;

	while (1) {
		flag = 0;
		int total[4000] = {};

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

		for (int i = 0; i < n; i++) {
			scanf("%d", &num);
			scanf("%d", &val);
			scanf("%d", &sell);

			total[num] += val * sell;
		}

		for (int j = 0; j < 4000; j++) {
			if (total[j] >= 1000000) {
				printf("%d\n", j);
				flag = 1;
			}
		}

		if (flag == 0) {
			printf("NA\n");
		}
		
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:17: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 |                 scanf("%d", &n);
      |                 ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main() {
main.c:8:17: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 |                 scanf("%d", &n);
      |                 ^~~~~
main.c:8:17: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:23:33: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   23 |                                 printf("%d\n", j);
      |                                 ^~~~~~
main.c:23:33: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:23:33: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:23:33: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:29:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   29 |                         printf("NA\n");
      |                         ^~~~~~
main.c:29:25: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>

int output[50000];
int count=0;

void input(int);
int main(void){
	int n,i;
	while(true){
		scanf("%d",&n);
		if(n>0){
			input(n);
		}else{
			break;
		}
	}
	for(i=0;i<count;i++){
		if(output[i]!=0){
			printf("%d\n",output[i]);
		}else{
			printf("NA\n");
		}
	}
	
	return 0;
}
void input(int n){
	int e[4000];
	int p[1000000];
	int q[100000];
	int c[n];
	
	int i;
	
	for(i=0;i<n;i++){
		scanf("%d",&e[i]);
		scanf("%d",&p[i]);
		scanf("%d",&q[i]);
		c[i] = p[i]*q[i];
	}
	
	int j;
	
	for(i=0;i<n-1;i++){
		for(j=1;j<n;j++){
			if(e[i]==e[j]){
				c[i]=c[i]+c[j];
				c[j]=0;
			}
		}
	}
	int ch = 0;
	
	for(i=0;i<n-1;i++){
		if(c[i]>=1000000){
			output[count]=e[i];
			count++;
			ch = 1;
		}
	}
	if(ch == 0){
		output[count]=0;
		count++;
	}
}

Compiler output:
main.c: In function 'main':
main.c:9:15: error: 'true' undeclared (first use in this function)
    9 |         while(true){
      |               ^~~~
main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:9:15: note: each undeclared identifier is reported only once for each function it appears in
    9 |         while(true){
      |               ^~~~
Language: C

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#define N 4001
typedef struct {
	int num,
		sum,
		index;
}DATA;
void Initialization(DATA[],int *);
#include<stdio.h>
int main() {
	DATA d[N];
	int flg,n,e,p,q,index=1;
	while(scanf("%d",&n),n!=0){
		Initialization(d, &flg);
		for (n; n > 0; --n) {
			scanf("%d%d%d", &e, &p, &q);
			d[e].num = e;
			d[e].sum += p*q;
			if (d[e].index == 0)d[e].index = index++;
			flg = d[e].sum >= 1000000;
		}
		if (!flg) puts("NA");
		else {
			for (n = 1; n < index; n++) {
				for (int i = 1; i < N; i++) if (d[i].index == n&&d[i].sum >= 1000000) printf("%d\n", d[i].num);
			}
		}
	}
	return 0;
}

void Initialization(DATA d[],int *flg){
	int i;
	for (i = 1; i < N; i++) d[i] = { 0,0,0 };
	flg = 0;
}

Compiler output:
main.c: In function 'Initialization':
main.c:35:40: error: expected expression before '{' token
   35 |         for (i = 1; i < N; i++) d[i] = { 0,0,0 };
      |                                        ^
Language: C

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#define N 4001
typedef struct {
	int num,
		sum,
		index;
}DATA;
void Initialization(DATA[],int *);
#include<stdio.h>
int main() {
	DATA d[N];
	int flg,n,e,p,q,index=1,i;
	while(scanf("%d",&n),n!=0){
		Initialization(d, &flg);
		for (n; n > 0; --n) {
			scanf("%d%d%d", &e, &p, &q);
			d[e].num = e;
			d[e].sum += p*q;
			if (d[e].index == 0)d[e].index = index++;
			flg = d[e].sum >= 1000000;
		}
		if (!flg) puts("NA");
		else {
			for (n = 1; n < index; n++) {
				for (i = 1; i < N; i++) if (d[i].index == n&&d[i].sum >= 1000000) printf("%d\n", d[i].num);
			}
		}
	}
	return 0;
}

void Initialization(DATA d[],int *flg){
	int i;
	for (i = 1; i < N; i++) d[i] = { 0,0,0 };
	flg = 0;
}

Compiler output:
main.c: In function 'Initialization':
main.c:35:40: error: expected expression before '{' token
   35 |         for (i = 1; i < N; i++) d[i] = { 0,0,0 };
      |                                        ^
Language: C

#include<stdio.h>
void search(struct data *s, int t);
struct data
{
	int a;
	int b;
	int c;
};
int main(void)
{
	struct data base[50];
	int n, i;
	scanf("%d", &n);
	for(i=0;i<n;i++)
	{
		scanf("%d %d %d", &base[i].a, &base[i].b, &data[i].c);
	}
	search(base,n);
	return 0;
}
void search(struct data *s, int t)
{
	int u, i;
	for(i=0;i>b;i++)
	{
		u=(s->b)*(s->c);
		if(u>=1000000)
		{
			printf("%d\n", s->a);
		}
		s++;
	}
}

Compiler output:
main.c:2:20: warning: 'struct data' declared inside parameter list will not be visible outside of this definition or declaration
    2 | void search(struct data *s, int t);
      |                    ^~~~
main.c: In function 'main':
main.c:16:60: error: 'data' undeclared (first use in this function)
   16 |                 scanf("%d %d %d", &base[i].a, &base[i].b, &data[i].c);
      |                                                            ^~~~
main.c:16:60: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:16: error: passing argument 1 of 'search' from incompatible pointer type [-Wincompatible-pointer-types]
   18 |         search(base,n);
      |                ^~~~
      |                |
      |                struct data *
main.c:2:26: note: expected 'struct data *' but argument is of type 'struct data *'
    2 | void search(struct data *s, int t);
      |             ~~~~~~~~~~~~~^
main.c: At top level:
main.c:21:6: error: conflicting types for 'search'; have 'void(struct data *, int)'
   21 | void search(struct data *s, int t)
      |      ^~~~~~
main.c:2:6: note: previous declaration of 'search' with type 'void(struct data *, int)'
    2 | void search(struct data *s, int t);
      |      ^~~~~~
main.c: In function 'search':
main.c:24:19: error: 'b' undeclared (first use in this function)
   24 |         for(i=0;i>b;i++)
      |                   ^
Language: C

#include<stdio.h>
void search(struct data *s, int t);
struct data
{
	int a;
	int b;
	int c;
};
int main(void)
{
	struct data base[50];
	int n, i;
	scanf("%d", &n);
	for(i=0;i<n;i++)
	{
		scanf("%d %d %d", &base[i].a, &base[i].b, &base[i].c);
	}
	search(base,n);
	return 0;
}
void search(struct data *s, int t)
{
	int u, i;
	for(i=0;i>t;i++)
	{
		u=(s->b)*(s->c);
		if(u>=1000000)
		{
			printf("%d\n", s->a);
		}
		s++;
	}
}

Compiler output:
main.c:2:20: warning: 'struct data' declared inside parameter list will not be visible outside of this definition or declaration
    2 | void search(struct data *s, int t);
      |                    ^~~~
main.c: In function 'main':
main.c:18:16: error: passing argument 1 of 'search' from incompatible pointer type [-Wincompatible-pointer-types]
   18 |         search(base,n);
      |                ^~~~
      |                |
      |                struct data *
main.c:2:26: note: expected 'struct data *' but argument is of type 'struct data *'
    2 | void search(struct data *s, int t);
      |             ~~~~~~~~~~~~~^
main.c: At top level:
main.c:21:6: error: conflicting types for 'search'; have 'void(struct data *, int)'
   21 | void search(struct data *s, int t)
      |      ^~~~~~
main.c:2:6: note: previous declaration of 'search' with type 'void(struct data *, int)'
    2 | void search(struct data *s, int t);
      |      ^~~~~~
Language: C

#include<stdio.h>

int main(){
  int n;
  while(scanf("%d",&n), n){
    int i, k, num[4000], flag=0;
    long unitPrice[4000], saleQuantity[4000], earning[4000]={0};
    for(i=0; i<n; i++){
      scanf("%d%ld%ld", &num[i], &unitPrice[i], &saleQuantity[i]);
      earning[i] = unitPrice[i]*saleQuantity[i];
      for(k=0; k<i; k++){
        if(num[i] == num[k]){
          earning[k] = earning[i] + earning[k];
          earning[i] = 0;
        }
      }
    }

    for(i=0; i<n; i++){
      if(earning[i]>=1000000){
	printf("%d\n", num[i]);
	flag+=1;
      }
    }
    if(flag == 0){
      printf("NA\n");
    }
    flag2 += 1;
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:28:5: error: 'flag2' undeclared (first use in this function); did you mean 'flag'?
   28 |     flag2 += 1;
      |     ^~~~~
      |     flag
main.c:28:5: note: each undeclared identifier is reported only once for each function it appears in