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

#include<iostream.h>
void main()
{
  int H,A,N;
  N=0;
  cout<<"enter H:";
  cin>>H;
  cout<<"enter a:";
  cin>>A;
  for(int i=H;i>A;i--)
  {
    H=H-A;
    N++;
    
  }
  cout<<N;
}

Compiler output:
a.cc:1:9: fatal error: iostream.h: No such file or directory
    1 | #include<iostream.h>
      |         ^~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

int count = 0;
int H;
int A;

Scanner scanner = new Scanner(System.in);
H = scanner.next();
A = scanner.next();

while (H>0){
  H = H-A;
  count = count + 1;
}

System.out.println(count);


Compiler output:
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
int count = 0;
^
  (use --enable-preview to enable unnamed classes)
Main.java:8: error: class, interface, enum, or record expected
H = scanner.next();
^
Main.java:9: error: class, interface, enum, or record expected
A = scanner.next();
^
Main.java:11: error: class, interface, enum, or record expected
while (H>0){
^
Main.java:13: error: class, interface, enum, or record expected
  count = count + 1;
  ^
Main.java:14: error: class, interface, enum, or record expected
}
^
6 errors
Language: C++

#include<iostream.h>
#include<conio.h>
int win(h,a)
{
	clrscr();
  	l=h;
    cnt=0;
  	while(l<=0)
    {
		l-=a;
    	cnt+=1;
    }
    return cnt         
} 
void main()
cin>>h;
cin>>a;
f=win(h,a);
cout<<f;
getch();



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

H=int(input('Enter monstwr health: '))
A=int(input('Enter the attack damage: '))
n=0
d=H/A
if (H%A==0):
 print(int(d))
else:
     d=d+1
     print(int(d))




Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | H=int(input('Enter monstwr health: '))
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'H' [-Wimplicit-int]
main.c:1:3: error: expected expression before 'int'
    1 | H=int(input('Enter monstwr health: '))
      |   ^~~
main.c:1:13: warning: multi-character literal with 22 characters exceeds 'int' size of 4 bytes
    1 | H=int(input('Enter monstwr health: '))
      |             ^~~~~~~~~~~~~~~~~~~~~~~~
