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

public static void main(String[] args) {
		// TODO Auto-generated method stub
		int input=32;
		System.out.println("Input:"+input);
		System.out.print("Output:");
		System.out.println(weight(input));
	}
	public static String weight(int num){		//num=蛟、縲〔=菫よ焚
		int number=num;
		String sub="";		//途中経過
		String result="";	//結果
		int k=0;
		
		while(number>1){
			//int ans=number%2;
			//System.out.println("number="+number);
			int ans=(number%2);
			sub=ans+","+sub;
			number=number/2;
			k++;
		}
		sub=number+","+sub;
		//System.out.println("sub:"+sub);
		String[] div_sub=sub.split(",");
		for(int i=0;i<div_sub.length;i++){
			int x=(int)Math.pow((double)2,(double)(k-i));
			int ans=x*Integer.parseInt(div_sub[i]);
			//System.out.println("ans("+(k-i)+","+x+")="+ans);
			if(ans!=0){
				if(!result.equals(""))result=ans+" "+result;
				else result=""+ans;	
			}
		}
		return result;
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception{
		// TODO Auto-generated method stub
		//int input=32;
		BufferedReader input_a =
				new BufferedReader (new InputStreamReader (System.in));
		int input = Integer.parseInt(input_a.readLine());
		//System.out.println("Input:"+input);
		//System.out.print("Output:");
		System.out.println(weight(input));
	}
	public static String weight(int num){		//num=蛟、縲〔=菫よ焚
		int number=num;
		String sub="";		//途中経過
		String result="";	//結果
		int k=0;
		
		while(number>1){
			//int ans=number%2;
			//System.out.println("number="+number);
			int ans=(number%2);
			sub=ans+","+sub;
			number=number/2;
			k++;
		}
		sub=number+","+sub;
		//System.out.println("sub:"+sub);
		String[] div_sub=sub.split(",");
		for(int i=0;i<div_sub.length;i++){
			int x=(int)Math.pow((double)2,(double)(k-i));
			int ans=x*Integer.parseInt(div_sub[i]);
			//System.out.println("ans("+(k-i)+","+x+")="+ans);
			if(ans!=0){
				//if(!result.equals(""))result=ans+" "+result;
				if(!result.equals(""))result=ans+","+result;
				else result=""+ans;	
			}
		}
		return result;
	}
}

Compiler output:
Main.java:9: error: cannot find symbol
		BufferedReader input_a =
		^
  symbol:   class BufferedReader
  location: class Main
Main.java:10: error: cannot find symbol
				new BufferedReader (new InputStreamReader (System.in));
				    ^
  symbol:   class BufferedReader
  location: class Main
Main.java:10: error: cannot find symbol
				new BufferedReader (new InputStreamReader (System.in));
				                        ^
  symbol:   class InputStreamReader
  location: class Main
3 errors
Language: C

