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

#include<iostream>
using namespace std;
int main (){
  int N,Y;
  cin >> N >> Y;
  int c;
  for(int i=0; i<N;i++){
    for(int j=0;j<N;j++){
      c=N-i-j;
      if(10000*i+5000*j+1000*c==Y){
        cout << i << " "<< j << " "<< c << endl;
      }
    }
  }
  return "-1,-1,-1"
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   15 |   return "-1,-1,-1"
      |          ^~~~~~~~~~
      |          |
      |          const char*
a.cc:15:20: error: expected ';' before '}' token
   15 |   return "-1,-1,-1"
      |                    ^
      |                    ;
   16 | }
      | ~
Language: C++

#include<iostream>
using namespace std;
int main (){
  int N,Y;
  cin >> N >> Y;
  int c;
  for(int i=0; i<N;i++){
    for(int j=0;j<N;j++){
      c=N-i-j;
      if(10000*i+5000*j+1000*c==Y){
        cout << i << << j << << c << endl;
        break;
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: expected primary-expression before '<<' token
   11 |         cout << i << << j << << c << endl;
      |                      ^~
a.cc:11:30: error: expected primary-expression before '<<' token
   11 |         cout << i << << j << << c << endl;
      |                              ^~
Language: C++

#include<iostream>
using namespace std;
int main (){
  int N,Y;
  cin >> N >> Y;
  int c;
  for(int i=0; i<N;i++){
    for(int j=0;j<N;j++){
      c=N-i-j;
      if(10000*i+5000*j+1000*c==Y){
        cout << i j c << endl;
        break;
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: expected ';' before 'j'
   11 |         cout << i j c << endl;
      |                  ^~
      |                  ;
Language: C++

#include<iostream>
using namespace std;
int main (){
  int N,Y;
  cin >> N >> Y;
  int c;
  for(int i=0; i<N;i++){
    for(int j=0;j<N;j++){
      c=N-i-j;
      if(10000*i+5000*j+1000*c==Y){
        cout << i,j,c << endl;
        break;
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   11 |         cout << i,j,c << endl;
      |                     ~~^~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main (){
  int N,Y;
  cin >> N >> Y;
  for(int i=0; i<N;i++){
    for(int j=0;j<N;j++){
      c=N-i-j;
      if(10000*i+5000*j+1000*c==Y){
        cout << i,j,c << endl;
        break;
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'c' was not declared in this scope
    8 |       c=N-i-j;
      |       ^
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int y = sc.nextInt();
		int x = y / 1000 - n;
		int coefficient1 = 9;	//10000円の係数
		int coefficient2 = 4; //5000円の係数
		int result[3] = {-1, -1, -1};
		
		for (int i = 0; i <= n; i++) {
			if ((x - (9 * i)) % 4 ==0) {
				result[0] = i;
				result[1] = (x - 9 * i) / 4;
				result[2] = n - result[0] - result[1];
				break;
			}
		}
		
		System.out.println(result[0] + " " + result[1] + " " + result[2]);
	}
}


Compiler output:
Main.java:12: error: ']' expected
		int result[3] = {-1, -1, -1};
		           ^
Main.java:12: error: not a statement
		int result[3] = {-1, -1, -1};
		                 ^
Main.java:12: error: ';' expected
		int result[3] = {-1, -1, -1};
		                   ^
3 errors
Language: C++

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

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
 
    int n,y;
    cin >> n >> y;
    int ans10000 = ans5000 = ans1000 = -1;
    for(int a=0; a<=n; ++a ){
    	for(int b=0; (a+b) <= n; ++b){
    		int c = n-a-b;
    		int total = 10000*a + 5000*b + 1000*c;
    		if(total==y) {
    			ans10000 = a;
    			ans5000 = b;
    			ans1000 = c;
    		}
    	}
    }
    cout << ans10000 << " " << ans5000 << " " << ans1000 << "\n";



	
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: 'ans5000' was not declared in this scope; did you mean 'ans10000'?
   17 |     int ans10000 = ans5000 = ans1000 = -1;
      |                    ^~~~~~~
      |                    ans10000
a.cc:17:30: error: 'ans1000' was not declared in this scope; did you mean 'ans10000'?
   17 |     int ans10000 = ans5000 = ans1000 = -1;
      |                              ^~~~~~~
      |                              ans10000
Language: C++

n, y = gets.chomp.split.map(&:to_i)
 
0.upto(n) do |i|
  0.upto(n-i) do |j|
    money = i * 10000 + j * 5000 + (n-i-j) * 1000
    if money == y
      puts [i, j, n-i-j].join(' ')
      exit
    end
  end
end
 
puts '-1 -1 -1'

Compiler output:
a.cc:13:6: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   13 | puts '-1 -1 -1'
      |      ^~~~~~~~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n, y = gets.chomp.split.map(&:to_i)
      | ^
Language: C++

n, y = gets.split.map(&:to_i)
0.upto(n) do |bill_1|
  0.upto(n) do |bill_2|
    next if (bill_1 + bill_2) > n
    bill_3 = n - (bill_1 + bill_2)
    if 10000 * bill_1 + 5000 * bill_2 + 1000 * bill_3 == y
      puts "#{bill_1} #{bill_2} #{bill_3}"
      exit
    end
  end
end
puts "-1 -1 -1"


Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n, y = gets.split.map(&:to_i)
      | ^
Language: C++

#include <iostream>

using namespace std;
    int N=0;
    int Y=0;

    int ans1000     = -1;
    int ans5000     = -1;
    int ans10000    = -1;

void solve(void){
    for(int i=0; i<=N; i++){
        if(i * 10000 > Y){
            return;
        }
        for(int j=0; j<=N; j++){
            if( (i+j) >N){
                break;
            }
            
            if(
                (
                (i * 10000)
                +(j * 5000)
                +( (N-(i+j)) * 1000 )
                ) == Y
                &&
                (N-(i+j) >= 0 )
                &&
                
            ){
                ans10000 = i;
                ans5000 = j;
                ans1000 =(N-(i+j));
            }
        }
    }
}

int main(void){

    cin >> N;
    cin >> Y;

    solve();

    cout << ans10000 << " " << ans5000 << " " << ans1000 << endl;

    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:31:13: error: expected primary-expression before ')' token
   31 |             ){
      |             ^
Language: C++

#include <iostream>
using namespace std;

int main(void) {
  int N, Y;
  cin >> N >> Y;
  
  for (int i = 0; i <= N ; i++) {
    for (int j = 0; j <= N; j++) {
      k = N - i - j;
      
      if (k >= 0) if (10000*i + 5000*j + 1000*k == Y) {
        cout << i << j << k << endl;
        return 0;
      }
    }
  }
  
  cout << -1 << -1 << -1 << endl;
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'k' was not declared in this scope
   10 |       k = N - i - j;
      |       ^
Language: C++

#include <iostream>
using namespace std;

int main(void) {
  int N, Y;
  cin >> N >> Y;
  
  for (int i = 0; i <= Y / 10000; i++) {
    for (int j = 0; j < Y / 5000; j++) {
      int k = Y - 10000*i - 5000*j;
      if (10000*i + 5000*j <= Y and k % 1000 == 0) {
        cout << x << y << (Y - 10000*i - 5000*j) / 1000 << endl;
        return 0;
      }
    }
  }
  
  cout << -1 << -1 << -1 << endl;
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'x' was not declared in this scope
   12 |         cout << x << y << (Y - 10000*i - 5000*j) / 1000 << endl;
      |                 ^
a.cc:12:22: error: 'y' was not declared in this scope
   12 |         cout << x << y << (Y - 10000*i - 5000*j) / 1000 << endl;
      |                      ^
Language: C++


int main() {


	int n, w1, w2, cnt = 0, ttl = 0, ttl2 = 0, c10 = -1, c5 = -1, c1 = -1, t = 0;
	bool fin = false;

	cin >> n >> ttl;

	if (ttl % 1000 != 0) {
		cout << -1 << ' ' << -1 << ' ' << -1 << endl;
		return 0;
	}

	ttl2 = ttl / 1000;

	for (int i = n;i >= 0;i--) {

		w1 = ttl2 - (i * 10);

		if (w1 < 0) continue;

		for (int k = n - i; k >= 0; k--) {

			w2 = w1 - (k * 5);

			if (w2 < 0) continue;

			t = n - i - k;

			if (w2 == t && (i + k + t) == n) {
				c10 = i;
				c5 = k;
				c1 = n - i - k;

				fin = true;
				break;
			}
		}

		if (fin) break;

	}


	cout << c10 << ' ' << c5 << ' ' << c1 << endl;

	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'fin'?
    8 |         cin >> n >> ttl;
      |         ^~~
      |         fin
a.cc:11:17: error: 'cout' was not declared in this scope
   11 |                 cout << -1 << ' ' << -1 << ' ' << -1 << endl;
      |                 ^~~~
a.cc:11:57: error: 'endl' was not declared in this scope
   11 |                 cout << -1 << ' ' << -1 << ' ' << -1 << endl;
      |                                                         ^~~~
a.cc:46:9: error: 'cout' was not declared in this scope
   46 |         cout << c10 << ' ' << c5 << ' ' << c1 << endl;
      |         ^~~~
a.cc:46:50: error: 'endl' was not declared in this scope
   46 |         cout << c10 << ' ' << c5 << ' ' << c1 << endl;
      |                                                  ^~~~
Language: C++

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

int main() {
  int N,Y;
  cin >> N >> Y;
  bool ok = true;
  for (int x = 0;x < N;x++) {
    for (int y = 0;y<N-x;y++) {
      if (Y == 10000*x + 5000*y + 1000*(N-x-y)) {
        cout << x << y << z << endl;
        ok = false;
        break;
      }
    }
  }
  if (ok) cout << "-1 -1 -1" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: 'z' was not declared in this scope
   11 |         cout << x << y << z << endl;
      |                           ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string> 
#include <math.h>
#include <set>
#include <vector>
#define rep(i,n) for(int i=0; i< (int)(n); i++)
using namespace std;


int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int n,y;
	cin >> n >> y;
	int ans10000 = -1;
	int ans5000 = -1;
	int ans1000 = -1;
	for(int i=0; i<=n;　++i){
		for(int k=0; i+k<=n; ++k){
			int j = n-k-i;
			int total = 10000*i + 5000*k + 1000*j;
			if(total==y){
				ans10000 = i;
				ans5000 = k;
				ans1000 = j;

			}
		}
	}
	cout << ans10000 << "　" << ans5000 << "　" << ans1000 << "\n";
 } 



Compiler output:
a.cc:20:27: error: extended character 　 is not valid in an identifier
   20 |         for(int i=0; i<=n;　++i){
      |                           ^
a.cc: In function 'int main()':
a.cc:20:27: error: '\U00003000' was not declared in this scope
   20 |         for(int i=0; i<=n;　++i){
      |                           ^~
a.cc:20:31: error: expected ')' before 'i'
   20 |         for(int i=0; i<=n;　++i){
      |            ~                  ^
      |                               )
a.cc:20:32: error: expected ';' before ')' token
   20 |         for(int i=0; i<=n;　++i){
      |                                ^
      |                                ;
Language: C++

#include <iostream>
#include <algorithm>
#include <string> 
#include <math.h>
#include <set>
#include <vector>
#define rep(i,n) for(int i=0; i< (int)(n); i++)
using namespace std;


int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
    int N, Y;
    cin >> N >> Y;
    int res10000 = -1, res5000 = -1, res1000 = -1;
    for (int a = 0; a <= N; ++a) {  
        for (int b = 0; b + a <= N; ++b) {  
            int c = N - a - b;  
            int total = 10000*a + 5000*b + 1000*c;
            if (total == Y) {  
                res10000 = a;
                res5000 = b;
                res1000 = c;
            }
        }
    }

    

	cout << ans10000 << " " << ans5000 << " " << ans1000 << "\n";
 } 



Compiler output:
a.cc: In function 'int main()':
a.cc:32:17: error: 'ans10000' was not declared in this scope; did you mean 'res10000'?
   32 |         cout << ans10000 << " " << ans5000 << " " << ans1000 << "\n";
      |                 ^~~~~~~~
      |                 res10000
a.cc:32:36: error: 'ans5000' was not declared in this scope; did you mean 'res5000'?
   32 |         cout << ans10000 << " " << ans5000 << " " << ans1000 << "\n";
      |                                    ^~~~~~~
      |                                    res5000
a.cc:32:54: error: 'ans1000' was not declared in this scope; did you mean 'res1000'?
   32 |         cout << ans10000 << " " << ans5000 << " " << ans1000 << "\n";
      |                                                      ^~~~~~~
      |                                                      res1000
Language: C++

#include <iostream>
#include <algorithm>
#include <string> 
#include <math.h>
#include <set>
#include <vector>
#define rep(i,n) for(int i=0; i< (int)(n); i++)
using namespace std;


int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int n,y;
	cin >> n >> y;
	int res1 = -1;
	int res2 = -1;
	int res3 = -1;
	for(int i=0; i<=n;i++){
		for(int k=0; i+k<=n; k++){
			if(y - 10000*i - 5000*k = 1000*(n-k-i)){
				int res1 = i;
				int res2 = k;
				int res3 = n-i-k;

			}
		}
	}
	cout << res1 << " " << res2 << " " << res3 << "\n";
 } 



Compiler output:
a.cc: In function 'int main()':
a.cc:22:40: error: lvalue required as left operand of assignment
   22 |                         if(y - 10000*i - 5000*k = 1000*(n-k-i)){
      |                            ~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <string> 
#include <math.h>
#include <set>
#include <vector>
#define rep(i,n) for(int i=0; i< (int)(n); i++)
using namespace std;


int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int n,y;
	cin >> n >> y;
	int res1 = -1;
	int res2 = -1;
	int res3 = -1;
	for(int i=0; i<=n;i++){
		for(int k=0: i+k<=n; k++){
			if(y - 10000*i - 5000*k = 1000*(n-k-i)){
				int res1 = i;
				int res2 = k;
				int res3 = n-i-k;

			}
		}
	}
	cout << res1 << " " << res2 << " " << res3 << "\n";
 } 



Compiler output:
a.cc: In function 'int main()':
a.cc:21:26: error: initializer in range-based 'for' loop
   21 |                 for(int k=0: i+k<=n; k++){
      |                          ^
a.cc:21:36: error: expected ')' before ';' token
   21 |                 for(int k=0: i+k<=n; k++){
      |                    ~               ^
      |                                    )
a.cc:21:38: error: 'k' was not declared in this scope
   21 |                 for(int k=0: i+k<=n; k++){
      |                                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
	const int A = 10000;
	const int B =  5000;
	const int C =  1000;
	int x;
	int y;
	int z;
	int ans_x = 0;
	int ans_y = 0;
	int ans_z = 0;

	int N;
	int Y;
	
	cin >> N >> Y;

	// ちょうどYになる組み合わせを検索
	for (int i = 0; i < N; i++) {
		
		for (int j= 0; j < N; i++) {

			x = i;
			y = j;
			z = N - x - y;

			if (A x + B y + C z == Y) {
				
				ans_x = x;
				ans_y = y;
				ans_z = z;

			}
		}
	}

	if (ans_x == 0 && ans_y == 0 && ans_x == 0) {
		ans_x = -1;
		ans_y = -1;
		ans_z = -1;
	}

	cout << ans_x << ans_y << ans_z << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:30: error: expected ')' before 'x'
   30 |                         if (A x + B y + C z == Y) {
      |                            ~ ^~
      |                              )
Language: C++

process.stdin.resume();
process.stdin.setEncoding('utf8');
 
var lines = [];
var reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});
reader.on('line', (line) => {
    // ここで入力を処理する
    lines.push(line);
});
var sub_fn = (ary)=>{
  
}
reader.on('close', () => {
  var x = 1*lines[0].split(' ')[0]
  var y = 1*lines[0].split(' ')[1]
  var cnt = [];
 // console.log(y)
  for(var i=0;i<=x;i++){
      //  console.log(i)
    for(var j=0;j<=(x-i);j++){
      for(var k=0;k<=(x-j-i);k++){
        //console.log(i)
        if((10000*i + 5000*j + 1000*k) == y && (i+j+k)== x){
        //   console.log(i +' '+ j +' '+ k)
        cnt.push([i,j,k])
          
        
        }    }}
  }
  if(cnt.length == 0){
  console.log('-1 -1 -1')
  }else{
  console.log(cnt[cnt.length-1][0] +" "+ cnt[cnt.length-1][1] +" "+ cnt[cnt.length-1][2])
  }
  
});


Compiler output:
a.cc:2:27: warning: multi-character character constant [-Wmultichar]
    2 | process.stdin.setEncoding('utf8');
      |                           ^~~~~~
a.cc:5:22: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
    5 | var reader = require('readline').createInterface({
      |                      ^~~~~~~~~~
a.cc:9:11: warning: multi-character character constant [-Wmultichar]
    9 | reader.on('line', (line) => {
      |           ^~~~~~
a.cc:16:11: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   16 | reader.on('close', () => {
      |           ^~~~~~~
a.cc:34:15: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   34 |   console.log('-1 -1 -1')
      |               ^~~~~~~~~~
a.cc:1:1: error: 'process' does not name a type
    1 | process.stdin.resume();
      | ^~~~~~~
a.cc:2:1: error: 'process' does not name a type
    2 | process.stdin.setEncoding('utf8');
      | ^~~~~~~
a.cc:4:1: error: 'var' does not name a type
    4 | var lines = [];
      | ^~~
a.cc:5:1: error: 'var' does not name a type
    5 | var reader = require('readline').createInterface({
      | ^~~
a.cc:8:2: error: expected unqualified-id before ')' token
    8 | });
      |  ^
a.cc:9:1: error: 'reader' does not name a type
    9 | reader.on('line', (line) => {
      | ^~~~~~
a.cc:12:2: error: expected unqualified-id before ')' token
   12 | });
      |  ^
a.cc:13:1: error: 'var' does not name a type
   13 | var sub_fn = (ary)=>{
      | ^~~
a.cc:16:1: error: 'reader' does not name a type
   16 | reader.on('close', () => {
      | ^~~~~~
a.cc:39:2: error: expected unqualified-id before ')' token
   39 | });
      |  ^
Language: C++

#include <iostream>
using namespace std;
 
bool is_just(int a, int b, int c, int N)
{
  if (a*10000 + b*5000 + c*1000 == N) {
    return true;
  }
  return false;
}
 
int main(){
  int N,Y;
  cin >> N >> Y;
  for (int i=N;i>=0;--i){
    for (int j=N-i;j>=0;--j){
      for (int k=N-i-j;k>=0;--k){
        if (is_just(i, j, k)) {
          cout << i << j << k;
          return 0;
        }
      }
    }
  }
  cout << -1 << -1 << -1;
  return 0;
}
#include <iostream>
using namespace std;

bool is_just(int a, int b, int c, int N)
{
  if (a*10000 + b*5000 + c*1000 == N) {
    return true;
  }
  return false;
}

int main(){
  int N,Y;
  cin >> N >> Y;
  for (int i=N;i>=0;--i){
    for (int j=N-i;j>=0;--j){
      for (int k=N-i-j;k>=0;--k){
        if (is_just(i, j, k, N)) {
          cout << i << j << k;
          return 0;
        }
      }
    }
  }
  cout << -1 << -1 << -1;
  return 0;
}
提出情報


Compiler output:
a.cc: In function 'int main()':
a.cc:18:20: error: too few arguments to function 'bool is_just(int, int, int, int)'
   18 |         if (is_just(i, j, k)) {
      |             ~~~~~~~^~~~~~~~~
a.cc:4:6: note: declared here
    4 | bool is_just(int a, int b, int c, int N)
      |      ^~~~~~~
a.cc: At global scope:
a.cc:31:6: error: redefinition of 'bool is_just(int, int, int, int)'
   31 | bool is_just(int a, int b, int c, int N)
      |      ^~~~~~~
a.cc:4:6: note: 'bool is_just(int, int, int, int)' previously defined here
    4 | bool is_just(int a, int b, int c, int N)
      |      ^~~~~~~
a.cc:39:5: error: redefinition of 'int main()'
   39 | int main(){
      |     ^~~~
a.cc:12:5: note: 'int main()' previously defined here
   12 | int main(){
      |     ^~~~
a.cc:55:1: error: '\U000063d0\U000051fa\U000060c5\U00005831' does not name a type
   55 | 提出情報
      | ^~~~~~~~
Language: C++

#include <iostream>
using namespace std;

bool is_just(int a, int b, int c, int N)
{
  if (a*10000 + b*5000 + c*1000 == N) {
    return true;
  }
  return false;
}

int main(){
  int N,Y;
  cin >> N >> Y;
  for (int i=N;i>=0;--i){
    for (int j=N-i;j>=0;--j){
      for (int k=N-i-j;k>=0;--k){
        if (is_just(i, j, k)) {
          cout << i << j << k;
          return 0;
        }
      }
    }
  }
  cout << -1 << -1 << -1;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:20: error: too few arguments to function 'bool is_just(int, int, int, int)'
   18 |         if (is_just(i, j, k)) {
      |             ~~~~~~~^~~~~~~~~
a.cc:4:6: note: declared here
    4 | bool is_just(int a, int b, int c, int N)
      |      ^~~~~~~
Language: Java

import java.util.Scanner;

public class Otoshidama {

	public static void Main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = Integer.parseInt(scan.next());
		int y = Integer.parseInt(scan.next());

		int man = -1;
		int gosen = -1;
		int sen = -1;

		loop: for(int i = 0; i <= 2000; ++i) {
			for(int j = 0; j<= 2000; ++j) {
				for(int k = 0; k<= 2000; ++k) {
					int sumMaisu = i + j + k;
					if(sumMaisu <= 2000 && sumMaisu == n) {
						int sum = 10000 * i + 5000 * j + 1000 * k;
						if(sum == y) {
							man = i;
							gosen = j;
							sen = k;
							break loop;
						}
					}
				}
			}
		}

		System.out.println(man + " " + gosen + " " + sen);

	}

}


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

#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
 
int main() {
  long long n,Y;
  cin >> n >> Y;
  Y = Y/1000;
  int a,b,c,x,y;
  
  for(int i=0;i<Y;i++){
    for(int j=0;j<Y;j++){
      if(9*i+4*b==Y-n){
        a = i; b = j;
        break;
      }
    }
  }
  for(int k=0;k<Y;k++){
    x = 4*k+a;
    y = 9*k+b;
    if(n-x-y>=0){
      c=n-x-y;
      break;
    }
  }
  
  if()
    cout<<-1<<" "<<-1<<" "<<-1<<endl;
  else
    cout<<x<<" "<<y<<" "<<c<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:6: error: expected primary-expression before ')' token
   28 |   if()
      |      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,Y;
  cin >> N >>Y;
  Y/=1000;
  int A,B,C;
  int Z=Y-N;
  if(Z<0){
    cout<<"-1 -1 -1"<<endl;
  }else if(Z==0){
    cout<<"0 0 "<<N<<endl;
  }else{
    int m=(2*Z+8)/9;
    int M=min{Y/5,Z/4};
    if(M<m){
      cout<<"-1 -1 -1"<<endl;
    }else{
      A=-4*m+Z;
      B=-2*Z+9*m;
      C=Y-5*m;
      cout<<A<<" "<<B<<" "<<C<<endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: cannot resolve overloaded function 'min' based on conversion to type 'int'
   15 |     int M=min{Y/5,Z/4};
      |           ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,Y;
  cin >> N >>Y;
  Y/=1000;
  int A,B,C;
  int Z=Y-N
  if(Z<0){
    cout<<"-1 -1 -1"<<endl;
  }else if(Z==0){
    cout<<"0 0 "<<N<<endl;
  }else{
    m=(2*Z+8)/9;
    M=min{Y/5,Z/4};
    if(M<m){
      cout<<"-1 -1 -1"<<endl;
    }else{
      A=-4*m+Z;
      B=-2*Z+9*m;
      C=Y-5*m;
      cout<<A<<" "<<B<<" "<<C<<endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'if'
    9 |   if(Z<0){
      |   ^~
a.cc:11:4: error: 'else' without a previous 'if'
   11 |   }else if(Z==0){
      |    ^~~~
a.cc:14:5: error: 'm' was not declared in this scope
   14 |     m=(2*Z+8)/9;
      |     ^
a.cc:15:5: error: 'M' was not declared in this scope
   15 |     M=min{Y/5,Z/4};
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,Y;
  cin >> N >>Y;
  Y/=1000;
  int A,B,C;
  Z=Y-N
  if(Z<0){
    cout<<"-1 -1 -1"<<endl;
  }else if(Z==0){
    cout<<"0 0 "<<N<<endl;
  }else{
    m=(2*Z+8)/9;
    M=min{Y/5,Z/4};
    if(M<m){
      cout<<"-1 -1 -1"<<endl;
    }else{
      A=-4*m+Z;
      B=-2*Z+9*m;
      C=Y-5*m;
      cout<<A<<" "<<B<<" "<<C<<endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'Z' was not declared in this scope
    8 |   Z=Y-N
      |   ^
a.cc:11:4: error: 'else' without a previous 'if'
   11 |   }else if(Z==0){
      |    ^~~~
a.cc:14:5: error: 'm' was not declared in this scope
   14 |     m=(2*Z+8)/9;
      |     ^
a.cc:15:5: error: 'M' was not declared in this scope
   15 |     M=min{Y/5,Z/4};
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,Y;
  cin >> N >>Y;
  Y/=1000;
  int A,B,C;
  A=Y/10;
  if(A>N){
    A=-1;
    B=-1;
    C=-1;
    cout <<A<<B<<C<<endl;
  }else{
    N=N-A;
    Y-=10*A;
    B=Y/5;
    if(B>N){
      A=-1;
      B=-1;
      C=-1;
      cout <<A<<B<<C<<endl;
    }else{
      N=N-B;
      Y-=5*B;
      C=Y;
      if(A>=0&&B>=0&&C>==0){
        cout << A << B << C <<endl;
      }else{
        A=-1;
        B=-1;
        C=-1;
        cout << A << B << C <<endl;
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:25: error: expected primary-expression before '=' token
   27 |       if(A>=0&&B>=0&&C>==0){
      |                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
typedef long long ll;
// Welcome to my source code!

int main() {
    IOS
    int n, y;
    cin >> n >> y;
    int a = -1, b = -1, c = -1;
    for (int i = 0; i <= n; i++) {
        for (int j = 0; j <= n; j++) {
            int f = n - i - j;
            if (f >= 0 && sum == 10000 * i + 5000 * j + 1000 * f) {
                a = i; b = j; c = f;
                break;
            }
        }
    }
    cout << a << ' ' << b << ' ' << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:27: error: 'sum' was not declared in this scope
   15 |             if (f >= 0 && sum == 10000 * i + 5000 * j + 1000 * f) {
      |                           ^~~
Language: Java

import java.util.Scanner;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   int Y = sc.nextInt();
   boolean yen =false;
   int z =0;

   int ansx=-1;
   int ansy=-1;
   int ansz=-1;
   
   for(int x =0;x<=N;x++)
   {
     for(int y=0;y<=N-i;y++)
     {
       z=N-x-y;
       if(10000*x+5000*y+1000*z==Y)
       {
         ansx=x;
         ansy=y;
         ansz=z;
         yen=true;
         break;
       }
     }
     if(yen) break;
   }
   System.out.println(ansx+" "+ansy+" "+ansz);
 }
}

Compiler output:
Main.java:16: error: cannot find symbol
     for(int y=0;y<=N-i;y++)
                      ^
  symbol:   variable i
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
typedef long long ll;
// Welcome to my source code!

int main() {
    IOS
    int N, Y;
    cin >> N >> Y;
    ll sum;
    bool flag = false;
    for (int x = 0; x < N; x++) {
        sum = 10000 * z;
        for (int y = 0; y < N; y++) {
            sum += 5000 * y;
            int z = N - x - y;
            if (z) sum += 1000 * z;
            if (sum == Y) {
                cout << x << ' ' << y << ' ' << z << endl;
                flag = true;
                break;
            }
        }
        if (flag) break;
    }
    if (!flag) cout << -1 << ' ' << -1 << ' ' << -1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: 'z' was not declared in this scope
   14 |         sum = 10000 * z;
      |                       ^
Language: C++

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

int main(){
    int n;
    ll Y;
    cin >> n >> Y;

    for(int x=0; x<=n; x++){
        for(int y=0; y<=n-x; y++){
            for(int z=0; z<=n-x-y; z++){
                if(x+y+z>n) continue;
                if(10000*x+5000*y+1000*z==Y){
                    cout << x << " " << y << " " << z << endl;
                    return 0;
                }
            }
        }
    }

    cout << -1 " " << -1 << " "<< -1 << endl;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:23:15: error: expected ';' before string constant
   23 |     cout << -1 " " << -1 << " "<< -1 << endl;
      |               ^~~~
      |               ;
Language: C++

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

int main(){
  int n,y;
  cin >> n >> y;
  bool ans = false;
  int a10000, a5000, a1000;

  for (int i=0; i<=n; i++){
    for (int j=0; j<=n-i; j++){
      for (int k=0; k<=n-i-j; k++){
        if (i*10000 + j*5000 + k*1000 == y){
          a10000 = i;
          a5000 = j;
          a1000 = k;
          ans = true;
          break;
        }
      }
      if (ans) break;
      if (i+j=n) break;
    }
    if (ans) break;
    if (i=n) break;
  }
  
  if (ans){
    cout << a10000 << " " << a5000 << " " << a1000 << endl;
  } else {
    cout << "-1 -1 -1" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: lvalue required as left operand of assignment
   22 |       if (i+j=n) break;
      |           ~^~
Language: C++

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
using namespace std;

#define ll         long long
#define PI         acos(-1.0)
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)

int N;
int Y;


int main(){
    cin >> N >> Y;
    
    for (size_t a = 0; a < N; i++) {
      for (size_t b = 0; b < N; j++) {
        if (Y == 10000 * a + 5000 * b + 1000 * (N - a - b)) {
          cout << a << b << N - a - b;
          return;
        } 
      }
    }
    cout << '-1 -1 -1'; 
    return 0;
}


Compiler output:
a.cc:35:13: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   35 |     cout << '-1 -1 -1';
      |             ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:27:31: error: 'i' was not declared in this scope
   27 |     for (size_t a = 0; a < N; i++) {
      |                               ^
a.cc:28:33: error: 'j' was not declared in this scope
   28 |       for (size_t b = 0; b < N; j++) {
      |                                 ^
a.cc:31:11: error: return-statement with no value, in function returning 'int' [-fpermissive]
   31 |           return;
      |           ^~~~~~
Language: C++

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

int main(){   
   int n,y,e,f,g;
   cin >> n >> y;
   bool t=false;
   for(int a=0;a<y/10000+1;a++){
       for(int b=0;b<y/5000+1;b++){
           if(99000*a+4000*b==y-1000n){
               e=a;
               f=b;
               t=true;
               break;
           }
           if(99000*a+4000*b>y-1000n){
               break;
           }
       }
       if(t){
           g=n-e-f;
           break;
       }
   }
   if(t){
       cout << e <<" " <<f<<" "<< g<<endl;
   }else{
       cout <<"-1 -1 -1"<<endl;
   }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:33: error: unable to find numeric literal operator 'operator""n'
   10 |            if(99000*a+4000*b==y-1000n){
      |                                 ^~~~~
a.cc:16:32: error: unable to find numeric literal operator 'operator""n'
   16 |            if(99000*a+4000*b>y-1000n){
      |                                ^~~~~
Language: C++

#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <math.h>
using namespace std;

typedef long long signed int ll;
#define REP(i,n) for(int i=0;i<(n);++i)
#define ALL(obj) (obj).begin(),(obj).end()

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
  int N,Y,tmp;
  cin>>N>>Y;
  for(int i=0;i<N;++i){
    for(int j=0;j<(N-i);++j){
      if((i*1000+j*5000+(N-i-j)*10000)==Y){
        cout<<(N-i-j)<<" "<<j<<" "<<i<<endl;
        return 0;
      }
    }  
  }
	return "-1 -1 -1";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:16: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   30 |         return "-1 -1 -1";
      |                ^~~~~~~~~~
      |                |
      |                const char*
Language: C++

#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <math.h>
using namespace std;

typedef long long signed int ll;
#define REP(i,n) for(int i=0;i<(n);++i)
#define ALL(obj) (obj).begin(),(obj).end()

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
  int N,Y,tmp;
  cin>>N>>Y;
  for(int i=0;i<N;++i){
    for(int j=0;j<(N-i);++j){
      if((i*1000+j*5000+(N-i-j)*10000)==Y){
        count<<(N-i-j)<<" "<<j<<" "<<i<<endl;
        return 0;
      }
    }  
  }
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'count' was not declared in this scope
   25 |         count<<(N-i-j)<<" "<<j<<" "<<i<<endl;
      |         ^~~~~
Language: C++

// c lib
#include <cstdio>
#include <cstdlib>
#include <cmath>

// container
#include <vector>
#include <string>
#include <map>
#include <list>
#include <queue>

// Convenience
#include <algorithm>
#include <functional>

// IO
#include <iostream>

using namespace std;

void answer(int man, int gosen, int sen) {
  if (man == 0 && gosen == 0 && sen == 0) {
    impossible();
    return;
  }
  cout <<  man << " " << gosen << " " << sen << endl;
}

void impossible() {
  cout << "-1 -1 -1" << endl;
}

int main() {
  auto n = 0;
  auto y = 0;
  
  cin >> n >> y;

  for (int m = y / 10000; m <= n && m >= 0; m--) {
    auto gh = n - m;
    auto gl = 0;
    while (1) {
      auto gc = (gh + gl) / 2;    

      auto rem_n = n - m - gc;
      auto rem_y = y - m * 10000 - gc * 5000;
      auto rem_ny = rem_n * 1000;

      if (rem_y > rem_ny) {
        if (gl == gc) break;
        gl = gc;
      }
      else if (rem_y < rem_ny) {
        if (gh == gc) break;
        gh = gc;
      }
      else {
        answer(m, gc, rem_n);
        return 0;
      }
    }
  }

  impossible();
}


Compiler output:
a.cc: In function 'void answer(int, int, int)':
a.cc:24:5: error: 'impossible' was not declared in this scope
   24 |     impossible();
      |     ^~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<climits>
#include<math.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)

void solve(){
  int N,Y;
  cin>>N>>Y;
  rep(i,N+1){
    if (10000*i>Y)break;
    if (Y-10000*i>5000*j)continue;
    rep(j,N+1){
      if (10000*i+5000*j>Y)break;
      else if (Y-10000*i-5000*j>1000*N)continue;
      else{
        cout<<i<<j<<(Y-10000*i-5000*j)/1000;
        return;
      }
    }
  }
  cout<<-1<<-1<<-1;
  return;
}

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

Compiler output:
a.cc: In function 'void solve()':
a.cc:14:24: error: 'j' was not declared in this scope
   14 |     if (Y-10000*i>5000*j)continue;
      |                        ^
Language: C++

#include <iostream>
#define rep(i,n) for (int i = 0;i < (n); i++)
using namespace std;
typedef long long ll;
 
int main(){
  int N,Y;
  cin >> N >> Y;
  int a=-1,b=-1,c=-1;
  bool ok = false;
  bool flag = true;
  for(int i=0;i<=N||flag;i++){ //一万円札の枚数i
    
    for(int j = 0;i+j<=N;j++){ //五千円札の枚数j
      if(Y == i*10000+j*5000+(N-i-j)*1000){
        a = i; b = j; c = N - i - j;
        ok = true;
        flag = false
        break;
        }
    }
  }
  cout << a << " " << b << " " << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:21: error: expected ';' before 'break'
   18 |         flag = false
      |                     ^
      |                     ;
   19 |         break;
      |         ~~~~~
Language: C++

using namespace std;
#define FOR(v1, v2) for (v1 = 0; v1 < v2; ++v1)

// 10000
// 5000
// 1000
int main () {
 // N bills
 // Y yen in total
 // ...maybe a lie.
  int N, Y;
  cin >> N >> Y;

// i + j + k = 2000
  for (int i = 0; i <= N; ++i) {   // 1000
    for (int j = 0; j <= N-i ; ++j) { // 5000
      int k = N - i - j;
        if(1000 *i + 5000*j + 10000*k == Y) {
          cout << i << " " << j << " " << k << endl;
          return 0;
        }
    }   
  }
  cout << "-1 -1 -1" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'cin' was not declared in this scope
   12 |   cin >> N >> Y;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:19:11: error: 'cout' was not declared in this scope
   19 |           cout << i << " " << j << " " << k << endl;
      |           ^~~~
a.cc:19:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:48: error: 'endl' was not declared in this scope
   19 |           cout << i << " " << j << " " << k << endl;
      |                                                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:24:3: error: 'cout' was not declared in this scope
   24 |   cout << "-1 -1 -1" << endl;
      |   ^~~~
a.cc:24:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:24:25: error: 'endl' was not declared in this scope
   24 |   cout << "-1 -1 -1" << endl;
      |                         ^~~~
a.cc:24:25: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

int main() {
  int N,Y,a,b,c;
  int ans = 0;
  cin >> N >> Y;
  for (int x = 0; x < Y%10000; x++) {
    for (int y = 0; y < (Y-10000*x)%5000) {
      for (int z = 0; z < (Y-10000*x-5000*y)%1000) {
        if (Y == 10000*x + 5000*y + 1000*z) {
          a = x;
          b = y;
          c = z;
          ans++;
        }
      }
    }
  }
  if (ans = 0) {
    cout << -1 << -1 << -1 << endl;
  }
  else
    cout << a << b << c << endl;  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:41: error: expected ';' before ')' token
    9 |     for (int y = 0; y < (Y-10000*x)%5000) {
      |                                         ^
      |                                         ;
a.cc:10:50: error: expected ';' before ')' token
   10 |       for (int z = 0; z < (Y-10000*x-5000*y)%1000) {
      |                                                  ^
      |                                                  ;
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<numeric>
#include<map>
#include<stack>
#include<sstream>
#include<stdio.h>

using namespace std;

int main(){
	int n,y;
	cin >> n >> y;
	int yukichi,higuchi,noguchi;
	yukichi=higuchi=noguchi=-1;
	for(int i=0;i<=n;++i){
		for(int j=n-i;j<=n;++j){
			int k=n-i-j;
			int total = 10000*yukichi+5000*higuchi+1000*noguchi;
			if(total==y){
				yukichi=i;
				higuchi=j;
				noguchi=k;
			}
		}
	}	
	cout<<yukichi<<" "<<higuchi<<" "<<noguchi<< endl;
	return 0;		

Compiler output:
a.cc: In function 'int main()':
a.cc:30:24: error: expected '}' at end of input
   30 |         return 0;
      |                  ^      
a.cc:13:11: note: to match this '{'
   13 | int main(){
      |           ^
Language: Java

import java.util.*;
import java.lang.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int Y = sc.nextInt();
		for( int x=0; x<=N; x++ ){
			for( int y=N-x+1; y>=0; y-- ){
				for( int z=0; z<=N-x+1; z++ ){
					if( 10000*x + 5000*y + 1000*z == Y ){
						System.out.println(x+" "+y" "+z);
					}
				}
			}
			if( x==N ){
				System.out.println("-1 -1 -1");
			}
		}
	}
}


Compiler output:
Main.java:13: error: ')' or ',' expected
						System.out.println(x+" "+y" "+z);
						                          ^
Main.java:13: error: not a statement
						System.out.println(x+" "+y" "+z);
						                              ^
Main.java:13: error: ';' expected
						System.out.println(x+" "+y" "+z);
						                               ^
3 errors
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner dc = new Scanner(System.in);
    int number, one, five, ten, value;
    boolean flag = true;
    number = Integer.parseInt(sc.next());
    value = Integer.parseInt(sc.next());
    for(one = 0; one <= number; one++) {
      for(five = 0; five <= number - one; j++) {
        ten = number - one - five;
        if(one * 1000 + five * 5000 + ten * 10000 == value) {
          System.out.println(one + " " + five + " " + ten);
          flag = false;
        }
      }
    }
    if(flag) System.out.println("-1 -1 -1");
  }
}


Compiler output:
Main.java:8: error: cannot find symbol
    number = Integer.parseInt(sc.next());
                              ^
  symbol:   variable sc
  location: class Main
Main.java:9: error: cannot find symbol
    value = Integer.parseInt(sc.next());
                             ^
  symbol:   variable sc
  location: class Main
Main.java:11: error: cannot find symbol
      for(five = 0; five <= number - one; j++) {
                                          ^
  symbol:   variable j
  location: class Main
3 errors
Language: Java

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

public class Otoshidama {
    public static void main(String[] args){
        int n = 0;
        long m = 0L;
        try{
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            String str = reader.readLine();
            String[] s = str.split(" ");
            n = Integer.parseInt(s[0]);
            m = Long.parseLong(s[1]);
        } catch (IOException e){
            e.printStackTrace();
        }

        int x,y;
        boolean flg=true;
        m = m / 1000;
        if(m > 20000){
            System.out.println("-1 -1 -1");
        } else{
            int z1 = (int)m % 5;
            n -= z1;
            m = m - z1;
            for (x = 0;x <= n;x++){
                for(y = 0;y <= n;y++){
                    if((10 * x + 5 * y + (n - x - y)) == m){
                        System.out.println(x + " " + y + " " + (n-x-y+z1));
                        flg = false;
                    }
                }
            }
            if(flg){
            System.out.println("-1 -1 -1");
            }
            
        }
    }
}

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

import java.util.*;

public class Otoshidama{
    public static void main(String[] args){
        Scanner scn = new Scanner(System.in);
        int Bills = scn.nextInt();
        int Sum = scn.nextInt();

        Check(Sum, Bills);
    }

    public static void Check(int Sum, int Bills){
        int TenThousand,FiveThousand,Thousand,judge;
        TenThousand=FiveThousand=Thousand=judge=0;
        int buff = Bills;

        while(Sum>=1000 && Bills>judge){
            if(Sum >= 10000 && !((buff-1) > 0 && (Sum-5000)==0)){
                Sum -= 10000;
                TenThousand++;
            }else if(Sum >= 5000 && !((buff-1) > 0 && (Sum-5000)==0)){
                Sum -= 5000;
                FiveThousand++;
            }else{ 
                Sum -= 1000;
                Thousand++;
            }
            buff--;
            judge = TenThousand + FiveThousand + Thousand;
        }


        if(Sum > 0 || Bills < 0){
            System.out.println("-1 -1 -1");
        }else {
            System.out.println(TenThousand+" "+FiveThousand+" "+Thousand);
        }
    }
}

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

import java.util.Scanner;

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

        int a,b,c = -1;
        int z = 0;

       int x = scan.nextInt();
       int y = scan.nextInt();

       for(int i = 0; i <= x;i++){
            a = i;
           for(int k = 0;k <= x-i;k++){
               b = k;
               c = x - i - k;
               z = 10000*a + 5000*b + 1000*c;
               if(y == z){
                  System.out.println(a+" "+b+" "+c);
                  break;
               }
           }
       }
    }
}


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

import java.util.Scanner;

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

        int a,b,c = -1;
        int z = 0;

       int x = scan.nextInt();
       int y = scan.nextInt();

       for(int i = 0; i <= x;i++){
            a = i;
           for(int k = 0;k <= x-i;k++){
               b = k;
               c = x - i - k;
               z = 10000*a + 5000*b + 1000*c;
               if(y == z){
                  System.out.println(a+" "+b+" "+c);
               }
           }
       }
    }
}

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

import java.util.Scanner;

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

        int a,b,c = -1;
        int z = 0;

       int x = scan.nextInt();
       int y = scan.nextInt();

       for(int i = 0; i <= x;i++){
            a = i;
           for(int k = 0;k <= x-i;k++){
               b = k;
               c = x - i - k;
               z = 10000*a + 5000*b + 1000*c;
               if(y == z){
                  System.out.println(a+" "+b+" "+c);
               }else{
                   a = -1;b = -1;c = -1;
                   System.out.println(a+" "+b+" "+c);
               }
           }
       }
    }
}


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

n, y = map(int, input().split())
flag = False
for a in range(0, n+1):
    for b in range(0, n+1):
        for c in range(0, n+1):
            if(10000*a+5000*b+1000*c==y and a+b+c==n):
                print('{} {} {}'.format(a, b, c))
                flag = True
                break
        else:
            continue
        break
    else:
        continue
    break
    
if not flag:
    print('-1 -1 -1')
      

Compiler output:
a.cc:7:23: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
    7 |                 print('{} {} {}'.format(a, b, c))
      |                       ^~~~~~~~~~
a.cc:18:11: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   18 |     print('-1 -1 -1')
      |           ^~~~~~~~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n, y = map(int, input().split())
      | ^
Language: Java


import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int Y = sc.nextInt();
        boolean exist;
        for(int i=0;i<=N;i++){
            for(int j=0;j<=N-i;j++){
                for(int k=0;k<=N-i-j;k++){
                    if(Y==i*10000+j*1000+K*100){
                        System.out.println(i+" "+j+" "+k);
                        return;
                    }
                }
            }
        }
        System.out.println("-1 -1 -1");
    }
}

Compiler output:
Main.java:13: error: cannot find symbol
                    if(Y==i*10000+j*1000+K*100){
                                         ^
  symbol:   variable K
  location: class Main
1 error