main.c:2:13: warning: multi-character literal with 25 characters exceeds 'int' size of 4 bytes
    2 | A=int(input('Enter the attack damage: '))
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
int main(void){
    long long N,K;
    vector<long long> vec<N>;
    cin >> N >> K;
    for (auto& v : vec)
	{
		cin >> v;
	}
  
    if(K >= N) {
      cout << 0; 
      return 0;
    } 
   sort(vec.begin(), vec.end()); 
  
  long long sum = 0;
  for(int i = K;i<N;i++){
    sum += vec[i];
  }
  cout << sum;
   return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:26: error: expected initializer before '<' token
    6 |     vector<long long> vec<N>;
      |                          ^
a.cc:8:20: error: 'vec' was not declared in this scope
    8 |     for (auto& v : vec)
      |                    ^~~
a.cc:17:9: error: 'vec' was not declared in this scope
   17 |    sort(vec.begin(), vec.end());
      |         ^~~
Language: C++

#include <iostream>
using namespace std;
int mian()
{
    int a, b, c=0;
    char d;
    cin>>a>>d>>b;
    if (b>=a) cout<<"1";
    if else (b<a)
    {
        while (a>0)
        {
            a=a-b;
            c++;
        }
    }
    cout<<c;
    return 0;
}

Compiler output:
a.cc: In function 'int mian()':
a.cc:9:8: error: expected '(' before 'else'
    9 |     if else (b<a)
      |        ^~~~
      |        (
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,h,a;
	cin>>h>>a;
	n=__gcd(h,a);
	if(a==1||h==1)
		cout<<n;
	else
		count<<n+1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
   11 |                 count<<n+1;
      |                 ~~~~~^~~~~
Language: C++

#include<iostream.h>
#include<conio.h>
void main()
{
  int H,A,s;
  cout<<"Enter health";
  cin>>H;
  cout<<"Enter the no. by which health decreases on one attack";
  cin>>s;
  A=H/s;
  cout<<"no. of attacks"<<A;
  getch()
    


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

#include<iostream>
using namespace std; 
int main(){ 
  int h,a,x,c=0; 
  cin>>h>>a; 
  while(h>0){ 
    h=h-a; 
    c+=1 
      } 
  cout<<c<<endl; 
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected ';' before '}' token
    8 |     c+=1
      |         ^
      |         ;
    9 |       }
      |       ~
Language: Java

import java.util.Scanner;

public class A {

    public static void main(String[] args) {
        // write your code here

        Scanner sc = new Scanner(System.in);

        int h = sc.nextInt();
        int a = sc.nextInt();

        if(h%a==0)
            System.out.println(h/a);
        else
            System.out.println((h/a)+1);
    }
}


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

#include <bits/stdc++.h>
 
using namespace std;
int main(void){
    int N,K;
    cin >> N >> K;
    if(K >= N) {
      cout << 0; 
      return 0;
    } 
    vector<long long> vec<N>;
	for (auto& v : vec)
	{
		cin >> v;
	}
   sort(vec.begin(), vec.end()); 
  
  long long sum = 0;
  for(int i = K;i<N;i++){
    sum += vec[i];
  }
  cout << sum;
   return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: expected initializer before '<' token
   11 |     vector<long long> vec<N>;
      |                          ^
a.cc:12:24: error: 'vec' was not declared in this scope
   12 |         for (auto& v : vec)
      |                        ^~~
a.cc:16:9: error: 'vec' was not declared in this scope
   16 |    sort(vec.begin(), vec.end());
      |         ^~~
Language: C++

#include <iostream>
#include <utility>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <unordered_map>
#include <unordered_set>
#include <iterator>
#include <cmath>
#include <string>

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;

#define pb push_back
#define fi first
#define se second
#define mp make_pair
#define ins insert
#define iter ::iterator
#define upb upper_bound
#define lwb lower_bound

#define sz(v) v.size()
#define aloc(i, a, n) i *a = new i[n]

#define for0(i,a) for(ll i = 0; i < a; i++)
#define fori(i,a,b) for(ll i = a; i < b; ++i)
#define rfor0(i,a) for(ll i = a; i >= 0; --i)
#define rfor(i,a,b) for(ll i = a; i >= b; --i)

int main(){

  int a,b;
  cin >> a >> b;
  if(a % b != 0) cout << a / b + 1 << edl;
  else cout << a / b << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:39: error: 'edl' was not declared in this scope
   42 |   if(a % b != 0) cout << a / b + 1 << edl;
      |                                       ^~~
Language: Java

;import java.io.*;
import java.lang;
public class MonsterDefeater
  {
  public static void main(String [] args)
    {
    Scanner sc= new Scanner();
  int h, a;
  System.out.println("Enter the health of monster"):
  h= sc.nextInt();
    System.out.println("Enter the attack");
    a= sc.nextInt();
    if(h% a==0)
      {
      System.out.println(h/a);
      }
      else
        {
        int c= h/a;
        System.out.println(c+1);
        }
      }
  }
      

Compiler output:
Main.java:1: error: extraneous semicolon
;import java.io.*;
^
Main.java:9: error: ';' expected
  System.out.println("Enter the health of monster"):
                                                   ^
2 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int h = scan.nextInt();
		int a = scan.nextINt();
		int c =0;
		for (int i = 1; a < h; i++) {
		    h -= a;
		    c++;
		}
		System.out.println(c);
	}
}

Compiler output:
Main.java:7: error: cannot find symbol
		int a = scan.nextINt();
		            ^
  symbol:   method nextINt()
  location: variable scan of type Scanner
1 error
Language: C++

#include <iostream>
#include <utility>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <unordered_map>
#include <unordered_set>
#include <iterator>
#include <cmath>
#include <string>

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;

#define pb push_back
#define fi first
#define se second
#define mp make_pair
#define ins insert
#define iter ::iterator
#define upb upper_bound
#define lwb lower_bound

#define sz(v) v.size()
#define aloc(i, a, n) i *a = new i[n]

#define for0(i,a) for(ll i = 0; i < a; i++)
#define fori(i,a,b) for(ll i = a; i < b; ++i)
#define rfor0(i,a) for(ll i = a; i >= 0; --i)
#define rfor(i,a,b) for(ll i = a; i >= b; --i)

int main(){

  int a,b;
  cin >> a >> b;
  cout << (a / b != 0) ? a % b : a % b + 1 << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:44: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   42 |   cout << (a / b != 0) ? a % b : a % b + 1 << endl;
      |                                  ~~~~~~~~~~^~~~~~~
Language: C++

hs= input().split()
h = int(hs[0])
s = int(hs[1])
if(h % s == 0):
  print(int(h/s))
else:
  result = int(h/s + 1)
  print(result)

Compiler output:
a.cc:1:1: error: 'hs' does not name a type
    1 | hs= input().split()
      | ^~
Language: C++

#include <iostream>
using namespace std;
int main()
{
  int h,a;
  cin >> h;
  cin >> a;
  int c=h/a;
  
  if(h%a==0)
    cout<<c;
  else if 
    cout<<c+1;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: expected '(' before 'cout'
   13 |     cout<<c+1;
      |     ^~~~
      |     (
Language: C++

#include<iostream.h>
using namespace std;

int main()
{
  int H, A;
  cin >> H >> A;
  cout << H / A + 1;
  return 0;
}

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

void main()
{
int attacks = H/A +1;
printf("No of attack needed are %d", attacks);
}

Compiler output:
main.c: In function 'main':
main.c:3:15: error: 'H' undeclared (first use in this function)
    3 | int attacks = H/A +1;
      |               ^
main.c:3:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:3:17: error: 'A' undeclared (first use in this function)
    3 | int attacks = H/A +1;
      |                 ^
main.c:4:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    4 | printf("No of attack needed are %d", attacks);
      | ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | void main()
main.c:4:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    4 | printf("No of attack needed are %d", attacks);
      | ^~~~~~
main.c:4:1: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int h = scan.nextInt();
		int a = scan.nextINt();
		int c = 1;
		for (int i = 1; a < h; i++) {
		    h -= a;
		    c++;
		}
		System.out.println(c);
	}
}

Compiler output:
Main.java:7: error: cannot find symbol
		int a = scan.nextINt();
		            ^
  symbol:   method nextINt()
  location: variable scan of type Scanner
1 error
Language: C++

#include <iostream>
using namespace std;
int main()
{
  int h,a;
  cin >> h;
  cin >> a;
  int c=h/a;
  
  if(h%a==0)
    cout << c;
  else if 
    cout << c+1;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: expected '(' before 'cout'
   13 |     cout << c+1;
      |     ^~~~
      |     (
Language: C++

#include <iostream>
#include <math.h>

int main()
{
	int H, A;
	scanf_s("%d%d", &H, &A);

	int result = ceil(double(H)/double(A));

	printf("%d", result);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    7 |         scanf_s("%d%d", &H, &A);
      |         ^~~~~~~
      |         scanf
Language: C

int attacks = H/A +1;
printf("No of attacks needed are %d", attacks);

Compiler output:
main.c:1:15: error: 'H' undeclared here (not in a function)
    1 | int attacks = H/A +1;
      |               ^
main.c:1:17: error: 'A' undeclared here (not in a function)
    1 | int attacks = H/A +1;
      |                 ^
main.c:2:8: error: expected declaration specifiers or '...' before string constant
    2 | printf("No of attacks needed are %d", attacks);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:2:39: error: expected declaration specifiers or '...' before 'attacks'
    2 | printf("No of attacks needed are %d", attacks);
      |                                       ^~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
  int h,a;
  cin >> h >> a;
  int c=h/a;
  if(h%a==0)
    cout << c;
  else if 
    cout << c+1;
  return 0;
}


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

#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
  int h,a,y = 1;
  cin>>h>>a;
  while(h-a>0)
  { y++;
    h=h-a;
  }
  cout<<y;
  return 0;
}

Compiler output:
a.cc:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

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

int main() {
  int h,a,z;
  cin >> h >> a;
  z = h%a
  if(z == 0){cout << h/a << endl;}
  else{cout << h/a+1 << endl;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected ';' before 'if'
    7 |   z = h%a
      |          ^
      |          ;
    8 |   if(z == 0){cout << h/a << endl;}
      |   ~~      
a.cc:9:3: error: 'else' without a previous 'if'
    9 |   else{cout << h/a+1 << endl;}
      |   ^~~~
Language: C++

	#include<stdio.h>
void main()
{
    long int h,a;
    long int count=0;
    scanf("%ld%ld",&h,&a);
    count=(h/a)+1;
    printf("%ld",count);
}


Compiler output:
a.cc:2:1: error: '::main' must return 'int'
    2 | void main()
      | ^~~~
Language: C++

#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
  int h,a,y = 1;
  cin>>h>>a;
  while(h-a>0)
  { y++;
    h=h-a;
  }
  cout<<y;
  getch();
  return 0;
}

Compiler output:
a.cc:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#inclide<iostream.h>
#include<conio.h>
#include<stdio.h>
void main()
{
  int H,A,N;
  cout<<"enter the health of monster:";
  cin>>H;
  cout<<"enter the times it can decrease:";
  cin>>A;
  do
  {
    N=H-A;
  }
  while(H!=0)	;
  cout<<"nimber of attacks:"<<N;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclide; did you mean #include?
    1 | #inclide<iostream.h>
      |  ^~~~~~~
      |  include
a.cc:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std;
int aa()
{
  int h,a;
  cin >> h >> a;
  int c=h/a;
  if(h%a==0)
    cout << c;
  else if 
    cout << c+1;
  return 0;
}


Compiler output:
a.cc: In function 'int aa()':
a.cc:11:5: error: expected '(' before 'cout'
   11 |     cout << c+1;
      |     ^~~~
      |     (
Language: C++

#include <iostream>

int main()
{
	float H;
	float N;
	int A;
	std::cin >> H;
	std::cin >> N;
	A =ceil( H / N);

	std::cout << A;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'ceil' was not declared in this scope
   10 |         A =ceil( H / N);
      |            ^~~~
Language: C++

     #include<bits/stdc++.h>
        using namespace std;
        #define ll long long
        #define inf 10e9 + 7
         
         
        int main(){
        ll h,a,cnt =0;
          cin >> h >> a;
          while(h>=0){
          
          h = h - a;
          cnt++;
          }
        cout << cnt;
         
        return 0;
         
        }

 #include<bits/stdc++.h>
    using namespace std;
    #define ll long long
    #define inf 10e9 + 7
     
     
    int main(){
    ll h,a,cnt =0;
      cin >> h >> a;
      while(h>0){
      
      h = h - a;
      cnt++;
      }
    cout << cnt;
     
    return 0;
     
    }



Compiler output:
a.cc:27:9: error: redefinition of 'int main()'
   27 |     int main(){
      |         ^~~~
a.cc:7:13: note: 'int main()' previously defined here
    7 |         int main(){
      |             ^~~~
Language: C++

// Author :mdragneell
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;

#define ull unsigned long long
#define ll long long
#define ld long double
#define pb push_back
#define pi  pair< int,int >
#define pl  pair< ll,ll >
#define f first
#define s second


ll const mod=1e9+7;
ll const N=5e5+5;
ll min(ll x,ll y) { if(x < y) return x; else return y; }
ll max(ll x,ll y) { if(x > y) return x; else return y; }
ll gcd(ll x,ll y) { if(x == 0) return y; else return gcd(y%x,x);}
ll powmod(ll x,ll y){ll res=1;while(y>0){if(y%2==1)res=(res*x)%mod;y>>=1;if(y<=0)break;x=(x*x)%mod;}return res;}



struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15; x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9; x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);}
    size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);}
};
struct compare {
    bool operator()(const pair<ll, ll>& value,  const ll& key){ return (value.first < key); }
    bool operator()(const ll& key, const pair<ll, ll>& value) { return (key < value.first); }
};

bool compare1(const pair<ll,ll> &a,const pair<ll,ll> &b)
{   if(a.first<b.first) return true ;
    else if(a.first==b.first) return (a.second > b.second);
    else return false;
}


int main()
{

        ios_base::sync_with_stdio(false); cin.tie(NULL);
        

        #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
        #endif
        
        int tt=1;
        //cin>>tt;
        
        while(tt--)
        {
                ll n,m;
                cin>>n>>m;
                vector<ll>v(n);
                for(int i=0;i<m;i++)
                    cin>>v[i];

                ll a=*max_element(v.begin(),v.end());

                v.erase(find(v.begin(),v.end(),a));
                ll b
                if(v.size()>0)
                    b=*max_element(v.begin(),v.end());



                if(a+b>=n)
                    cout<<"Yes"<<endl;
                else
                    cout<<"No"<<endl;

        }



}


Compiler output:
a.cc: In function 'int main()':
a.cc:72:17: error: expected initializer before 'if'
   72 |                 if(v.size()>0)
      |                 ^~
a.cc:77:22: error: 'b' was not declared in this scope
   77 |                 if(a+b>=n)
      |                      ^
Language: C++

#include <iostream>
#include <cmath>

using namespace std;

int mian()
{
    int a, b;
    cin>>a>>b;
    if (b >= a) cout<<"1";
    int res = 0;
    while (a>0)
    {
        a = a-b;
        res++;
    }
    cout<<res;
    return 0;
}

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

#include <iostream>
using namespace std
int aa()
{
  int h,a;
  cin >> h >> a;
  int c=h/a;
  if(h%a==0)
    cout << c;
  else if 
    cout << c+1;
  return 0;
}


Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | int aa()
      | ~~~                 
a.cc: In function 'int aa()':
a.cc:11:5: error: expected '(' before 'cout'
   11 |     cout << c+1;
      |     ^~~~
      |     (
Language: C++

#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
  int h,a,y = 1;
  cin>>h>>a;
  while(h-a>0)
  { y++;
    h=h-a;
  }
  cout<<y;
  getch();
}

Compiler output:
a.cc:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

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

int main() {
  int h,a,z;
  cin >> h >> a;
  z = h%a
    if(z==0){cout << h/a << endl;}
   	else{cout << h/a+1 << endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected ';' before 'if'
    7 |   z = h%a
      |          ^
      |          ;
    8 |     if(z==0){cout << h/a << endl;}
      |     ~~    
a.cc:9:9: error: 'else' without a previous 'if'
    9 |         else{cout << h/a+1 << endl;}
      |         ^~~~
Language: C++

#include <iostream>
#include <stdio.h>
#include <String>

int main() {

	int H;
	std::cin >> H;

	int A;
	std::cin >> A;

	int b;

	for (int i = 1; H > 0; ++i) {
		H -= A;
		b = i;
	}

	std::cout << b << std::endl;

	return 0;
}

Compiler output:
a.cc:3:10: fatal error: String: No such file or directory
    3 | #include <String>
      |          ^~~~~~~~
compilation terminated.
Language: C++

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int tairyoku = scanner.nextInt();
        int kougekiryoku = scanner.nextInt();

        int kaisuu = tairyoku/kougekiryoku;
        if (tairyoku%kougekiryoku>0){
            kaisuu++;
        }

        System.out.println(kaisuu);
    }
}


Compiler output:
a.cc:1:1: error: expected unqualified-id before 'public'
    1 | public class Main {
      | ^~~~~~
Language: Java


public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int hp = scanner.nextInt();
        int attack = scanner.nextInt();
        int result = hp / attack;
        scanner.close();
        System.out.println(result == 0 ? 1 : result);
    }
}

Compiler output:
Main.java:4: error: cannot find symbol
        Scanner scanner = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
        Scanner scanner = new Scanner(System.in);
                              ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C

#include <stdio.h>
typedef unsigned long long ull
int main(void)
{
  ull h,n;
  scanf("%d %d",&h,&n);
  if(h%n==0)
    printf("%d\n",h/n);
  else
    printf("%d\n",(h/n)+1);
  return 0;
}

Compiler output:
main.c:2:31: error: expected ';' before 'int'
    2 | typedef unsigned long long ull
      |                               ^
      |                               ;
    3 | int main(void)
      | ~~~                            
main.c: In function 'main':
main.c:5:3: error: unknown type name 'ull'
    5 |   ull h,n;
      |   ^~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
int H,A,num=0;
  cin>>H>>A;
num=H/A;
    num+=1;
  cont<<num<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'cont' was not declared in this scope; did you mean 'const'?
    9 |   cont<<num<<endl;
      |   ^~~~
      |   const
Language: C++

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
  int H,A,i=0;
  cin>>H>>A;
  cout<<<<" monster health "<<H;
  while(H>0)
  {H=H-A
    i++
    cout<<" Monster health after "<<i<<"attack\n"<<H;
  }
  cout<<"Sevral needs"<<i<<"attacks to win";
  getch();
}

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

#include<iosteam>
using namespace std;
int main()
{
 long long H,A;
 cin>>H>>A;
 if(H%A=0)
 {
 cout<<H/A;
 }
 else
 {
 cout<<H/A+1;
 }
}

Compiler output:
a.cc:1:9: fatal error: iosteam: No such file or directory
    1 | #include<iosteam>
      |         ^~~~~~~~~
compilation terminated.
Language: C

clude <stdio.h>
typedef unsigned long long ull
int main(void)
{
  ull h,n;
  scanf("%d %d",&h,&n);
  if(h%n==0)
    printf("%d\n",h/n);
  else
    printf("%d\n",(h/n)+1);
  return 0;
}

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

#include <iostream>
using namespace std
void aa()
{
  int h,a;
  cin >> h >> a;
  int c=h/a;
  if(h%a==0)
    cout << c;
  else if 
    cout << c+1;
}


Compiler output:
a.cc:2:20: error: expected ';' before 'void'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | void aa()
      | ~~~~                
a.cc: In function 'void aa()':
a.cc:11:5: error: expected '(' before 'cout'
   11 |     cout << c+1;
      |     ^~~~
      |     (
Language: C++

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

int main() {
  int h,a,z;
  cin >> h >> a;
  z = h%a
    if(z==0){cout << h/a << endl;}
   	else{cout << h/a+1 << endl;}
  	

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected ';' before 'if'
    7 |   z = h%a
      |          ^
      |          ;
    8 |     if(z==0){cout << h/a << endl;}
      |     ~~    
a.cc:9:9: error: 'else' without a previous 'if'
    9 |         else{cout << h/a+1 << endl;}
      |         ^~~~
a.cc:9:37: error: expected '}' at end of input
    9 |         else{cout << h/a+1 << endl;}
      |                                     ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int n,k;
  cin>>n>>k;
  int ans=0;
  if(n<=k)
  {
 	ans=1;
  }
  else
  {n
    if(n%k==0)
    {
      ans=n/k;
    }
    else
    {
      ans=n/k +1;
    }
  }
  cout<<ans<<endl; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: expected ';' before 'if'
   14 |   {n
      |     ^
      |     ;
   15 |     if(n%k==0)
      |     ~~
a.cc:19:5: error: 'else' without a previous 'if'
   19 |     else
      |     ^~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
  int A;
  int B;
  int i;
  int ans;

  
  cin >> A;
  cin >> B;
  i=A%B
  ans=(A-i)/b+1
  cout << ans;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: expected ';' before 'ans'
   14 |   i=A%B
      |        ^
      |        ;
   15 |   ans=(A-i)/b+1
      |   ~~~
Language: C++

#include <iostream>
using namespace std
int a()
{
  int h,a;
  cin >> h >> a;
  int c=h/a;
  if(h%a==0)
    cout << c;
  else if 
    cout << c+1;
}

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | int a()
      | ~~~                 
a.cc: In function 'int a()':
a.cc:11:5: error: expected '(' before 'cout'
   11 |     cout << c+1;
      |     ^~~~
      |     (
a.cc:12:1: warning: no return statement in function returning non-void [-Wreturn-type]
   12 | }
      | ^
Language: C++

#include <iostream>
#include <string>
int main(){
int H,A,num=0;
  cin>>H>>A;
num=H/A;
    num+=1;
  cont<<num<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin>>H>>A;
      |   ^~~
      |   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:8:3: error: 'cont' was not declared in this scope; did you mean 'const'?
    8 |   cont<<num<<endl;
      |   ^~~~
      |   const
a.cc:8:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   cont<<num<<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)
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  {
  clrscr();
  int h,a,y = 1;
  cin>>h>>a;
  while(h-a>0)
  { y++;
    h=h-a;
  }
  cout<<y;
  getch();
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'clrscr' was not declared in this scope
    6 |   clrscr();
      |   ^~~~~~
a.cc:14:3: error: 'getch' was not declared in this scope; did you mean 'getc'?
   14 |   getch();
      |   ^~~~~
      |   getc
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: Java

import java.util.*;
import java.io.*;
public class solution {
    public static void main(String[] args) throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = br.readLine();
      String[] split = input.split(" ");
        int totalPower = Integer.parseInt(split[0]);
        int power = Integer.parseInt(split[1]);
        int count =  (int) Math.ceil((double)totalPower/power);
        System.out.println(count);
    }
}

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

#include<iostream>
using namespace std;
int main(){
 int H,A;
  cin>>H>>A;
  int d=floor(H/A);
  cout<<d<<endl;
  
  
  
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'floor' was not declared in this scope
    6 |   int d=floor(H/A);
      |         ^~~~~
Language: C++

#include <iostream>
#include <string>
int main(){
int H,A,num=0;
  cin>>H>>A;
num=H/A;
    n+=1;
  cont<<num<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin>>H>>A;
      |   ^~~
      |   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:7:5: error: 'n' was not declared in this scope
    7 |     n+=1;
      |     ^
a.cc:8:3: error: 'cont' was not declared in this scope; did you mean 'const'?
    8 |   cont<<num<<endl;
      |   ^~~~
      |   const
a.cc:8:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   cont<<num<<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)
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;

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

  if(a==1)
    cout<<(h/a)+<<endl;
   cout<<(h/a)+1<<endl;
     
     return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: expected primary-expression before '<<' token
   10 |     cout<<(h/a)+<<endl;
      |                 ^~
Language: C++

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

int main()
{
  int num;
  cin >> num;

  int a;
  cin >> a;

  int loss = num / a
  
  if(num==1) cout << 1 << endl;
  else if(a==1) cout << num << endl;
  else cout << loss + 1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: expected ',' or ';' before 'if'
   14 |   if(num==1) cout << 1 << endl;
      |   ^~
a.cc:15:3: error: 'else' without a previous 'if'
   15 |   else if(a==1) cout << num << endl;
      |   ^~~~
Language: C

int attacks=0;
while(H>0)
{
	H=H-A;
  attacks++;
}
printf("%d",attacks);

Compiler output:
main.c:2:1: error: expected identifier or '(' before 'while'
    2 | while(H>0)
      | ^~~~~
main.c:7:8: error: expected declaration specifiers or '...' before string constant
    7 | printf("%d",attacks);
      |        ^~~~
main.c:7:13: error: expected declaration specifiers or '...' before 'attacks'
    7 | printf("%d",attacks);
      |             ^~~~~~~
Language: C++

include <iostream>
using namespace std
int a()
{
  int h,a;
  cin >> h >> a;
  int c=h/a;
  if(h%a==0)
    cout << c;
  else if 
    cout << c+1;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
Language: Java

import java.util.*;
import java.io.*;
public class solution {
    public static void main(String[] args) throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String input = br.readLine();
      String[] split = input.split(" ");
        int totalPower = Integer.parseInt(split[0]);
        int power = Integer.parseInt(split[1]);
        int count = Math.ceil(totalPower/power);
        System.out.println(count);
    }
}

Compiler output:
Main.java:3: error: class solution is public, should be declared in a file named solution.java
public class solution {
       ^
Main.java:10: error: incompatible types: possible lossy conversion from double to int
        int count = Math.ceil(totalPower/power);
                             ^
2 errors
Language: Java

import java.util.Scanner;

public class ServalVsMonster {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		//入力A(モンスター体力)
		int a = sc.nextInt();

		//入力B(サーバルの攻撃値)
		int b = sc.nextInt();

		//モンスターの体力を0以下にする
		for (int i = 1; a > 0; i++) {

			a = a - b;

			System.out.println(i + "回目の攻撃の後のモンスターの体力は" + a + "です。");
		}

	}

}


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

import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in):
    int h = sc.nextInt();
    int a = sc.nextInt();
    if(h%a!=0)
    System.out.println((h/a)+1);
    else{
	System.out.println((h/a));
    }
  }
}

Compiler output:
Main.java:4: error: ';' expected
    Scanner sc = new Scanner(System.in):
                                       ^
1 error
Language: C

#include<stdio.h>

int main(void){
	int x;
	int y;
	Int z;
	
	scanf("%d", "%d", &x, %y);
	x/y =z;
	z++;
	printf("%d", &z);
	}





Compiler output:
main.c: In function 'main':
main.c:6:9: error: unknown type name 'Int'; did you mean 'int'?
    6 |         Int z;
      |         ^~~
      |         int
main.c:8:31: error: expected expression before '%' token
    8 |         scanf("%d", "%d", &x, %y);
      |                               ^
main.c:9:13: error: lvalue required as left operand of assignment
    9 |         x/y =z;
      |             ^
Language: C

#include<stdio.h>

int main(void){
	int x;
	int y;
	Int z;
	
	scanf("%d", "%d", &x, %y);
	x/y =z;
	z++;
	printf("%d", &z);
	}




Compiler output:
main.c: In function 'main':
main.c:6:9: error: unknown type name 'Int'; did you mean 'int'?
    6 |         Int z;
      |         ^~~
      |         int
main.c:8:31: error: expected expression before '%' token
    8 |         scanf("%d", "%d", &x, %y);
      |                               ^
main.c:9:13: error: lvalue required as left operand of assignment
    9 |         x/y =z;
      |             ^
Language: C++

#include <bits/c++std.h>

using namespace std;
int main(){
	int H, A, count = 0;
  	cin >> H >> A;
  	while(H > 0){
    	H -= A;
    	count++;
    }
  	cout << count << endl;
  	return 0;
}

Compiler output:
a.cc:1:10: fatal error: bits/c++std.h: No such file or directory
    1 | #include <bits/c++std.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class MyMain {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int hp = scanner.nextInt();
        int attack = scanner.nextInt();
        int result = hp / attack;
        scanner.close();
        System.out.println(result);
    }
}

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

import java.util.Scanner;

//AtCoder Beginner Contest 153
//A - Serval vs Monster
public class Main1 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int H = Integer.parseInt(sc.next());
		int A = Integer.parseInt(sc.next());
		sc.close();

		long ans = (H / A);
		if (H % A != 0) {
			ans++;
		}
		System.out.println(ans);
	}
}


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

import java.util.*;
import java.io.*;
public class solution {
    public static void main(String[] args) throws Exception{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String split = br.readLine();
        int totalPower = Integer.parseInt(split[0]);
        int power = Integer.parseInt(split[0]);
        int count = Math.ceil(totalPower/power);
        System.out.println(count);
    }
}

Compiler output:
Main.java:3: error: class solution is public, should be declared in a file named solution.java
public class solution {
       ^
Main.java:7: error: array required, but String found
        int totalPower = Integer.parseInt(split[0]);
                                               ^
Main.java:8: error: array required, but String found
        int power = Integer.parseInt(split[0]);
                                          ^
Main.java:9: error: incompatible types: possible lossy conversion from double to int
        int count = Math.ceil(totalPower/power);
                             ^
4 errors
Language: Java

public static void main( String[] args )
{
  Scanner scanner = new Scanner(System.in);
  int H = scanner.nextInt();
  int A = scanner.nextInt();
  int i= 0;

  while (true) {
    H = H - A;
    i++;
    if(H < 0)break;
  }

  System.out.println(i);

}

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: C++

#include<iostream>
using namespace std;

void main()
{
  int H, A;
  cin>>H>>A;
  int res;
  res = H / A;
  if((H%A)>0)
  {
    res ++;
  }
  cout<<res;
}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main()
      | ^~~~
Language: C

int attacks=0;
while(H>0){
	H=H-A;
  attacks++;
}
printf("%d",&attacks);

Compiler output:
main.c:2:1: error: expected identifier or '(' before 'while'
    2 | while(H>0){
      | ^~~~~
main.c:6:8: error: expected declaration specifiers or '...' before string constant
    6 | printf("%d",&attacks);
      |        ^~~~
main.c:6:13: error: expected declaration specifiers or '...' before '&' token
    6 | printf("%d",&attacks);
      |             ^
Language: C

#include<stdio.h>
#include<conio.h>
void main(){
 int h,a;
  scanf("%d",&h);
  scanf("%d",&a);
  int count=0;
  while(h>0)
  {
    h = h-a;
    count++;
  }
  printf("%d",count);
}

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int h,n;
  cin>>h>>n;i=0;
  while(h-n*i)
    i++;
  cout<<i<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: 'i' was not declared in this scope
    6 |   cin>>h>>n;i=0;
      |             ^
Language: C++

#include<conio.h>
#include<stdio.h>
#include<iostream.h>
void main()
  {
  int H, A, n;
  cout<<"health of monster:";
  cin>>H;
  cout<<"no.of times it can decrease:";
  cin>>A;
  n=0;
  do
    { n=H-A;
     }
  while(H! =0) ;
    cout<<n;
  }


  
  

Compiler output:
a.cc:1:9: fatal error: conio.h: No such file or directory
    1 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] arg) {
        int h = Integer.parseInt(argStr[0]);
        int a = Integer.parseInt(argStr[1]);

        int count = 0;
        while(h > 0) {
            h = h-a;
            count++;
        }

        System.out.println(count);
    }
}


Compiler output:
Main.java:5: error: cannot find symbol
        int h = Integer.parseInt(argStr[0]);
                                 ^
  symbol:   variable argStr
  location: class Main
Main.java:6: error: cannot find symbol
        int a = Integer.parseInt(argStr[1]);
                                 ^
  symbol:   variable argStr
  location: class Main
2 errors
Language: C

#include<iostream>
using namespace std;

int main(){
    int h, a, cnt=0;

    cin >> h;
    cin >> a;

    for(;h>0;){
        h -= a;
        cnt++;
    }

    cout << cnt << flush;
}

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

import java.util.Scanner;

//AtCoder Beginner Contest 153
//A - Serval vs Monster
public class Main11 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int H = Integer.parseInt(sc.next());
		int A = Integer.parseInt(sc.next());
		sc.close();

		long ans = (H / A);
		if (H % A != 0) {
			ans++;
		}
		System.out.println(ans);
	}
}


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

