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

#include<bits/stdc++.h>
using namespace std;
#define ll            long long
#define nl            "\n"
#define PB            push_back
#define _SAD()        ios::sync_with_stdio(0),cin.tie(0), cout.tie(0);
#define SZ(s)         s.size()
#define SRT(x,y)      sort(x,x+y)
#define REV(a,b)      reverse(a,a+b)
#define VSRT(x)       sort(x.begin(),x.end())
#define VREV(x)       reverse(x.begin(),x.end())
int main()
{
    _SAD()
    int n,r;
    cin>>n>>r;
    cout<<n%r<<nl
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: expected ';' before 'return'
   18 |     return 0;
      |     ^~~~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
#define int ll
#define double long double
#define YES {cout<<"YES"<<'\n';}
#define NO {cout<<"NO"<<'\n';}
#define Yes {cout<<"Yes"<<'\n';}
#define No {cout<<"No"<<'\n';}
#define yes {cout<<"yes"<<'\n';}
#define no {cout<<"no"<<'\n';}
void YN(bool flg){cout<<(flg?"YES":"NO")<<'\n';}
void Yn(bool flg){cout<<(flg?"Yes":"No")<<'\n';}
void yn(bool flg){cout<<(flg?"yes":"no")<<'\n';}
#define SORT(a) sort(a.begin(),a.end())
#define REVERSE(a) reverse(a.begin(),a.end())
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define out(n) {cout << n << '\n';}
typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<bool> VB;
typedef vector<VI> VVI;
const int MOD = 1000000007;
const long long INF = 10e10;
const double PI = acos(-1.0);
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T>auto MAX(const T& a) { return *max_element(a.begin(),a.end()); }
template<class T>auto MIN(const T& a) { return *min_element(a.begin(),a.end()); }
int ABS(int a) {if(a<0) a = -a; return a;}
template<class T, class U>U SUM(const T& a, const U& v) { return accumulate(a.begin(),a.end(), v); }
template<class T, class U>U COUNT(const T& a, const U& v) { return count(a.begin(),a.end(), v); }
template<class T, class U>int LOWER(const T& a, const U& v) { return lower_bound(a.begin(),a.end(), v) - a.begin(); }
template<class T, class U>int UPPER(const T& a, const U& v) { return upper_bound(a.begin(),a.end(), v) - a.begin(); }
int GCD(int a, int b) { return b ? GCD(b, a%b) : a; }
int LCM(int a, int b) { int g = GCD(a, b); return a / g * b; }
int POW(int a, int n) { int r = 1; while (n > 0) { if (n & 1)r *= a; a *= a; n /= 2; }return r; }
int isPrime(int n){if(n<2){return 0;}for(int i=2; i*i<=n; i++){if(n%i==0){return 0;}}return 1;}
/*素因数分解*/map< int, int >prime_factor(int n){map< int, int > ret;for(int i = 2; i * i <= n; i++) {while(n % i == 0) {ret[i]++;n /= i;}}if(n != 1) ret[n] = 1;return ret;}
/*約数の個数*/int divisor_number(int n){auto p = prime_factor(n); int res = 1; for(auto x:p)res*=(x.second+1); return res;}
/*約数列挙*/vector<int> divisor(int n){vector<int> v; for(int i=1; i*i<=n; i++){if(n%i==0){v.push_back(i);if(i!=n/i){v.push_back(n/i);}}}sort(v.begin(),v.end()); return v;}
//----------------ライブラリとか----------------

signed main(){
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout<<fixed<<setprecision(15);

    int a,b; cin >> a >> b;
    cout << a%b!=0 << endl;

    return 0;
}

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

#include<stdio.h>
    int main(){
        int N, K;
            scanf("%d%d", &N, &K);
                if(N % K == 0){
                    printf("0");
                }else{
                    printf("1")
                }
        return 0;             
    }

Compiler output:
main.c: In function 'main':
main.c:8:32: error: expected ';' before '}' token
    8 |                     printf("1")
      |                                ^
      |                                ;
    9 |                 }
      |                 ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    int N, K;
    cin >> N >> K;

    cout << (A % B ? 1 : 0) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 'A' was not declared in this scope
    8 |     cout << (A % B ? 1 : 0) << endl;
      |              ^
a.cc:8:18: error: 'B' was not declared in this scope
    8 |     cout << (A % B ? 1 : 0) << endl;
      |                  ^
Language: Java

package kyoupuro;
import java.util.Scanner;

 public class kyoupuro {
	public static void main(String[] args) {
	Scanner s = new Scanner(System.in);
	int x = s.nextInt();
	int y = s.nextInt();
	
System.out.println((x/y+x%y)-x/y);
}
}

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