#include <stdio.h>
int main(void)
{
    int a[10],int c[10]={0},i,inp,same;
    a[0]=1,a[1]=2,a[2]=4,a[3]=8,a[4]=16,a[5]=32,a[6]=64,a[7]=128,a[8]=256,a[9]=512;
    for(;scanf("%d",&inp)!=EOF;)
    {
        c[10]={0};
        same=inp;
        if(inp%2!=0)
        {
            c[0]=1;
            inp-=1;
        }
        for(i=9;i>=0;i--)
        {
            if(same-a[i]>=0)
            {
                c[i]=1;
                same-=a[i];
            }
        }
        for(i=0;i<10;i++)
        {
            if(c[i]==1)
            {
                printf("%d ",a[i]);
            }
            if(i==9)
            {
                printf("\n");
            }
        }
    }
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:15: error: expected identifier or '(' before 'int'
    4 |     int a[10],int c[10]={0},i,inp,same;
      |               ^~~
main.c:4:28: error: expected expression before ',' token
    4 |     int a[10],int c[10]={0},i,inp,same;
      |                            ^
main.c:4:29: error: 'i' undeclared (first use in this function)
    4 |     int a[10],int c[10]={0},i,inp,same;
      |                             ^
main.c:4:29: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:31: error: 'inp' undeclared (first use in this function); did you mean 'int'?
    4 |     int a[10],int c[10]={0},i,inp,same;
      |                               ^~~
      |                               int
main.c:4:35: error: 'same' undeclared (first use in this function)
    4 |     int a[10],int c[10]={0},i,inp,same;
      |                                   ^~~~
main.c:8:9: error: 'c' undeclared (first use in this function)
    8 |         c[10]={0};
      |         ^
main.c:8:15: error: expected expression before '{' token
    8 |         c[10]={0};
      |               ^
Language: C

#include<stdio.h>
int main() {
  int i, n;
  while (scanf("%d", &n) != EOF) {
    for (i = 0; i < 10; i ++) {
      if (n & 1 << i) i{
	printf("%d", 1 << i); break;
      }
    for (i = 0; i < 10; i ++) {
      if (n & 1 << i) printf(" %d", 1 << i);
    }
    printf("\n");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:24: error: expected ';' before '{' token
    6 |       if (n & 1 << i) i{
      |                        ^
      |                        ;
main.c:15:1: error: expected declaration or statement at end of input
   15 | }
      | ^
Language: C

#include<stdio.h>
int main() {
  int i, n;
  while (scanf("%d", &n) != EOF) {
    for (i = 0; i < 10; i ++) {
      if (n & 1 << i) {
	printf("%d", 1 << i); break;
      }
    for (i = 0; i < 10; i ++) {
      if (n & 1 << i) printf(" %d", 1 << i);
    }
    printf("\n");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:1: error: expected declaration or statement at end of input
   15 | }
      | ^
Language: C

#include<stdio.h>
int main() {
  int i, j, n;
  while (scanf("%d", &n) != EOF) {
    for (h = 0; j < 10; j ++) {
      if (n & 1 << j) {
	printf("%d", 1 << i); break;
      }
    }
    for (i = j; i < 10; i ++) {
      if (n & 1 << i) printf(" %d", 1 << i);
    }
    printf("\n");
  }
  return 0;
}

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

#include <stdio.h>
int main()
{
int i, n;
while (scanf("%d", &n) != EOF){
for (i = 1; i <= 512; i *= 2){
if (n % (i * 2) != 0){
printf("%d", i);
n -= i;
if (n != 0){
printf(" ");
}
}
if (n == 0){
puts("");
break;
}
}
}
return 0;

Compiler output:
main.c: In function 'main':
main.c:20:1: error: expected declaration or statement at end of input
   20 | return 0;
      | ^~~~~~
Language: C

#include <cstdio>
#include <algorithm>

using namespace std;

int main()
{
	int n, c;
	int a[10] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 516};
	int b[10];
	
	while (scanf("%d", &n) != EOF){
		c = 0;
		for (int i = 9; 0 <= i; i--){
			if (n >= a[i]){
				n -= a[i];
				b[c] = a[i];
				c++;
			}
		}
		reverse(b, b + c);
		for (int i = 0; i < c; i++){
			printf("%d", b[i]);
			if (i < c - 1){
				printf(" ");
			}
		}
		
		printf("\n");
	}
	return (0);
}

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

#niclude<stdio.h>
int main(){
int a,x[12],k,i;
while(scanf("%d",&a)!=EOF){
k=0;
if(a>=512){
x[k++]=512;
a-=512;
if(a>=256){
x[k++]=256;
a-=256;
}
if(a>=128){
x[k++]=128;
a-=128;
}
if(a>=64){
x[k++]=64;
a-=64;
}
if(a>=32){
x[k++]=32;
a-=32;
}
if(a>=16){
x[k++]=16;
a-=16;
}
if(a>=8){
x[k++]=8;
a-=8;
}
if(a>=4){
x[k++]=4;
a-=4;
}
if(a>=2){
x[k++]=2;
a-=2;
}
if(a>=1;){
x[k++]=1;
a-=1;
}
if(a==0)
for(i=k-1;i>=0;i--)
printf("%d ",x[i]);
printf("\n");
}
return 0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #niclude; did you mean #include?
    1 | #niclude<stdio.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:4:7: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 | while(scanf("%d",&a)!=EOF){
      |       ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #niclude<stdio.h>
main.c:4:7: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 | while(scanf("%d",&a)!=EOF){
      |       ^~~~~
main.c:4:7: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:23: error: 'EOF' undeclared (first use in this function)
    4 | while(scanf("%d",&a)!=EOF){
      |                       ^~~
main.c:4:23: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:4:23: note: each undeclared identifier is reported only once for each function it appears in
main.c:41:8: error: expected ')' before ';' token
   41 | if(a>=1;){
      |   ~    ^
      |        )
main.c:47:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   47 | printf("%d ",x[i]);
      | ^~~~~~
main.c:47:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:47:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:47:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:48:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   48 | printf("\n");
      | ^~~~~~
main.c:48:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:51:1: error: expected declaration or statement at end of input
   51 | }
      | ^
Language: C

main(f,n,x){
  for(;~scanf("%d",&n);puts("")){
    for(f=0,x=1;n;x+=x){
      if(n&x){
        if(f)putchar(' ');
        printf("%d",x),n-=x,f=1;
      }
    }
  }
  return 0;
}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(f,n,x){
      | ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'f' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'x' defaults to 'int' [-Wimplicit-int]
main.c:2:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    2 |   for(;~scanf("%d",&n);puts("")){
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(f,n,x){
main.c:2:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    2 |   for(;~scanf("%d",&n);puts("")){
      |         ^~~~~
main.c:2:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:2:24: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
    2 |   for(;~scanf("%d",&n);puts("")){
      |                        ^~~~
main.c:2:24: note: include '<stdio.h>' or provide a declaration of 'puts'
main.c:5:14: error: implicit declaration of function 'putchar' [-Wimplicit-function-declaration]
    5 |         if(f)putchar(' ');
      |              ^~~~~~~
main.c:5:14: note: include '<stdio.h>' or provide a declaration of 'putchar'
main.c:6:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 |         printf("%d",x),n-=x,f=1;
      |         ^~~~~~
main.c:6:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>

int main(){
  while(scanf("%d", &d) != EOF){
    int d, first;
    first = 1;
    while(d){
      if(!first)putchar(' ');
      first = 0;
      printf("%d", d & -d);
      d -= d & -d;
    }
    puts("");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:22: error: 'd' undeclared (first use in this function)
    4 |   while(scanf("%d", &d) != EOF){
      |                      ^
main.c:4:22: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int n;int i;bool f;int main(){while(scanf("%d",&n)!=EOF){f=true;for(i=0;i<10;i++)if(n>>i&1){if(f){printf("%d",1<<i);f=false;}else printf(" %d",1<<i);}printf("\n");}}

Compiler output:
main.c:2:13: error: unknown type name 'bool'
    2 | int n;int i;bool f;int main(){while(scanf("%d",&n)!=EOF){f=true;for(i=0;i<10;i++)if(n>>i&1){if(f){printf("%d",1<<i);f=false;}else printf(" %d",1<<i);}printf("\n");}}
      |             ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | int n;int i;bool f;int main(){while(scanf("%d",&n)!=EOF){f=true;for(i=0;i<10;i++)if(n>>i&1){if(f){printf("%d",1<<i);f=false;}else printf(" %d",1<<i);}printf("\n");}}
main.c: In function 'main':
main.c:2:60: error: 'true' undeclared (first use in this function)
    2 | int n;int i;bool f;int main(){while(scanf("%d",&n)!=EOF){f=true;for(i=0;i<10;i++)if(n>>i&1){if(f){printf("%d",1<<i);f=false;}else printf(" %d",1<<i);}printf("\n");}}
      |                                                            ^~~~
main.c:2:60: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:2:60: note: each undeclared identifier is reported only once for each function it appears in
main.c:2:119: error: 'false' undeclared (first use in this function)
    2 | int n;int i;bool f;int main(){while(scanf("%d",&n)!=EOF){f=true;for(i=0;i<10;i++)if(n>>i&1){if(f){printf("%d",1<<i);f=false;}else printf(" %d",1<<i);}printf("\n");}}
      |                                                                                                                       ^~~~~
main.c:2:119: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include<stdio.h>
int main(void)
{
    int x;
    int i;
    int cnt = 0;
    int a[10]={1,2,4,8,16,32,64,128,256,512},check[10]={0};

    while(scanf("%d",&x)!=EOF){
        for(i = 9;i >= 0; i--){
            if(x >= a[i] && check[i] == 0){
                check[i] = 1;
                x -= a[i];
                if(cnt == 0)cnt = a[i];
            }
        for(i = 0;i < 10; i++){
            if(check[i] == 1){
                printf("%d",a[i]);
                if(a[i] == cnt)printf("\n");
                else printf(" ");
            }
        }
        cnt = 0;
        for(i = 0;i < 10; i++)check[i] = 0;
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:27:1: error: expected declaration or statement at end of input
   27 | }
      | ^
Language: C

#include <cstdio>
#include <cmath>
#include <vector>
#define pb push_back
using namespace std;
int main(void)
{
	int n,b;
	vector<int> vec;
	while(scanf("%d",&n)!=EOF)
	{
		b=n;
		vec.clear();
		while(b>0)
		{
			vec.pb(b%2);
			b/=2;
		}
		int size = vec.size();
		for(int i=0;i<size;i++)
		{
			if(vec[i])
			{
				printf("%d",(int)(pow(2,i)));
				(i==size-1) ? printf("\n") : printf(" ");
			}
			else
			{
				if(i==size-1)printf("\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>
#include <math.h>

int main(void)
{
	int w;
	int i;
	
	while (scanf("%d", &w) != EOF){
		int weight[10] = {0};
		int n;
		
		for (i = 9; i >= 0; i--){
			if (w - (int)pow(2, i) >= 0){
				weight[i] = 1;
				w -= (int)pow(2, i);
			}
		}
		for (i = 0; i < 10; i++){
			if (!i && weight[i]){
				printf("%d", (int)pow(2, i);
			else if (weight[i]){
				printf(" %d", (int)pow(2, i);
			}
		}
		puts("");
	}
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:21:60: error: expected ')' before ';' token
   21 |                                 printf("%d", (int)pow(2, i);
      |                                       ~                    ^
      |                                                            )
main.c:26:26: error: expected ';' before '}' token
   26 |                 puts("");
      |                          ^
      |                          ;
   27 |         }
      |         ~                 
main.c:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
main.c:30:1: error: expected declaration or statement at end of input
Language: C

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

int main(void)
{
	int w;
	int i;
	
	while (scanf("%d", &w) != EOF){
		int weight[10] = {0};
		int n;
		
		for (i = 9; i >= 0; i--){
			if (w - (int)pow(2, i) >= 0){
				weight[i] = 1;
				w -= (int)pow(2, i);
			}
		}
		for (i = 0; i < 10; i++){
			if (!i && weight[i]){
				printf("%d", (int)pow(2, i);
			else if (weight[i]){
				printf(" %d", (int)pow(2, i));
			}
		}
		puts("");
	}
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:21:60: error: expected ')' before ';' token
   21 |                                 printf("%d", (int)pow(2, i);
      |                                       ~                    ^
      |                                                            )
main.c:24:26: error: expected ';' before '}' token
   24 |                         }
      |                          ^
      |                          ;
   25 |                 }
      |                 ~         
main.c:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
Language: C++

while gets
    g=$_.chomp.to_i
    h=Array.new
    loop do
        break if(g==0)
        h<<g%2
        g=g/2
    end
    ans=[]
    h.each_with_index{|item,num| ans<<item*2**num if(item*2**num!=0)}
    puts ans.join(" ")
end

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while gets
      | ^~~~~
a.cc:11:5: error: 'puts' does not name a type
   11 |     puts ans.join(" ")
      |     ^~~~
Language: C++

while g=gets
    g=g.chomp.to_i
    h=Array.new
    loop do
        break if(g==0)
        h<<g%2
        g=g/2
    end
    ans=[]
    h.each_with_index{|item,num| ans<<item*2**num if(item*2**num!=0)}
    puts ans.join(" ")
end

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while g=gets
      | ^~~~~
a.cc:11:5: error: 'puts' does not name a type
   11 |     puts ans.join(" ")
      |     ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <functional>
#include <string>
#include <algorithm>
#include <climits>
#include <utility>

#define PRINT(STR) cout << STR << endl;
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); (i)++)
#define REG(i, a, b) for (int (i) = ((int)(a)); (i) < ((int)(b)); i++)
#define ALL(V) (V).begin(), (V).end()
#define SPACE " "

typedef long long ll;

using namespace std;

int nextInt() { int n = -1; cin >> n; return n; }
double nextDouble() { double d = -1; cin >> d; return d; }
ll nextll() { ll n = -1; cin >> n; return n; }
string nextString() { string str; cin >> str; return str; }

int INF = 1LL << 25;
double EPS = 1e-9;
int numofbits(int bits)
{
    bits = (bits & 0x55555555) + (bits >> 1 & 0x55555555);
    bits = (bits & 0x33333333) + (bits >> 2 & 0x33333333);
    bits = (bits & 0x0f0f0f0f) + (bits >> 4 & 0x0f0f0f0f);
    bits = (bits & 0x00ff00ff) + (bits >> 8 & 0x00ff00ff);
    return (bits & 0x0000ffff) + (bits >>16 & 0x0000ffff);
}

// BEGIN //////////////////////////////////////////////////////////////
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    if (n == 0) {
      cout << 0 << endl;
      continue;
    }
    vector<int> ans;
    if (n % 2 == 1) {
      n -= 1;
      ans.push_back(1);
    }
    int t = 2;
    while (n) {
      if (numofbits(n) == 1) {
        ans.push_back(n);
        break;
      }
      n -= t;
      ans.push_back(t);
      t *= 2;
    }
    REP(i, ans.size() - 1) {
      cout << ans[i] << SPACE;
    }
    cout << ans[ans.size() - 1]endl;
  }
	return 0;
}
// END   //////////////////////////////////////////////////////////////

Compiler output:
a.cc: In function 'int main()':
a.cc:69:32: error: expected ';' before 'endl'
   69 |     cout << ans[ans.size() - 1]endl;
      |                                ^~~~
      |                                ;
Language: C++

#include<iostream>

using namespace std;

bool a[10];

int main(){
    
    int N;
    int i=0;
    
    while(!cin.eof())
    {
        cin>>N;
        
        for(j=0;j<10;j++)
        {
            a[j]=0;
        }
        
        i=0;
        
        if(i+512 <= N){
            i += 512;
            a[9] = 1;
        }

        if(i+256 <= N){
            i += 256;
            a[8] = 1;
        }
        
        if(i+128 <= N){
            i += 128;
            a[7] = 1;
        }
        
        if(i+64 <= N){
            i += 64;
            a[6] = 1;
        }
        
        if(i+32 <= N){
            i += 32;
            a[5] = 1;
        }
        
        if(i+16 <= N){
            i += 16;
            a[4] = 1;
        }
        
        if(i+8 <= N){
            i += 8;
            a[3] = 1;
        }
        
        if(i+4 <= N){
            i += 4;
            a[2] = 1;
        }
        
        if(i+2 <= N){
            i += 2;
            a[1] = 1;
        }
        
        if(i+1 <= N){
            i += 1;
            a[0] = 1;
        }
        
        cout<<a[0]<<" "<<a[1]<<" "<<a[2]<<" "<<a[3]<<" "<<a[4]<<" "<<a[5]
            <<" "<<a[6]<<" "<<a[7]<<" "<<a[8]<<" "<<a[9]<<" "<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'j' was not declared in this scope
   16 |         for(j=0;j<10;j++)
      |             ^
Language: C++

import std.stdio;
import std.array;
import std.conv;
import std.algorithm;
import std.math;
void main() {
	string s;
	while( (s=readln()).length != 0 ){
		string[] input = split(s);
		int a = to!int(input[0]);
		for(int i=0;i<10;i++){
			if(a%2==1) write(pow(2,i)," ");
			a/=2;
		}
			writeln();
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import std.stdio;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import std.array;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import std.conv;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import std.algorithm;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import std.math;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: '::main' must return 'int'
    6 | void main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'string' was not declared in this scope
    7 |         string s;
      |         ^~~~~~
a.cc:8:17: error: 's' was not declared in this scope
    8 |         while( (s=readln()).length != 0 ){
      |                 ^
a.cc:8:19: error: 'readln' was not declared in this scope
    8 |         while( (s=readln()).length != 0 ){
      |                   ^~~~~~
a.cc:9:24: error: expected primary-expression before ']' token
    9 |                 string[] input = split(s);
      |                        ^
a.cc:10:25: error: 'to' was not declared in this scope
   10 |                 int a = to!int(input[0]);
      |                         ^~
a.cc:12:42: error: 'pow' was not declared in this scope
   12 |                         if(a%2==1) write(pow(2,i)," ");
      |                                          ^~~
a.cc:12:36: error: 'write' was not declared in this scope
   12 |                         if(a%2==1) write(pow(2,i)," ");
      |                                    ^~~~~
a.cc:15:25: error: 'writeln' was not declared in this scope
   15 |                         writeln();
      |                         ^~~~~~~
Language: C++

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		
		while(scan.hasNext()){
			int w = scan.nextInt();
			int i = 1;
			StringBuffer sb = new StringBuffer();
			sb.setLength(0);
			while(w / 2 > 1){
				if(w % 2 == 1){
					sb.append(i).append(' ');
				}
				w /= 2;
				i = i << 1;
			}
			sb.append(i);
			String s = sb.toString().trim();
			System.out.printf("%s\n", s);
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main{
      | ^~~~~~
Language: C++

 
 #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 
 using namespace std;
 
 int arr[10]={1,2,4,8,16,32,64,128,256,512};
 int num[10]={0}; 
  
 int main()
 {
   int N;
   while(cin>>N)
   {
     int count=0;
     while(N)
     {
       num[count++]=N%2;
       N/=2;        
     }      
     for(int i=0;i<count-1;i++) cout<<num[i]<<" "
     cout<<num[count-1]<<endl;           
   }
   //while(1);     
   return 0;  
 }
 

Compiler output:
a.cc: In function 'int main()':
a.cc:33:50: error: expected ';' before 'cout'
   33 |      for(int i=0;i<count-1;i++) cout<<num[i]<<" "
      |                                                  ^
      |                                                  ;
   34 |      cout<<num[count-1]<<endl;
      |      ~~~~
Language: C++

 
 #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 
 using namespace std;
 
 int arr[10]={1,2,4,8,16,32,64,128,256,512}; 
  
 int main()
 {
   int N;
   while(cin>>N)
   {
     int count=0;
     int num[10]={0};
     while(N)
     {
       num[count++]=N%2;
       N/=2;        
     }      
     for(int i=0;i<count-1;i++)
     {
       if(num[i]) cout<<arr[i]<<" ";
     }
     if(num[count-1]) cout<<arr[i]<<endl;
     else cout<<endl;           
   }
   //while(1);     
   return 0;  
 }
 

Compiler output:
a.cc: In function 'int main()':
a.cc:37:33: error: 'i' was not declared in this scope
   37 |      if(num[count-1]) cout<<arr[i]<<endl;
      |                                 ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  
  int n,b;
  int a[10],i;
  while(cin >> n){
    fill_n(a,10,1024);
    b = 512;
    i=0;
    
    while(n != 0){
      if(n >= b){
	a[i] = b;
	i++;
	n -= b;
      }
      b /= 2;
    }
    sort(a,a+10);
    for(int j = 0;j < i;j++){
      if(j == i-1) cout << a[j] << endl;
      else cout << a[j] << ' ';
    }
  }

  return (0);
}

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

#include<iostream>
using namespace std;
int main(){
  
  int n,b;
  int a[10],i;
  while(cin >> n){
    fill_n(a,10,1024);
    b = 512;
    i=0;
    
    while(n != 0){
      if(n >= b){
	a[i] = b;
	i++;
	n -= b;
      }
      if(b == 1) b--;
      else b /= 2;
    }
    sort(a,a+10);
    for(int j = 0;j < i;j++){
      if(j == i-1) cout << a[j] << endl;
      else cout << a[j] << ' ';
    }
  }

  return (0);
}

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

#include<stdio.h>
int main(){
int a,x[12],k,i;
while(scanf("%d",&a)!=EOF){
k=0;
if(a>=512){
x[k++]=512;
a-=512;
if(a>=256){
x[k++]=256;
a-=256;
}
if(a>=128){
x[k++]=128;
a-=128;
}
if(a>=64){
x[k++]=64;
a-=64;
}
if(a>=32){
x[k++]=32;
a-=32;
}
if(a>=16){
x[k++]=16;
a-=16;
}
if(a>=8){
x[k++]=8;
a-=8;
}
if(a>=4){
x[k++]=4;
a-=4;
}
if(a>=2){
x[k++]=2;
a-=2;
}
if(a>=1){
x[k++]=1;
a-=1;
}
if(a==0)
for(i=k-1;i>=0;i--)
printf("%d ",x[i]);
printf("\n");
}
return 0;
}

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

#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
  int x;
  while (scanf("%d ", &x) == 1) {
    int omori = 512;
    while (x != 0)
      if (x % omori == 0) {
	x -= omori;
	cout << omori << " ";
	omori /= 2;
      }
    }
  }
  return 0;
}

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

#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
  while (true) {
    int omori = 512, x;
    scanf("%d", &x);
    do {
      if (x % omori == 0) {
	x -= omori;
	cout << omori << " ";
	omori /= 2;
      }
    } while (x != 0);
  }
  return 0;
}
#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
  while (scanf("%d ", &x) == 1) {
    int omori = 512;
    while (x != 0) {
      if (x >= omori) {
	x -= omori;
	cout << omori << " ";
	omori /= 2;
      }
    }
    cout << endl;
  }
  return 0;
}

Compiler output:
a.cc:26:5: error: redefinition of 'int main()'
   26 | int main()
      |     ^~~~
a.cc:6:5: note: 'int main()' previously defined here
    6 | int main()
      |     ^~~~
a.cc: In function 'int main()':
a.cc:28:24: error: 'x' was not declared in this scope
   28 |   while (scanf("%d ", &x) == 1) {
      |                        ^
Language: C++

#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
  while (scanf("%d ", &x) == 1) {
    int omori = 512;
    while (x != 0) {
      if (x >= omori) {
	x -= omori;
	cout << omori << " ";
	omori /= 2;
      }
    }
    cout << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: 'x' was not declared in this scope
    8 |   while (scanf("%d ", &x) == 1) {
      |                        ^
Language: C++

#include <iostream>
using namespace std;

int weight[10];
weight[1]=1;
for(int i = 2;i<=9;i++)weight[i]=2*weight[i-1];


int main(){
	while(true)
	{
	int object;
	cin >> object;
	if (cin.eof())break;
	for(int i =1;int <=9;i++){
		if(object%2==1)
			{
			cout << weight[i] ;
			if( i != 9 ) cout << " ";
			}
		}
	cout << endl;
	}
	
	return 0;
}

Compiler output:
a.cc:5:1: error: 'weight' does not name a type
    5 | weight[1]=1;
      | ^~~~~~
a.cc:6:1: error: expected unqualified-id before 'for'
    6 | for(int i = 2;i<=9;i++)weight[i]=2*weight[i-1];
      | ^~~
a.cc:6:15: error: 'i' does not name a type
    6 | for(int i = 2;i<=9;i++)weight[i]=2*weight[i-1];
      |               ^
a.cc:6:20: error: 'i' does not name a type
    6 | for(int i = 2;i<=9;i++)weight[i]=2*weight[i-1];
      |                    ^
a.cc: In function 'int main()':
a.cc:15:26: error: expected unqualified-id before '<=' token
   15 |         for(int i =1;int <=9;i++){
      |                          ^~
Language: C++

#include <iostream>
#include <cstdlib>

#define TRUE 1
#define FALSE 0

int use_num[10];

int get_input(void) {
    int i;
    std::cin >> i;
    if (std::cin.fail()) 
        exit(0);
    return i;
}

int power(int m, int n) {
    int acc = 1;
    for (int i = 0; i < n; i++) {
        acc *= m;
    }
    return acc;
}    

void solve(int weight) {
    for (int i = 9; i >= 0; i--) {
        if (power(2, i) > weight) {
            use_num[i] = FALSE;
        } else {
            use_num[i] = TRUE;
            weight -= power(2, i);
        }
    }
}

void output(void) {
    for (int i = 0; i <= 8; i++) {
        if (use_num[i] != FALSE) {
            std::cout << power(2, i) << ' ';
        }
    }
    if (use_num[9] != FALSE) {
        std::cout << power(2, i);
    }
    std::cout << std::endl;
}

int main(void) {
    int weight;
    while (weight = get_input()) {
        solve(weight);
        output();
    }
    return 0;
}

Compiler output:
a.cc: In function 'void output()':
a.cc:43:31: error: 'i' was not declared in this scope
   43 |         std::cout << power(2, i);
      |                               ^
Language: C++

#include <iostream>

using namespace std;
int weight[] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512};
void solve()
{
	int a;
	while(cin >> a)
	{
		bool flag[10];
		memset(flag, 0, sizeof(bool)  * 10);
		for(int i = 9; i >= 0; --i)
		{
			if(a / weight[i])
			{
				flag[i] = true;
			}
			a %= weight[i];
		}
		for(int i = 0; i < 9; ++i)
		{
			if(flag[i])
			{
				cout << weight[i] << " ";
			}
		}
		if(flag[9])
		{
			cout << weight[9];
		}
		cout << endl;
	}
}

int main()
{
	solve();
	return(0);
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:11:17: error: 'memset' was not declared in this scope
   11 |                 memset(flag, 0, sizeof(bool)  * 10);
      |                 ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

n,k;main(a){for(;~scanf("%d",&n);puts())for(k=1;n;n^=a)k=!printf(k+" %d",a=n&-n);}

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n,k;main(a){for(;~scanf("%d",&n);puts())for(k=1;n;n^=a)k=!printf(k+" %d",a=n&-n);}
      | ^
a.cc:1:9: error: expected constructor, destructor, or type conversion before '(' token
    1 | n,k;main(a){for(;~scanf("%d",&n);puts())for(k=1;n;n^=a)k=!printf(k+" %d",a=n&-n);}
      |         ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
#define INF 100000



int main(){
	int w;
	bool ans[10];
	for(int i=0;i<9;i++){
		ans[i]=0;
	}
	while(cin>>w){
		for(int i=10;i--;){
			if(w>=pow(2,i)){
				ans[i]=1;
				w=w-pow(2,i);
			}
		}
		
		if(ans[0]){
			cout<<1;
		}
		for(int i=1;i<11;i++){
			if(ans[i]){
				cout<<" "<<pow(2,i);
			}
		}cout<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:31: error: 'pow' was not declared in this scope
   16 |                         if(w>=pow(2,i)){
      |                               ^~~
a.cc:27:44: error: 'pow' was not declared in this scope
   27 |                                 cout<<" "<<pow(2,i);
      |                                            ^~~
Language: C++

#include <iostream>
using namespace std;
int main(){
int n;
int g;
while(cin >>n){
g=1;
while(g<1000){
if(n%(2*g)==g&&n!=0;){cout <<g<<" "; n=n-g;}
else if(n%(2*g)==g&&n==g){cout <<g<<endl; n=n-g;}
g=g*2;}
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: expected primary-expression before ')' token
    9 | if(n%(2*g)==g&&n!=0;){cout <<g<<" "; n=n-g;}
      |                     ^
Language: C++

#include <iostream>
using namespace std;
int factorial(int n){
	if(n==0) return 1 ; else return(2*factorial(n-1)) ;
}
int main(){
	int x;
	while(cin>>x){
		int ans[10]={0};int ptr=0;int sum=0;
		for(int i=9;i>=0;i--){
			if(x==sum) break;
			int temp=factorial(i);
			if(x>=sum+temp) {ans[ptr++]=temp;sum+=temp;};
		};
		for(int i=ptr-1;i>=0;i--){
		if(i!=ptr-1) cout << ' ' ; cout << ans[i] ;
		};
		cout << '\n' ;
	};

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

#include <stdio.h>

int main(void)
{
int n;
while (scanf("%d", &n) != EOF){
int i;
if ((n & 1) != 0) {
printf("1");
}
for (i = 1; i < 20; i++)
{
if (((n >> i) & 1) != 0
printf(" %d", 2 << i);
}
}
puts("");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: expected ';' before 'printf'
   13 | if (((n >> i) & 1) != 0
      |                        ^
      |                        ;
   14 | printf(" %d", 2 << i);
      | ~~~~~~                  
a.cc:15:1: error: expected primary-expression before '}' token
   15 | }
      | ^
a.cc:14:23: error: expected ')' before '}' token
   14 | printf(" %d", 2 << i);
      |                       ^
      |                       )
   15 | }
      | ~                      
a.cc:13:4: note: to match this '('
   13 | if (((n >> i) & 1) != 0
      |    ^
a.cc:15:1: error: expected primary-expression before '}' token
   15 | }
      | ^
Language: C++

#include <stdio.h>

int main(void)
{
int n;
while (scanf("%d", &n) != EOF){
int i;
if ((n & 1) != 0) {
printf("1");
}
for (i = 1; i < 20; i++)
{
if (((n >> i) & 1) != 0){
printf(" %d", 2 << i);
}
}
puts("");
}

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

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

int main(){
	int n;
	while(cin >> n;){ 
		int weight[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
		for(int i = 9; i >= 0; i--){
			if(n >= pow(2, i)){
				n -= pow(2, i);
				weight[i] = 1;
			}
		}

		cout << "1";
		for(int i = 1; i < 10; i++){
			if(weight[i]){
				cout << " " << pow(2, i);
			}
		}
		cout << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: expected ')' before ';' token
    7 |         while(cin >> n;){
      |              ~        ^
      |                       )
a.cc:7:24: error: expected primary-expression before ')' token
    7 |         while(cin >> n;){
      |                        ^
Language: C++

#include<iostream>
using namesapce std;
int main(){
  int n,bell,heavy[1000]={0};
  while(cin >> n){
    bell=0;
    if(n>=512){
      n-=512;
      heavy[512]++;
    }
    if(n>=256){
      n-=256;
      heavy[256]++;
    }
    if(n>=128){
      n-=128;
      heavy[128]++;
    }
    if(n>=64){
      n-=64;
      heavy[64]++;
    }
    if(n>=32){
      n-=32;
      heavy[32]++;
    }
    if(n>=16){
      n-=16;
      heavy[16]++;
    }
    if(n>=8){
      n-=8;
      heavy[8]++;
    }
    if(n>=4){
      n-=4;
      heavy[4]++;
    }
    if(n>=2){
      n-=2;
      heavy[2]++;
    }
    if(n>=1){
      n-=1;
      heavy[1]++;
    }
    for(int i=512;i!=0;i/=2){
      if(heavy[i]!=0){
	if(bell==0){
	  cout << i << endl;
	}
	else{
	  cout << " " << i;
	}
      }
    }
    cout << endl;
  }
  return (0);
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesapce'
    2 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   while(cin >> n){
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:50:11: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   50 |           cout << i << endl;
      |           ^~~~
      |           std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:50:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   50 |           cout << i << endl;
      |                        ^~~~
      |                        std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:53:11: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   53 |           cout << " " << i;
      |           ^~~~
      |           std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:57:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   57 |     cout << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:57:13: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   57 |     cout << endl;
      |             ^~~~
      |             std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
 
int main()
{
    const int weight[] = {1,2,4,8,16,32,64,128,256,512};
 
    std::vector<int> answer;
 
    int n;
 
    while(std::cin >> n)
    {
        for(size_t i=0; i<10; ++i)
        {
            if(n/weight[9-i])
            {
 
                answer.push_back(weight[9-i]);
 
                n = n%weight[9-i];
            }
        }
 
        for(size_t i=0; i<answer.size()-1; ++i)
        {
            std::cout << answer[answer.size()-1-i] << ' ';
        }
 
        std::cout << answer[0] << '\n';
 
        answer.clear();
    }
 
}
Compile Error Logs:

Status
Judge: 1/1 	C++ 	CPU: 00.00 sec 	Memory: 1212 [KB] 	Length: 476 [B] 	2012-08-29 02:02 	2012-08-29 02:02
Results for testcases
							
Case #1: 	: Accepted 	- 	- 	- 	NA 	- 	NA
< | 	1 	/ 	1 	| > 	  	 : Accepted        -        -
 
Input #1 ( ) 		Output #1 ( )

Not available.

		

Not available.

Comments
 
 Under Construction.
 
Categories
 
 
Free Tags
 
 

Compiler output:
a.cc:40:94: error: invalid digit "8" in octal constant
   40 | Judge: 1/1      C++     CPU: 00.00 sec  Memory: 1212 [KB]       Length: 476 [B]         2012-08-29 02:02        2012-08-29 02:02
      |                                                                                              ^~
a.cc:40:118: error: invalid digit "8" in octal constant
   40 | Judge: 1/1      C++     CPU: 00.00 sec  Memory: 1212 [KB]       Length: 476 [B]         2012-08-29 02:02        2012-08-29 02:02
      |                                                                                                                      ^~
a.cc:43:6: error: stray '#' in program
   43 | Case #1:        : Accepted      -       -       -       NA      -       NA
      |      ^
a.cc:46:7: error: stray '#' in program
   46 | Input #1 ( )            Output #1 ( )
      |       ^
a.cc:46:32: error: stray '#' in program
   46 | Input #1 ( )            Output #1 ( )
      |                                ^
a.cc:37:1: error: 'Compile' does not name a type
   37 | Compile Error Logs:
      | ^~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(void)
{
int x;
while(cin>>x)
{
int a[10]={1,2,4,8,16,32,64,128,256,512};
int b[10]={0};

int j=0;
for(int i=9;i>=0;i--)
{
	if(x>=a[i])
	{
	x-=a[i];
	b[j]=a[i];
	j++;
	if(x==0)break;
	}
}
for(int i=9;i>=0;i--)
{
(b[i]!=0)cout<<b[i]<<(i==0?"\n":" ");
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:10: error: expected ';' before 'cout'
   24 | (b[i]!=0)cout<<b[i]<<(i==0?"\n":" ");
      |          ^~~~
      |          ;
Language: Java

import java.util.*;

public class AOJ0032 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s="";
        String[] a=new String[3];
        int[] b=new int[3];
        int ch=0,hi=0;
        while(true){
            s=sc.nextLine();
            if(s==null){
                break;
            }
            a=s.split(",");
            for(int i=0;i<3;i++){
                b[i]=Integer.parseInt(a[i]);
            }
            if(b[0]*b[0]-b[1]*b[1]-b[2]*b[2]==0){
                ch++;
            }else if(b[0]==b[1]){
                hi++;
            }
        }
        System.out.println(ch+" "+hi);
    }
}

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

import java.io.*;

class Main{
public static void main(String[] args) throws IOExceptiion{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int rec=0;
int loz=0;
String line;
while((line=br.readLine())!=null){
String[] value=line.split(",");
int s1=Integer.parseInt(value[0]);
int s2=Integer.parseInt(value[1]);
int d=Integer.parseInt(value[2]);
if(d==(int)Math.hypot(s1,s2)){
rec++;
}
if(s1==s2){
loz++;
}
}
System.out.println(rec);
System.out.println(loz);
}
}

Compiler output:
Main.java:4: error: cannot find symbol
public static void main(String[] args) throws IOExceptiion{
                                              ^
  symbol:   class IOExceptiion
  location: class Main
1 error
Language: Java

import java.util.Scanner;
public class Exercises1 {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int Rhombus = 0;
		int Rectangle = 0;
		while(scan.hasNext()){
			String text = scan.next();
			String[] num = text.split(",", 0);
			int a = Integer.parseInt(num[0]);
			int b = Integer.parseInt(num[1]);
			int c = Integer.parseInt(num[2]);
			if(a*a + b*b == c*c){
				Rectangle++;
			}else if(a == b){
				Rhombus++;
			}
		}
		System.out.println(Rectangle);
		System.out.println(Rhombus);
	}
}

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

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){

		while(scan.hasNext()){
			int r = 0;
			int d = 0;
			int a = scan.nextInt();
			int b = scan.nextInt();
			int c = scan.nextInt();
			if(Math.pow(c, 2) == Math.hypot((double) a, (double) b)){
				r++;
			}
			if(a == b && Math.pow(a, 2) == Math.hypot((double) c / 2, (double) c / 2)){
				d++;
			}
		}

		System.out.printf("%d\n", r);
		System.out.printf("%d\n", d);
	}
}

Compiler output:
Main.java:22: error: cannot find symbol
		System.out.printf("%d\n", r);
		                          ^
  symbol:   variable r
  location: class Main
Main.java:23: error: cannot find symbol
		System.out.printf("%d\n", d);
		                          ^
  symbol:   variable d
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int rectangular = 0;
		int dimond = 0;

		while(sc.hasNext()) {
			String[] numbers = sc.nextLine().split(",");

			int a = Integer.parseInt(numbers[0]);
			int b = Integer.parseInt(numbers[1]);
			int c = Integer.parseInt(numbers[2]);

			if(a * a + b * b == c * c) {
				rectangular++;
			} else if(a == b) {
				dimond++;
			}
		}

		System.out.println(rectangular);
		System.out.println(dimond);

	}

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

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

public class AOJ_0032
{

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

    int rectanglesCount = 0;
    int lozengesCount = 0;
    while (input.ready())
    {
      String[] INPUT_STR = input.readLine().split(",");
      int a = Integer.valueOf(INPUT_STR[0]);
      int b = Integer.valueOf(INPUT_STR[1]);
      int c = Integer.valueOf(INPUT_STR[2]);

      if (isLozenges(a, b, c))
      {
        lozengesCount++;
      }
      else if (isRectangle(a, b, c))
      {
        rectanglesCount++;
      }

    }
    System.out.println(rectanglesCount);
    System.out.println(lozengesCount);

  }

  private static boolean isRectangle(int a, int b, int c)
  {
    if (a != b && Math.pow(a, 2) + Math.pow(b, 2) == Math.pow(c, 2))
    {
      return true;
    }
    return false;
  }

  private static boolean isLozenges(int a, int b, int c)
  {
    if (a == b)
    {
      return true;
    }
    return false;
  }

}

Compiler output:
Main.java:5: error: class AOJ_0032 is public, should be declared in a file named AOJ_0032.java
public class AOJ_0032
       ^
1 error