/*
 author : arush gupta
 date :26.01.2020
 */
 #include<bits/stdc++.h>
 using namespace std;
 int main() {
 ios::sync_with_stdio(false);
 cin.tie(0);
 cout.tie(0);
float h,a;
cin >> h>>a;:sync_with_stdio
cout << ceil(h/a)<<endl;

 return 0;
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: expected primary-expression before ':' token
   12 | cin >> h>>a;:sync_with_stdio
      |             ^
Language: Java

import java.util.*;
public class Main {
  public static void main (String[] args){
    Scanner sc = new Scanner(System.in);
    int H = sc.nextInt;
    int A = sc.nextInt;
    if ( H%A==0){
      System.out.println( H/A );}
    else{
      int i = H%A;
      System.out.println( (H-i)/A+1 );}
  }
}

Compiler output:
Main.java:5: error: cannot find symbol
    int H = sc.nextInt;
              ^
  symbol:   variable nextInt
  location: variable sc of type Scanner
Main.java:6: error: cannot find symbol
    int A = sc.nextInt;
              ^
  symbol:   variable nextInt
  location: variable sc of type Scanner
2 errors
Language: C++

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

int main() {
  int h,a;
  cin >> h >> a;
  int c=h/a;
  int d=h%a;
  if (d==0) {
  cout << c << endl;
  }
  else {
    cout << C+1 << endl;
  }
}


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

#include <bits/std++.h>
using namespace std;
typedef long long ll;
const int maxx = 1e5 + 7;
const int Inf = 1 << 30;
const ll INF = 1ll << 60;
int h, a;

int main() {
	scanf("%d %d", &h, &a);
	int ans = h / a;
	if(h % a) ans++;
	printf("%d\n", ans);
	return 0;
}

Compiler output:
a.cc:1:10: fatal error: bits/std++.h: No such file or directory
    1 | #include <bits/std++.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class Exercise
{
    public static void main( String[] args )
    {
        Scanner scanner = new Scanner(System.in);
        int H = scanner.nextInt();
        int A = scanner.nextInt();
        int i= 0;

        while (true) {
            H = H - A;
            i++;
            if(H < 0)break;
        }

        System.out.println(i);

    }
}

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

#include<iostream>
using namespace std;
int main()
{
  clrscr();
  int h,a,y = 1;
  cin>>h>>a;
  while(h-a>0)
  { y++;
    h=h-a;
  }
  cout<<y;
  getch();
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'clrscr' was not declared in this scope
    5 |   clrscr();
      |   ^~~~~~
a.cc:13:3: error: 'getch' was not declared in this scope; did you mean 'getc'?
   13 |   getch();
      |   ^~~~~
      |   getc
Language: C++

#include <bits/stdc++.h>
using namespace std;
void fast()
{
   ios_base::sync_with_stdio(false);
   cin.tie(NULL);
   cout.tie(NULL);
}

int main(void)
{
	fast();
	int a,b;
	cin>>a>>b;
	if(a%b==0)
	{
	    cout<<a/b<<endl;
	}
	else
	{
	  int c;
	  c=ceil(double a/ double b);
	  cout<<c<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:18: error: expected primary-expression before 'double'
   22 |           c=ceil(double a/ double b);
      |                  ^~~~~~
Language: C++

#include<iostream>
using namespace std;

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

    int a;
    if(h%a==0)
    cout<<(h/a)+1<<endl;
    else
    {
        cout<<(h/a)+1<<endl;
    }
     
     return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: redeclaration of 'int a'
    9 |     int a;
      |         ^
a.cc:6:11: note: 'int a' previously declared here
    6 |     int h,a;
      |           ^
Language: Java

import java.io.*;
class Ques1
{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));			   
String[] strs=br.readLine().trim().split("\\s+");      
  h=Integer.parseInt(strs[0]);
  a=Integer.parseInt(strs[1]);
  if(h%a==0)
    System.out.println(h/a);
  else
    System.out.println((h/a)+1);
}
}

Compiler output:
Main.java:7: error: cannot find symbol
  h=Integer.parseInt(strs[0]);
  ^
  symbol:   variable h
  location: class Ques1
Main.java:8: error: cannot find symbol
  a=Integer.parseInt(strs[1]);
  ^
  symbol:   variable a
  location: class Ques1
Main.java:9: error: cannot find symbol
  if(h%a==0)
     ^
  symbol:   variable h
  location: class Ques1
Main.java:9: error: cannot find symbol
  if(h%a==0)
       ^
  symbol:   variable a
  location: class Ques1
Main.java:10: error: cannot find symbol
    System.out.println(h/a);
                       ^
  symbol:   variable h
  location: class Ques1
Main.java:10: error: cannot find symbol
    System.out.println(h/a);
                         ^
  symbol:   variable a
  location: class Ques1
Main.java:12: error: cannot find symbol
    System.out.println((h/a)+1);
                        ^
  symbol:   variable h
  location: class Ques1
Main.java:12: error: cannot find symbol
    System.out.println((h/a)+1);
                          ^
  symbol:   variable a
  location: class Ques1
8 errors
Language: C++

#include <iostream>
using namespace std;
int main(){
int h, a;
  cin >> h >> a;
  int res=h/a;
  if(h%a){++res}
  cout << res;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected ';' before '}' token
    7 |   if(h%a){++res}
      |                ^
      |                ;
Language: Java

import java.util.*;

public class AtCoder {
    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        try {
            int health = in.nextInt();
            int damage = in.nextInt();

            int total_attacks = (health / damage);

            if (health % damage != 0)
                total_attacks++;

            System.out.println(total_attacks);
            in.close();
        } catch (Exception e) {
            return;
        }
    }
}

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