import java.util.Scanner;

 public class kyoupuro {
	public static void main(String[] args) {
	Scanner s = new Scanner(System.in);
	int x = s.nextInt();
	int y = s.nextInt();
	
System.out.println((x/y+x%y)-x/y);
}
}

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


import java.util.Scanner;

public class kyoupuro {
	public static void main(String[] args) {
	Scanner s = new Scanner(System.in);
	int x = s.nextInt();
	int y = s.nextInt();
	
System.out.println((x/y+x%y)-x/y);
}
}

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

package kyoupuro;
import java.util.Scanner;

public class kyoupuro {
	public static void main(String[] args) {
	Scanner s = new Scanner(System.in);
	int x = s.nextInt();
	int y = s.nextInt();
	
System.out.println((x/y+x%y)-x/y);
}
}

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: expected primary-expression before 'if'
    8 |         (if n % k == 0)cout << 0 << endl;
      |          ^~
a.cc:8:10: error: expected ')' before 'if'
    8 |         (if n % k == 0)cout << 0 << endl;
      |         ~^~
      |          )
a.cc:9:9: error: 'else' without a previous 'if'
    9 |         else cout << 1 << endl;
      |         ^~~~
Language: C++

#i n cl u d e <s t d i o . h>
i n t  main ( )
{
i n t  a , b ;
s c a n f (”%d%d ” , &a , &b ) ;
p r i n t f (”%d ” , a%b != 0 ) ;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #i; did you mean #if?
    1 | #i n cl u d e <s t d i o . h>
      |  ^
      |  if
a.cc:5:12: error: extended character ” is not valid in an identifier
    5 | s c a n f (”%d%d ” , &a , &b ) ;
      |            ^
a.cc:5:18: error: extended character ” is not valid in an identifier
    5 | s c a n f (”%d%d ” , &a , &b ) ;
      |                  ^
a.cc:6:14: error: extended character ” is not valid in an identifier
    6 | p r i n t f (”%d ” , a%b != 0 ) ;
      |              ^
a.cc:6:18: error: extended character ” is not valid in an identifier
    6 | p r i n t f (”%d ” , a%b != 0 ) ;
      |                  ^
a.cc:2:1: error: 'i' does not name a type
    2 | i n t  main ( )
      | ^
Language: C

#i n cl u d e <s t d i o . h>
i n t  main ( )
{
i n t  a , b ;
s c a n f (”%d%d ” , &a , &b ) ;
p r i n t f (”%d ” , a%b != 0 ) ;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #i; did you mean #if?
    1 | #i n cl u d e <s t d i o . h>
      |  ^
      |  if
main.c:2:1: error: unknown type name 'i'
    2 | i n t  main ( )
      | ^
main.c:2:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 't'
    2 | i n t  main ( )
      |     ^
main.c:2:5: error: unknown type name 't'
main.c:5:12: error: stray '\342' in program
    5 | s c a n f (<U+201D>%d%d <U+201D> , &a , &b ) ;
      |            ^~~~~~~~
main.c:5:18: error: stray '\342' in program
    5 | s c a n f (<U+201D>%d%d <U+201D> , &a , &b ) ;
      |                         ^~~~~~~~
main.c:6:14: error: stray '\342' in program
    6 | p r i n t f (<U+201D>%d <U+201D> , a%b != 0 ) ;
      |              ^~~~~~~~
main.c:6:18: error: stray '\342' in program
    6 | p r i n t f (<U+201D>%d <U+201D> , a%b != 0 ) ;
      |                         ^~~~~~~~
Language: C

#i n cl u d e <s t d i o . h>
i n t main ( )
{
i n t a , b ;
s c a n f (”%d%d ” , &a , &b ) ;
p r i n t f (”%d\n ” , a%b != 0 ) ;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #i; did you mean #if?
    1 | #i n cl u d e <s t d i o . h>
      |  ^
      |  if
main.c:2:1: error: unknown type name 'i'
    2 | i n t main ( )
      | ^
main.c:2:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 't'
    2 | i n t main ( )
      |     ^
main.c:2:5: error: unknown type name 't'
main.c:5:12: error: stray '\342' in program
    5 | s c a n f (<U+201D>%d%d <U+201D> , &a , &b ) ;
      |            ^~~~~~~~
main.c:5:18: error: stray '\342' in program
    5 | s c a n f (<U+201D>%d%d <U+201D> , &a , &b ) ;
      |                         ^~~~~~~~
main.c:6:14: error: stray '\342' in program
    6 | p r i n t f (<U+201D>%d\n <U+201D> , a%b != 0 ) ;
      |              ^~~~~~~~
main.c:6:17: error: stray '\' in program
    6 | p r i n t f (”%d\n ” , a%b != 0 ) ;
      |                 ^
main.c:6:20: error: stray '\342' in program
    6 | p r i n t f (<U+201D>%d\n <U+201D> , a%b != 0 ) ;
      |                           ^~~~~~~~
Language: C++

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

int main() {
  intA,B;
  cin>>A>>B;
  if(A%B==0){
    cout<<0<<endl;
  }
  else{
    cout<<1<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'intA' was not declared in this scope; did you mean 'int'?
    5 |   intA,B;
      |   ^~~~
      |   int
a.cc:5:8: error: 'B' was not declared in this scope
    5 |   intA,B;
      |        ^
a.cc:6:8: error: 'A' was not declared in this scope
    6 |   cin>>A>>B;
      |        ^
Language: C++

 int n,k;
    cin>>n>>k;
    if(n%k==0)
    {
        cout<<0;
    }
    else
    {
        cout<<1;
    }

Compiler output:
a.cc:2:5: error: 'cin' does not name a type
    2 |     cin>>n>>k;
      |     ^~~
a.cc:3:5: error: expected unqualified-id before 'if'
    3 |     if(n%k==0)
      |     ^~
a.cc:7:5: error: expected unqualified-id before 'else'
    7 |     else
      |     ^~~~
Language: C

#include<stdio.h>
int main(void)
{
  int n,k;
  int hito[10000]={0};
  scanf("%d %d",&n,&k);
  while(k>0){
    for(int i=0;i<n&&k>0;i++){
    hito[i]++;
    k--;
  	}
  }
  for(int i=0;i<n-1;i++){
    for(int j=i+1;j<n;j++){
      if(hito[i]>hito[j]){
        int temp=hito[i];
        hito[i]=hito[j];
        hito[j]=temp;
      }
    }
  }
  priintf("%d\n",hito[n-1]-hito[0]);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:3: error: implicit declaration of function 'priintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   22 |   priintf("%d\n",hito[n-1]-hito[0]);
      |   ^~~~~~~
      |   printf
Language: Java

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

      int n = sc.nextInt();
      int k = sc.nextInt();

      if(n<k){
        System.out.println(1);
        System.exit(0);
      }
      if(n%k==0){
        System.out.println(0);
      }
      if(n%k!=0){
        System.out.println(1);
      }

      }


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

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

      int n = sc.nextInt();
      int k = sc.nextInt();

      if(n<k){
        System.out.println(0);
        System.exit(0);
      }
      if(n%k==0){
        System.out.println(0);
      }
      if(n%k!=0){
        System.out.println(n%k);
      }

      }

  }

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

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

int main() {
  int N, K;
  cin >> N　>> K;
  cout << ((N % K == 0) ? 0 : 1) << endl;
  return 0;
}


Compiler output:
a.cc:6:10: error: extended character 　 is not valid in an identifier
    6 |   cin >> N　>> K;
      |          ^
a.cc: In function 'int main()':
a.cc:6:10: error: 'N\U00003000' was not declared in this scope
    6 |   cin >> N　>> K;
      |          ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a, b;
  cin>>a>>b;
  cout<<a%b;
  return 0;

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

#include<iostream>

using namespace std;

int main(){
  
 cin >> a >> b;
  int ans = 1;
 if(a%b==0) ans = 0;
  
  cout << ans << endl;
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'a' was not declared in this scope
    7 |  cin >> a >> b;
      |         ^
a.cc:7:14: error: 'b' was not declared in this scope
    7 |  cin >> a >> b;
      |              ^
Language: C++

#include<iostream>
using namespace std;
int main() {
	int n, k;
	cin >> n >> k;
	if (n % k == 0) {
		cout << "0" << endl;
		return 0;
	}
	cout << k-n/k << endl;
	return 0;

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

#include <iostream>
#include <vector>
#include <limits.h>
#include <algorithm>
#include <string>
#include <math.h>
#include <limits.h>
#include <queue>
#include <map>
#include <set>
#include <iomanip>
#include <bitset>
#include <cassert>
#include <random>
#include <functional>
#include <stack>
#include <iomanip>
#include <cassert>
using namespace std;
long long MOD = 1e9 + 7;

int N, M;
vector<int> V;
vector<vector<long long>> DP;   //上限、和
vector<int> primes;
vector<int> counter;

int N, K;

int main() {
	cin >> N >> K;
	cout << (int)ceil((double)N / K) - (int)floor((double)N / K) << endl;
	return 0;
}

Compiler output:
a.cc:28:5: error: redefinition of 'int N'
   28 | int N, K;
      |     ^
a.cc:22:5: note: 'int N' previously declared here
   22 | int N, M;
      |     ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string.h>
#include <iomanip>
#include <map>
using namespace std;
int main()
{
    int a, b;
    cin >> a >> b;
    if (a % b > 0)
    {
        cout << "1" << endl;
    }
    else
    {
        cout "0" << endl;
    }

    return 0;
}

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

#include <iostream>
#include <vector>
#include <algorithm>
#include <string.h>
#include <iomanip>
#include <map>
using namespace std;
int main()
{
    int a, b;
    cin >> a >> b;
    if (b % a > 0)
    {
        cout << "1" << endl;
    }
    else
    {
        cout "0" << endl;
    }

    return 0;
}

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

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

int main(){
 int n,k;
cin >> n >> k;
if(n%K != 1)cout << 1 << endl;
  else cout << n%k << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: 'K' was not declared in this scope
    7 | if(n%K != 1)cout << 1 << endl;
      |      ^
Language: C++

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

int main() {
  int N,K;
  cin >> N >> K;
  if(N%K==0){
    cout << '0' << endl;
  }
  else{
    cout << '1' << endl;
  }
  




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

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

int main() {
  int N,K;
  cin >> N >> K;
  if(N%K==0){
    cout << 0 << endl;
  }
  else{
    cout << 1 << endl;
  }
  




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

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

int main(){
    int n,k;
    cin >>n>>k;
    cout<< n%k;
}#include <bits/stdc++.h>
using namespace std;

int main(){
    int n,k;
    cin >>n>>k;
    cout << min({n%k,abs(k-n%k)});
}

Compiler output:
a.cc:8:2: error: stray '#' in program
    8 | }#include <bits/stdc++.h>
      |  ^
a.cc:8:3: error: 'include' does not name a type
    8 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:11:5: error: redefinition of 'int main()'
   11 | int main(){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(){
      |     ^~~~
Language: C++

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

int main() {
   int N,K;
   cin >> N >> K;
   if(N % K == 0){
   	cout << 0 << endl;
   }
   else{
   	cout << 1 << endl;
   }


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

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, n) for (int i = (n); i >= 0; --i)
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
#define FORR(i, m, n) for (int i = (m); i >= (n); --i)
#define ifaxb(a, x, b) if (a < x && x < b)
#define toInt(x) (x - '0')
#define vi vector<int>
#define vvi vector<vi>
#define vs vector<string>
#define vvs vector<vs>
#define all(x) x.begin(), x.end()
#define INF 2147483647
#define _INF -2147483647
#define pi 3.1415926536
#define MAXN 100004
using namespace std;
typedef long long ll;

int main() {
  int N, K;
  cin >> N >> K;
  cout << N % K << endl;
  return 0;


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

#include<iostream>
using namespace std;
int main(){
  int a,b;
  cin >> a >> b;
  if(a%b) cout << 1 << else;
  else cout << 0 << else;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:24: error: expected primary-expression before 'else'
    6 |   if(a%b) cout << 1 << else;
      |                        ^~~~
a.cc:7:21: error: expected primary-expression before 'else'
    7 |   else cout << 0 << else;
      |                     ^~~~
Language: C++

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

int main(){
  int a,b;
  cin>>a>>b;
  if(a%b) cout<<"1";
  else cout<<"0"
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected ';' before '}' token
    8 |   else cout<<"0"
      |                 ^
      |                 ;
    9 | }
      | ~
Language: C++

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

int main() {
  int n;
  cin>>n;
  if(n%4==0){
    cout<<"Yes"<<endl;
  }
  else if(n%7==0){
    cout<<"Yes"<<endl;
  }
  else if((n-(n/4)*4)%7==0){
    cout<<"Yes"<<endl;
  }
  else if((n-(n/7)*7)%4==0){
    coutr<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'coutr' was not declared in this scope
   17 |     coutr<<"Yes"<<endl;
      |     ^~~~~
Language: C++

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    itn a,b;
    cin>>a>>b;
    if(a%b==0) cout<<0<<"\n";
    else cout<<"1\n";
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'itn' was not declared in this scope; did you mean 'int'?
    4 |     itn a,b;
      |     ^~~
      |     int
a.cc:5:10: error: 'a' was not declared in this scope
    5 |     cin>>a>>b;
      |          ^
a.cc:5:13: error: 'b' was not declared in this scope
    5 |     cin>>a>>b;
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  itn a,b;
  cin>>a>>b;
  if(a%b==0) cout<<0<<"\n";
  else cout<<"1\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'itn' was not declared in this scope; did you mean 'int'?
    4 |   itn a,b;
      |   ^~~
      |   int
a.cc:5:8: error: 'a' was not declared in this scope
    5 |   cin>>a>>b;
      |        ^
a.cc:5:11: error: 'b' was not declared in this scope
    5 |   cin>>a>>b;
      |           ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  int N,K;
  cin >> N >> K;
  
  cout << N%K != 0 << endl;
}


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

#include,iostream>
using namespace std;

int main(){
  int n, a;
  cin >> n >> a;
  if (n%a == 0){
     cout << 0 << endl;
  }
  else {
     cout << 1 << endl;
  }
  return 0;
}

Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include,iostream>
      |         ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> n >> a;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include,iostream>
a.cc:8:6: error: 'cout' was not declared in this scope
    8 |      cout << 0 << endl;
      |      ^~~~
a.cc:8:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:19: error: 'endl' was not declared in this scope
    8 |      cout << 0 << endl;
      |                   ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include,iostream>
a.cc:11:6: error: 'cout' was not declared in this scope
   11 |      cout << 1 << endl;
      |      ^~~~
a.cc:11:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:19: error: 'endl' was not declared in this scope
   11 |      cout << 1 << endl;
      |                   ^~~~
a.cc:11:19: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

int main() {
  int N,K; cin >> N >> K;
  cout << N % K != 0 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |   cout << N % K != 0 << endl;
      |                    ~~^~~~~~~
Language: C

#include<stdio.h>

int main(){

int N,K;
int i, j;

scanf("%d%d",&N,&K);
int A[100];
for(i=N;i>0;i--){
  A[j]++;
  j++;
  if(K+1==j)
    j=0
}
printf("%d\n",A[0]-A[K]);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:14:8: error: expected ';' before '}' token
   14 |     j=0
      |        ^
      |        ;
   15 | }
      | ~
Language: C

#include <stdio.h>

int main(void)
{
  int N, K;
  scanf("%d %d", &N, &K);
  prinf("%d", N%K);
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
    7 |   prinf("%d", N%K);
      |   ^~~~~
      |   printf
Language: C

#include <stdio.h>

int main(void){
  int n,k,a,ex=0;
      scanf("%d %d",&n,&k);
      a = i % j;
      if(a>0){
        ex = 1;
      }
      printf("%2d\n",ex);


  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:11: error: 'i' undeclared (first use in this function)
    6 |       a = i % j;
      |           ^
main.c:6:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:15: error: 'j' undeclared (first use in this function)
    6 |       a = i % j;
      |               ^
Language: C

#include <stdio.h>

int main(void){
  int n,k,a,ex=0;
      scanf("%d %d",&n,&k);
      a = i % j;
      if(a>0){
        ex = 1;
      }
      printf("%2d\n",ex);
    }
  }

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:11: error: 'i' undeclared (first use in this function)
    6 |       a = i % j;
      |           ^
main.c:6:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:15: error: 'j' undeclared (first use in this function)
    6 |       a = i % j;
      |               ^
main.c: At top level:
main.c:12:3: error: expected identifier or '(' before '}' token
   12 |   }
      |   ^
main.c:14:3: error: expected identifier or '(' before 'return'
   14 |   return 0;
      |   ^~~~~~
main.c:15:1: error: expected identifier or '(' before '}' token
   15 | }
      | ^
Language: C

#include <stdio.h>

int main(void){
  int N,K;
  scanf("%d %d",&N,&K);
  A = N % K;
  if(A<0){
    A = A - (2 * A);
  }
  printf("%d\n",A);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:3: error: 'A' undeclared (first use in this function)
    6 |   A = N % K;
      |   ^
main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <string>
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <utility>

using namespace std;
using ll=long long;

void solve(){
  int num,k;
  cin >> num >> k;
  cout << num%k>0 << endl;
}

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

Compiler output:
a.cc: In function 'void solve()':
a.cc:19:19: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   19 |   cout << num%k>0 << endl;
      |                 ~~^~~~~~~
Language: C++

#include <string>
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <utility>

using namespace std;
using ll=long long;

void solve(){
  int num,k
  cin >> num >> k;
  cout << num%k>0 << endl;
}

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

Compiler output:
a.cc: In function 'void solve()':
a.cc:18:3: error: expected initializer before 'cin'
   18 |   cin >> num >> k;
      |   ^~~
a.cc:19:15: error: 'k' was not declared in this scope
   19 |   cout << num%k>0 << endl;
      |               ^
a.cc:19:19: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   19 |   cout << num%k>0 << endl;
      |                 ~~^~~~~~~
Language: C++

//#include <bits/stdc++.h>
#include <string>
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <utility>

using namespace std;
using ll=long long;

void solve(){
  int num,k
  cin >> num >> k;
  cout << num%k << endl;
}

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


Compiler output:
a.cc: In function 'void solve()':
a.cc:19:3: error: expected initializer before 'cin'
   19 |   cin >> num >> k;
      |   ^~~
a.cc:20:15: error: 'k' was not declared in this scope
   20 |   cout << num%k << endl;
      |               ^
Language: Java

import java.util.*;

public class Main {
  public static main(String[] args) {
    Scanner s = new Scanner(System.in);
    int N = s.nextInt();
    int K = s.nextInt();
    
    System.out.println(N == K ? 0 : 1);
  }
}

Compiler output:
Main.java:4: error: invalid method declaration; return type required
  public static main(String[] args) {
                ^
1 error
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:2: error: expected '}' at end of input
   11 | }
      |  ^
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;
  if(N%K == 0){
    cout << 0;
  }
  else{
    cout << 1;
  return 0;
}
  


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

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

int main(){
  int N, K;
  cin >> N >> K;
  if(N>=K){
    int ans = N%K;
  }else if(N==0){
    int ans = 0;
  }else{
    int ans = 1;
  }
 
  cout << ans << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef pair<ll, P> PP;
 
static const double EPS = 1e-8;
static const double PI = 4.0 * atan(1.0);
static const ll INF = 1023456789;
 
#define REP(i,n)	for(int i=0;i<n;++i)
#define REPR(i,n)	for(int i=n-1;i>=0;--i)
#define FOR(i,s,n)	for(int i=s;i<n;++i)
#define FORR(i,s,n)	for(int i=n-1;i>=s;--i)
#define ALL(c)		(c).begin(),(c).end()
#define CLEAR(v)	memset(v,0,sizeof(v))
#define MP(a,b)		make_pair((a),(b))
#define ABS(a)		((a)>0?(a):-(a))
#define F			first
#define S			second
 
int main(int argc, char **argv) {
	int n, k;
	cin >> n >> k;
	cout << (n % k = 0 ? 0 : 1) << endl;
	return 0;
}
 

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:28:20: error: lvalue required as left operand of assignment
   28 |         cout << (n % k = 0 ? 0 : 1) << endl;
      |                  ~~^~~
Language: C++

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

int main(){
    int n,k;
    cin>>n>>k;
    cout<<n%k!=0<<endl;
    return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
int main(){
  int x;
  cin>>x;
  int res=0;
  for(int i=0;i<100;i++){
    for(int k=0;k<100;k++){
      int total=i*7+k*4;
      if (total==x)res+++
    }
  }
  if(res>0)cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
  
    }


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

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

int main() {
int N,K;
  cin >>N>>K;
  if(N%K==0){
    cout <<0;
  }
  else if(N%K!=0){
    cout <<1;

}


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

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); i++)
#define rep1(i,n) for (int i = 1; i <= (n); i++)
#define repm(i,m,n) for (int i = m; i < (n); i++)
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;

int main() {
  int N, K;
  cin >> N >> K;
  
  cout << N%K != 0 << endl;
}

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

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

Compiler output:
a.cc:1:24: error: missing terminating > character
    1 | #include<bits/stdc++.h.
      |                        ^
a.cc:1:9: fatal error: bits/stdc++.h.: No such file or directory
    1 | #include<bits/stdc++.h.
      |         ^
compilation terminated.
Language: C++

  1 #include <bits/stdc++.h>
  2 
  3 using namespace std;
  4 
  5 int main(void){
  6         int n,k;
  7         cin >> n >> k;
  8         cout << (n%k) << endl;
  9         return 0;
 10 }


Compiler output:
a.cc:1:5: error: stray '#' in program
    1 |   1 #include <bits/stdc++.h>
      |     ^
a.cc:1:3: error: expected unqualified-id before numeric constant
    1 |   1 #include <bits/stdc++.h>
      |   ^
a.cc:4:3: error: expected unqualified-id before numeric constant
    4 |   4
      |   ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    int n, k;
    cin >> n >> k;

    int ans = 0;
    ans = n % k;
    cout << asn << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'asn' was not declared in this scope; did you mean 'ans'?
   10 |     cout << asn << endl;
      |             ^~~
      |             ans
Language: C++

#include<bits/stdc++.h>
#include <math.h>
#include<iostream>
#include <string>
using namespace std;
typedef long long ll;
#define pb pushback
#define fr(i,n) for(int i=0;i<n;i++)
#define ifr(i,n) for(int i=n-1;i>=0;i--)


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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: 'n' was not declared in this scope
   16 |     if(n%k==0)ans=0;
      |        ^
a.cc:16:10: error: 'k' was not declared in this scope
   16 |     if(n%k==0)ans=0;
      |          ^
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <string>
#include <map>

using namespace std;
int main(int argc, const char * argv[]) {
    
    int n, k;
    cin >> n >> k;
    cout << ( n%k == 0 ) ? 0 : 1 << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:16:34: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   16 |     cout << ( n%k == 0 ) ? 0 : 1 << endl;
      |                                ~~^~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
    int n,i;
    cin >> n >> i;
    cout << n % i != 0 << endl;
}

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

#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <numeric>
#include <tuple>
#include <stack>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define print(s) cout << s << endl
using namespace std;
const int INF = 1e9;
typedef long long lint;
const lint LINF = 1e18;
const lint MOD = 1e9 + 7;
// const lint MOD = 998244353;
int ctoi(char c) {
	if (c >= '0' && c <= '9') {
		return c - '0';
	}
	return 0;
}
char upper(char c){
	return c-0x20;
}
char lower(char c){
	return c+0x20;
}

int gcd(int x, int y) {
  if (y == 0) return x;
  return gcd(y, x%y);
}
 
int main(){
	cin >> N;
    string s = "";
    int n = N;
    while(n!=0) {
        if(n%2) {
            s = '1' + s;
            n--;
            n/= -2;
        } else {
            s = '0' + s;
            n/= -2;
        }
    }
    if(N == 0) cout << 0 << endl;
    else cout << s << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:16: error: 'N' was not declared in this scope
   39 |         cin >> N;
      |                ^
Language: C++

#include<iostream>
using namesace std;

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

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesace'
    2 | using namesace std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     cin >> n >> k;
      |     ^~~
      |     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:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         cout << 0 << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |         cout << 0 << endl;
      |                      ^~~~
      |                      std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |         cout << 1 << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |         cout << 1 << endl;
      |                      ^~~~
      |                      std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define REP(i, n) for(int i = 0; i < (n); i++)
#define SORT(v, n) sort(v, v+n);
#define SSORT(v, n) sort(v, v+n, greater<int>())

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: 'i' was not declared in this scope
   12 |         if(n>=k) cout << n%i << endl;
      |                            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
    cin >> n;
    while(n > 0)
    {
        if(n % 4 == 0 || n % 7 == 0) return cout << "Yes\n";
        else n -= 7;
    }
    cout << "No\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:50: error: cannot convert 'std::basic_ostream<char>' to 'int' in return
    8 |         if(n % 4 == 0 || n % 7 == 0) return cout << "Yes\n";
      |                                             ~~~~~^~~~~~~~~~
      |                                                  |
      |                                                  std::basic_ostream<char>
Language: C++

#include<iostream>
#include<string>
#include<typeinfo>
#include<vector>
#include<algorithm>
#include<map>
#include<iomanip>
using namespace std;
int main()
{
	int a, b;
  	cin >> a >> b;
	cout << (a%b) & 1 << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:27: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   13 |         cout << (a%b) & 1 << endl;
      |                         ~~^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, K;
  cin >> N >> K;
  string ans;
  if (N % K == 0){
    ans = 0
  }
  else {
    ans = 1
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: ambiguous overload for 'operator=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
    9 |     ans = 0
      |           ^
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:817:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  817 |       operator=(const basic_string& __str)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:828:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  828 |       operator=(const _CharT* __s)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:840:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  840 |       operator=(_CharT __c)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:858:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  858 |       operator=(basic_string&& __str)
      |       ^~~~~~~~
a.cc:12:12: error: expected ';' before '}' token
   12 |     ans = 1
      |            ^
      |            ;
   13 |   }
      |   ~
Language: C

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

#define MAX(p,q) ((p>q)?(p):(q))
#define MIN(p,q) ((p<q)?(p):(q))

#define REP(i,n) for(i=0;i<n;i++)

int main(void)
{
  int n,k,ans;
  scanf("%d%d",&n,&k);
  ans = (n%k==0)
  printf("%d",ans);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:15:17: error: expected ';' before 'printf'
   15 |   ans = (n%k==0)
      |                 ^
      |                 ;
   16 |   printf("%d",ans);
      |   ~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N,K;
  cin>>N>>K;
  if(N%K==0){
    cout<'0'<<endl;
  }
  else{
    cout<<'1'<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: invalid operands of types 'char' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |     cout<'0'<<endl;
      |          ~~~^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N,K;
  cin>>N>>K;
  if(N%K==0){
    cout<'0'<<end;
  }
  else{
    cout<<'1'<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: invalid operands of types 'char' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |     cout<'0'<<end;
      |          ~~~^~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
int n,k;
  cin >> n >> k;
 cout << (n%k==0)?0:1 << endl;
  return 0;
}

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

#include<algorithm>
#include <iostream>
#include<cstdio>
#include<cmath>
#include<iomanip>
#include<string>
using namespace std;
int main() {

	int n, k;
	cin >> n >> k;

	int a;
	a = n % k;

	if (a == 0) {}
	cout << a << endl;
}
else {
	cout << "1" << endl;
}

Compiler output:
a.cc:19:1: error: expected unqualified-id before 'else'
   19 | else {
      | ^~~~
Language: C++

#include "stdafx.h"
#include<algorithm>
#include <iostream>
#include<cstdio>
#include<cmath>
#include<iomanip>
#include<string>
using namespace std;
int main() {

	int n,k;
	cin >> n>>k;

	int s,a;
	s = n / k;
	a = n % k;

	int ans;
	ans = s - a;
	int an;
	an = 0 - ans;

	if (a == 0) { cout << a << endl; }
	else if (ans >= 0) { cout << ans << endl; }
	else { cout << an << endl; }
	



	return 0;
}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

// ConsoleApplication1.cpp : アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include<algorithm>
#include <iostream>
#include<cstdio>
#include<cmath>
#include<iomanip>
#include<string>
using namespace std;
int main() {

	int n,k;
	cin >> n>>k;

	int s,a;
	s = n / k;
	a = n % k;

	int ans;
	ans = s - a;
	int an;
	an = 0 - ans;

	if (ans >= 0) { cout << ans << endl; }
	else { cout << an << endl; }




	return 0;
}



Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int main(void)
{
  int N, K;
  scanf("%d%d", &N, &K);
  printf("%d\n"a, N%K > 0 ? 1 : 0);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:16: error: expected ')' before 'a'
    7 |   printf("%d\n"a, N%K > 0 ? 1 : 0);
      |         ~      ^
      |                )
Language: C++

#include <iostream>

int main() {
    int n, k;
    std::cin >> n >> k 
    if (n % k == 0) {
        std::cout << "0" << std::endl;
        return 0;
    }
    std::cout << "1" << std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:23: error: expected ';' before 'if'
    5 |     std::cin >> n >> k
      |                       ^
      |                       ;
    6 |     if (n % k == 0) {
      |     ~~
Language: C++

#include <iostream>

int main() {
    int n, k;
    std::cin >> n >> k 
    if (n % k == 0) {
        std::cout << 0 << std::endl;
        return 0;
    }
    std::cout << 1 << std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:23: error: expected ';' before 'if'
    5 |     std::cin >> n >> k
      |                       ^
      |                       ;
    6 |     if (n % k == 0) {
      |     ~~
Language: C++

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

int main(){
    int N, K;
    cin >> N >> K;
    if(N % K == 0){
        int S = N / K; 
        cout << 0 << endl;
    }else{
        int amari = N % K;
        cout << (amari + S) - S << endl;
    }
}

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

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

// fact(n)
int fact(int n){
	if(n == 1)	return 1;
	else return (n * fact(n - 1));
}

// nCr(n,r)
int nCr(int n, int r){
	if(r == 0 || r == n)	return 1;
	else if(r == 1)	return n;
	return (nCr(n - 1, r - 1) + nCr(n - 1, r));
}

// gcd(a,b)
int gcd(int a,int b){
	return (b == 0) ? a : gcd(b, a % b);
}

// lcm(a,b)
int lcm(int a,int b){
	return (a * b) / gcd(a,b);
}

int main(int argc, char const *argv[]){
	int n;
	cin >> n;
	while(n >= 4){
		if(n % 4 == 0 || n % 7 == 0){
			cout << "Yes" << endl;
			return 0;
		}
		else if(n > 4)	n -= 4;
		else if(n > 7)	n -= 7;
	}
	cout << "No" << endl;
	return 0;
}


Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.