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

#include <bits/stdc++.h>
int main()
{
  int k,m,n;
  cin >> k >> m >> n;
  double x1=m/(double)k,x2=x1=n/(double)k;
  int div=m/k;
  if(div==x1)
    cout << "OK";
  else
    if(div+k<=x2)
      cout << "OK";
  	else
      cout << "NG";
  return 0;
}

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 >> k >> m >> n;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout << "OK";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |       cout << "OK";
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |       cout << "NG";
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

int main (){
int K;
cin>>K;
int A,B;
cin>>A>>B;

for(int i=0;i<B;i++){
K*=i;
if(A<K&&K<B){
cout<<"OK"<<endl;
}
break;
else{
cout<<"NG"<<endl;
}
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:1: error: 'else' without a previous 'if'
   16 | else{
      | ^~~~
Language: Java

import java.util.Scanner;

public class sample{
public static void main(String[] args) {
	 Scanner scan = new Scanner(System.in);
	int K = scan.nextInt();
	int A = scan.nextInt();
	int B = scan.nextInt();
	
	if( (2*K) <= A && (2*K) >= B ){
	System.out.print("OK");
	}else{
	System.out.print("NG");
	}
	  
}
}

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

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

int main() {
  int N,A,B;
  cin >> N >> A >> B;
  int x
    int A <= x && B <= x;
  if(x % N == 0){
    cout << "Yes" << endl;
  }
  else{
    cout << "NO" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected initializer before 'int'
    8 |     int A <= x && B <= x;
      |     ^~~
a.cc:9:6: error: 'x' was not declared in this scope
    9 |   if(x % N == 0){
      |      ^
Language: C

#include <stdio.h>
int main(){
int a,b,k;
int i;
scanf("%d",&k);
scanf("%d %d",&a,&b);
if(a%k == 0||b%k == 0)printf("OK");
else if(b-a>=k) printf("OK");
else 
for(i = 0;a <= b;i++){
a++;
if(a % k == 0){ printf("OK");
		break;}
}
else printf("NG");
}


Compiler output:
main.c: In function 'main':
main.c:15:1: error: 'else' without a previous 'if'
   15 | else printf("NG");
      | ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  cin >> k >> a >> b;

  for(int i = a; i <= b; ++i){
    if(i % k == 0){
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 'k' was not declared in this scope
    5 |   cin >> k >> a >> b;
      |          ^
a.cc:5:15: error: 'a' was not declared in this scope
    5 |   cin >> k >> a >> b;
      |               ^
a.cc:5:20: error: 'b' was not declared in this scope
    5 |   cin >> k >> a >> b;
      |                    ^
Language: C++

#include <iostream>
#include <math.h>
using namespace std;
int main()
{
  int A,B,K;
  for(int B;i<=A;B--){
    (B % K == 0 && A % K == 0)
    cout << "OK";
  }
  else{
    cout << "NO";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'i' was not declared in this scope
    7 |   for(int B;i<=A;B--){
      |             ^
a.cc:8:31: error: expected ';' before 'cout'
    8 |     (B % K == 0 && A % K == 0)
      |                               ^
      |                               ;
    9 |     cout << "OK";
      |     ~~~~                       
a.cc:11:3: error: 'else' without a previous 'if'
   11 |   else{
      |   ^~~~
Language: C++

#include <iostream>
#include <math.h>
using namespace std;
int main()
{
  int A,B,K;
  for(int i=B;i<=A;i--){
    B % K == 0 && A % K == 0
    cout << "OK";
  }
  else{
    cout << "NO";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: error: expected ';' before 'cout'
    8 |     B % K == 0 && A % K == 0
      |                             ^
      |                             ;
    9 |     cout << "OK";
      |     ~~~~                     
a.cc:11:3: error: 'else' without a previous 'if'
   11 |   else{
      |   ^~~~
Language: C

#include <stdio.h>
int main(){
  int a;
  int b,c;
  scanf("%d",&a);
  scanf("%d %d",&a,&b);
  if (b/a!=c/b) print("OK"); else print("NG");
}

Compiler output:
main.c: In function 'main':
main.c:7:17: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    7 |   if (b/a!=c/b) print("OK"); else print("NG");
      |                 ^~~~~
      |                 printf
Language: C

#include <stdio.h>
int main(){
int a,b,k;
int i;
scanf("%d",&k);
scanf("%d %d",&a,&b);
if(a%k == 0||b%k==0)printf("OK"):
else if(b-a>=k) printf("OK");
else 
for(i = 0;a <= b;i++){
a++;
if(a % k == 0){ printf("OK");
		break;}
else printf("NG");
     break;
}

}


Compiler output:
main.c: In function 'main':
main.c:7:33: error: expected ';' before ':' token
    7 | if(a%k == 0||b%k==0)printf("OK"):
      |                                 ^
      |                                 ;
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int k = sc.nextInt();
		// スペース区切りの整数の入力
		int a = sc.nextInt();
        int b = sc.nextInt();

        boolean canSuccess;
        for (int i = a; i <= b; i++) {
            canSuccess = (i % k) == 0;
            if(canSuccess) {
                break;
            }
        }

		// 出力
		System.out.println(canSuccess ? "OK" : "NG");
	}
}

Compiler output:
Main.java:20: error: variable canSuccess might not have been initialized
		System.out.println(canSuccess ? "OK" : "NG");
		                   ^
1 error
Language: C

int main(void){
  int k,n,m,i;
  
  scanf("%d",&k);
  scanf("%d %d",&n,&m);
  
  if(n % k == 0 || n % k + (b - a) >= k)
    printf("OK");
  else 
    printf("NG");
}

Compiler output:
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%d",&k);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%d",&k);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:29: error: 'b' undeclared (first use in this function)
    7 |   if(n % k == 0 || n % k + (b - a) >= k)
      |                             ^
main.c:7:29: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:33: error: 'a' undeclared (first use in this function)
    7 |   if(n % k == 0 || n % k + (b - a) >= k)
      |                                 ^
main.c:8:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    8 |     printf("OK");
      |     ^~~~~~
main.c:8:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:8:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   10 |     printf("NG");
      |     ^~~~~~
main.c:10:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

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

int main(){
  int K,A,B;
  cin>>K>>A>>B;
  if(A/K!=B/K ||A=K){
    cout<<"OK"<<endl;
  }
  else{
    cout<<"NG"<<endl;
  }
}

    


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: lvalue required as left operand of assignment
    7 |   if(A/K!=B/K ||A=K){
      |      ~~~~~~~~~^~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int K = sc.nextInt();
		// スペース区切りの整数の入力
		int A = sc.nextInt();
        int B = sc.nextInt();

        boolean canSuccess;
        for (int i = A; i <= B; i++) {
            canSuccess = (i % K) == 0;
            if(canSuccess) {
                break;
            }
        }

		// 出力
		System.out.println(canSuccess ? "OK" : "NG");
	}
}

Compiler output:
Main.java:20: error: variable canSuccess might not have been initialized
		System.out.println(canSuccess ? "OK" : "NG");
		                   ^
1 error
Language: C++

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

int main() {
  int a,b,k;
　cin >> k >> a >> b;

 for(int i=0;i<1000;i+++){
 if(a <= k*i && k*i <= b){
 cout << "OK" << endl;
 break;
 }else{
 cout << "NG" << endl;
 }
 }
}
   
  


Compiler output:
a.cc:6:1: error: extended character 　 is not valid in an identifier
    6 | 　cin >> k >> a >> b;
      | ^
a.cc: In function 'int main()':
a.cc:6:1: error: '\U00003000cin' was not declared in this scope
    6 | 　cin >> k >> a >> b;
      | ^~~~~
a.cc:8:25: error: expected primary-expression before ')' token
    8 |  for(int i=0;i<1000;i+++){
      |                         ^
Language: C++

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

int main() {
 int K,A,B;
 cin>>K>>A>>B;
 for(int i=A;i<B+1;i++){
   if(i%K==0){
     string ans="OK";
     break;
   }
   else{
     string ans="NG";
   }
 }
  cout<<ans<<endl;
}
     


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

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

int main(){
  int K,A,B;
  cin >> K;
  cin >> A >> B;
  int x = (B/K)*K;
  if(A <= x){
    cout << "OK" << endl;
  }else{
  cout << "NG" << endl;
  }
}

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

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

int main (){
int K;
cin>>K;
int A,B;
cin>>A>>B;

for(int i;i<B;i++)
K*=i
if(A<K){
cout<<"OK"<<endl;
}
else{
cout<<"NG"<<endl;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: expected ';' before 'if'
   11 | K*=i
      |     ^
      |     ;
   12 | if(A<K){
      | ~~   
a.cc:15:1: error: 'else' without a previous 'if'
   15 | else{
      | ^~~~
Language: C++

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

int main() {
 int K,A,B;
 cin>>K>>A>>B;
 for(int i=A;i<B+1;i++){
   if(i%K==0){
     int ans="OK";
     break;
   }
   else{
     int ans="NG";
   }
 }
  cout<<ans<<endl;
}
     

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    9 |      int ans="OK";
      |              ^~~~
      |              |
      |              const char*
a.cc:13:14: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   13 |      int ans="NG";
      |              ^~~~
      |              |
      |              const char*
a.cc:16:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: C++

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

int main(){
  int k, a, b;
  cin >> k >> a >> b;
  if (a / k == 0 || b / k == 0) cou << "OK" << endl;
  if (k == 1 || (a - 0.1)/ k < (b - 0.1) / k) cout << "OK" << endl;
  else{
    cout << "NG" <<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:33: error: 'cou' was not declared in this scope; did you mean 'cos'?
    7 |   if (a / k == 0 || b / k == 0) cou << "OK" << endl;
      |                                 ^~~
      |                                 cos
Language: C++

#include <iostream>
using namespace std;
using ll = long long;
int main()
{
    ll k, n, m;
    cin >> k >> n >> m;
    ll pip = n / k;
    ll polp = pip * k + k;
    if(polp <m){
        cout << "OK" << endl;
    }else{
        cout << "NG" << endl;
    }

   

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

#include<bits/stdc++.h>
#define MAX (int)(2e6+5)
#define PB push_back
#define MP make_pair
#define ll long long
#define pii pair<long long,long long>
#define sz(a) (int)a.size()
#define sl(a) scanf("%lld",&a)
#define sll(a,b) scanf("%lld%lld",&a,&b)
#define si(a) scanf("%d",&a)
#define sii(a,b) scanf("%d%d",&a,&b)
#define p1(a) cout<<"Check "<<a<<endl;
#define p2(a,b) cout<<"Check "<<a<<' '<<b<<endl;
#define p3(a,b,c) cout<<"Check "<<a<<' '<<b<<' '<<c<<endl;
#define forn(i,n) for(int i=0;i<int(n);i++)
#define fore(i,l,n) for(int i=int(l);i<int(n);i++)
#define clr(a) memset(a,0,sizeof(a))
#define MOD (int)(1e7+7)
#define INF (long long)(1e18)

using namespace std;

int main()
{
    //freopen("tt.txt","r",stdin);
    int test=1,i=0,n,m;
    //si(test);
    while(test--){
        int n;
        si(n);
        int a,b;
        sii(a,b);
        a--;
        if(b/n-a/n>0) cout<<"OK"<<endl;
        else cout<<"NG"<<endl;
    }
}


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

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

int main() {
  int a,b,k;
　cin >> k >> a >> b;

 for(int i=0;i<1000;i+++){
 if(a <= k*i & k*i <= b){
 cout << "OK" << endl;
 break;
 }else{
 cout << "NG" << endl;
 }
 }
   
  


Compiler output:
a.cc:6:1: error: extended character 　 is not valid in an identifier
    6 | 　cin >> k >> a >> b;
      | ^
a.cc: In function 'int main()':
a.cc:6:1: error: '\U00003000cin' was not declared in this scope
    6 | 　cin >> k >> a >> b;
      | ^~~~~
a.cc:8:25: error: expected primary-expression before ')' token
    8 |  for(int i=0;i<1000;i+++){
      |                         ^
a.cc:15:3: error: expected '}' at end of input
   15 |  }
      |   ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  int a,b;
　cin >> k,a,b;

 for(int i=0;i<1000;i+++){
 if(a <= k*i & k*i <= b){
 cout << "OK" << endl;
 break;
 }else{
 cout << "NG" << endl;
 }
 }
   
  


Compiler output:
a.cc:6:1: error: extended character 　 is not valid in an identifier
    6 | 　cin >> k,a,b;
      | ^
a.cc: In function 'int main()':
a.cc:6:1: error: '\U00003000cin' was not declared in this scope
    6 | 　cin >> k,a,b;
      | ^~~~~
a.cc:6:10: error: 'k' was not declared in this scope
    6 | 　cin >> k,a,b;
      |          ^
a.cc:8:25: error: expected primary-expression before ')' token
    8 |  for(int i=0;i<1000;i+++){
      |                         ^
a.cc:15:3: error: expected '}' at end of input
   15 |  }
      |   ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

vo#include<bits/stdc++.h>
using namespace std;
int main()
{
  long long a,b,n;f=0;  cin>>a>>b>>n;
  //vector<int>c;
 for(int i=min(a,b);i<=n;i++){
    int g=floor((a*i)/b)-(a*floor(i/b));
   f=max(g,f);
 
 }
 // sort(c.begin(),c.end());
   cout<<f<<endl; 
}


Compiler output:
a.cc:1:3: error: stray '#' in program
    1 | vo#include<bits/stdc++.h>
      |   ^
a.cc:1:1: error: 'vo' does not name a type; did you mean 'void'?
    1 | vo#include<bits/stdc++.h>
      | ^~
      | void
a.cc: In function 'int main()':
a.cc:5:19: error: 'f' was not declared in this scope
    5 |   long long a,b,n;f=0;  cin>>a>>b>>n;
      |                   ^
a.cc:5:25: error: 'cin' was not declared in this scope
    5 |   long long a,b,n;f=0;  cin>>a>>b>>n;
      |                         ^~~
a.cc:7:12: error: 'min' was not declared in this scope; did you mean 'main'?
    7 |  for(int i=min(a,b);i<=n;i++){
      |            ^~~
      |            main
a.cc:8:11: error: 'floor' was not declared in this scope
    8 |     int g=floor((a*i)/b)-(a*floor(i/b));
      |           ^~~~~
a.cc:9:6: error: 'max' was not declared in this scope
    9 |    f=max(g,f);
      |      ^~~
a.cc:13:4: error: 'cout' was not declared in this scope
   13 |    cout<<f<<endl;
      |    ^~~~
a.cc:13:13: error: 'endl' was not declared in this scope
   13 |    cout<<f<<endl;
      |             ^~~~
Language: C++

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


int main()
{
  int K,A,B:
  cin>>K>>A>>B;
  if((B-A)>=K) cout<<"OK"<<endl;
  else cout<<"NG"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: found ':' in nested-name-specifier, expected '::'
    9 |   int K,A,B:
      |            ^
      |            ::
a.cc:9:11: error: 'B' has not been declared
    9 |   int K,A,B:
      |           ^
a.cc:10:6: error: qualified-id in declaration before '>>' token
   10 |   cin>>K>>A>>B;
      |      ^~
a.cc:11:7: error: 'B' was not declared in this scope
   11 |   if((B-A)>=K) cout<<"OK"<<endl;
      |       ^
Language: C++

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

int main (){
int K;
cin>>K;
int A,B;
cin>>A>>B
if(A<=K<=B){
cout<<"OK"<<endl;
}
else{
cout<<"NG"<<endl;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: expected ';' before 'if'
    8 | cin>>A>>B
      |          ^
      |          ;
    9 | if(A<=K<=B){
      | ~~        
a.cc:12:1: error: 'else' without a previous 'if'
   12 | else{
      | ^~~~
Language: C++

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

int main(){
  ll N, A, B;
  cin >> A >> B >> N;
  int ans;
  if(N<B) {
    ans = A * N / B;
    cout << ans;
    return 0;
  }
  int max = 0;
  if(B<=N) {
    for(int x = B+1;x<=2B;++x) {
      if(x>N) break;
      ans = A * x / B - x / B * A;
      if(max < ans) max = ans;
    }
  }
  cout << max;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:24: error: unable to find numeric literal operator 'operator""B'
   16 |     for(int x = B+1;x<=2B;++x) {
      |                        ^~
Language: C++

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

int main(){
  int K,A,B,N;
  cin>>K>>A>>B;
  if(A<=N&&B>=N%%N/K==0){
    cout<<"OK"<<endl;
  }
  else{
    cout<<"NG"<<endl;
  }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected primary-expression before '%' token
    7 |   if(A<=N&&B>=N%%N/K==0){
      |                 ^
Language: C++

include <bits/stdc++.h>
 using namespace std;
 int main() {
  int K;
  int A;
  int B;
  cin >> K >> A >> B;
  int X = A / K;
  int Y = B / K;
  if(X < Y){
   cout << "OK" << endl;
  }
  else if(B % K == 0){
   cout << "OK" << endl;
  }
  else if(A % K == 0){
   cout << "OK" << endl;
  }
  else{
   cout << "NG" << endl;
  }
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> K >> A >> B;
      |   ^~~
a.cc:11:4: error: 'cout' was not declared in this scope
   11 |    cout << "OK" << endl;
      |    ^~~~
a.cc:11:20: error: 'endl' was not declared in this scope
   11 |    cout << "OK" << endl;
      |                    ^~~~
a.cc:14:4: error: 'cout' was not declared in this scope
   14 |    cout << "OK" << endl;
      |    ^~~~
a.cc:14:20: error: 'endl' was not declared in this scope
   14 |    cout << "OK" << endl;
      |                    ^~~~
a.cc:17:4: error: 'cout' was not declared in this scope
   17 |    cout << "OK" << endl;
      |    ^~~~
a.cc:17:20: error: 'endl' was not declared in this scope
   17 |    cout << "OK" << endl;
      |                    ^~~~
a.cc:20:4: error: 'cout' was not declared in this scope
   20 |    cout << "NG" << endl;
      |    ^~~~
a.cc:20:20: error: 'endl' was not declared in this scope
   20 |    cout << "NG" << endl;
      |                    ^~~~
Language: C

#include <stdio.h>
int main(void)
 {
int i;
int K,A,B;
A = 0;
B = 0;
K = 0;
scanf("%d",&K); scanf("%d",&A); scanf("%d",&B);
 
for(i=A;i<=B;i++){
if(i%K=0){
printf("OK");
break;
}
if(i=B){
printf("NG");
break;
}
}
 
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:7: error: lvalue required as left operand of assignment
   12 | if(i%K=0){
      |       ^
Language: C++

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

using namespace std;

int main(){
  int x;
  scanf("%d",&x);

  int i;
  int sum;

  while(true){
    sum += floor(sum * 0.01)
      if (x <= sum) {
        break;
      }
    i++;
  }
}

cout << i


Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: 'floor' was not declared in this scope
   14 |     sum += floor(sum * 0.01)
      |            ^~~~~
a.cc: At global scope:
a.cc:22:1: error: 'cout' does not name a type
   22 | cout << i
      | ^~~~
Language: C++

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

int main(){
  long a;
  long b;
  long n;
  long max;
  long box1;
  long box2;
  max=0;
  cin>>a;
  cin>>b;
  cin>>n;
  for(long i=n;i>=0;i--){
    box1=floor(a*i/b);
    box2=floor(i/b);
    p=box1-a*box2;
    if(p>max){
      max=p;
    }
  }
  cout<<max;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'p' was not declared in this scope
   20 |     p=box1-a*box2;
      |     ^
Language: C

#include <stdio.h>
int main(void)
 {
int i=;
int K,A,B;
A = 0;
B = 0;
K = 0:
scanf("%d",&K); scanf("%d",&A); scanf("%d",&B);
 
for(i=A;i<=B;i++){
if(i%K=0){
printf("OK");
break;
}
if(i=B){
printf("NG");
break;
}
}
 
return 0;
}
 


Compiler output:
main.c: In function 'main':
main.c:4:7: error: expected expression before ';' token
    4 | int i=;
      |       ^
main.c:8:6: error: expected ';' before ':' token
    8 | K = 0:
      |      ^
      |      ;
main.c:12:7: error: lvalue required as left operand of assignment
   12 | if(i%K=0){
      |       ^
Language: C++

/* Author : Prasuk Jain */
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
 
#define int              long long int
#define ull              unsigned long long
#define ld               long double
#define fo(i, n)         for(int i=0; i<n; i++)
#define FOR(i, a, b)     for(int i=a; i<b; i++)
#define rfor(i, n)       for(int i=n-1; i>=0; i--)
#define RFOR(i, a, b)    for(int i=b-1; i>=a; i--)
#define tr(it, v)        for(auto it=a.begin(); it!=a.end(); it++)
#define vi               vector<int>
#define pii              pair<int,int>
#define mii              map<int,int>
#define pqb              priority_queue<int>
#define pqs              priority_queue<int,vi,greater<int>>
#define mp               make_pair
#define pb(x)            push_back(x)
#define hcf(x, y)        __gcd(x, y)
#define lcm(x, y)        boost::math::lcm(x,y)
#define setpre(x, y)     fixed << setprecision(y) << x
#define setbits(x)       __builtin_popcountll(x)
#define zerolead(x)      __builtin_clzll(x)
#define zerotrail(x)     __builtin_ctzll(x)
#define all(x)           x.begin(), x.end()
#define sortall(x)       sort(all(x))
#define PI               3.1415926535897932384626
const int mod = 1e9+7;
const int inf = 1e18;
int mpow(int base, int exp);
bool isprime(int num);
void prifact(int num);
 
//*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!//
 
void coderprasukj(){ 
    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
}
 
int32_t main() {
    //coderprasukj();
    int t, n, k, x, y;
    cin >> t;
    cin >> x >> y;
    if(y-x>=t || t==1 || (x<=t && y>=t)) cout << "OK\n";
    else if(y-x<t ||(x<t && y<t) cout << "NG\n";
    return 0;
}
 
//*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!//
 
int mpow(int base, int exp) {
    base %= mod;
    int result = 1;
    while (exp > 0) {
        if (exp & 1) result = ((int)result * base) % mod;
        base = ((int)base * base) % mod;
        exp >>= 1;
    }
  return result;
}
 
bool isprime(int num) {
    if(num <= 1) return false;
    for(int i=2; i*i <= num; i++)
        if(num%i == 0) return false;
    return true;
}
 
void prifact(int num){
    for(int i=2; i<=num; i++)
    if(num%i == 0){
        int cnt = 0;
        while(num%i == 0)
        cnt++ , num /= i;
        cout << i << "^" << cnt << " ";
    }
    if(num > 1)
    cout << num << "^" << "1" << " ";
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:54:33: error: expected ';' before 'cout'
   54 |     else if(y-x<t ||(x<t && y<t) cout << "NG\n";
      |                                 ^~~~~
      |                                 ;
a.cc:55:5: error: expected primary-expression before 'return'
   55 |     return 0;
      |     ^~~~~~
a.cc:54:49: error: expected ')' before 'return'
   54 |     else if(y-x<t ||(x<t && y<t) cout << "NG\n";
      |            ~                                    ^
      |                                                 )
   55 |     return 0;
      |     ~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	int k, A, B, c, i;
	int scanf("%d%d%d", &k, &A, &B);
	c=B/k;
	for(i=1; i<=c; i++){
		if(k*i>=A && k*i<=B){
		printf("Ok");
		break;
		}
		else if(i==c){
			if(k*i<=A || k*i>=B){
				printf("NG");
				break;
			}
			else printf("Ok");
		}
		else continue;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:39: error: expression list treated as compound expression in initializer [-fpermissive]
    5 |         int scanf("%d%d%d", &k, &A, &B);
      |                                       ^
a.cc:5:39: error: invalid conversion from 'int*' to 'int' [-fpermissive]
    5 |         int scanf("%d%d%d", &k, &A, &B);
      |                                       ^
      |                                       |
      |                                       int*
Language: C++

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

int main (){
int a;
cin>>a;
int A,B,K,N;
cin>>A>>B>>K>>N>>;
A<a&&a<B;
if(a=K*N){
cout<<"OK"<<endl;
}
else{
cout<<"NG"<<endl;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected primary-expression before ';' token
    8 | cin>>A>>B>>K>>N>>;
      |                  ^
Language: C++

#include <iostream>
#include <math.h>
using namespace std;
int main()
{
  int A,B,K;
  if(B % K == 0 && A % K == 0){
    cout << "OK";
  } if(A <= K || (B-1) % K == 0){
      cout << "OK";
    }
  } if(A <= K || (B-2) % K == 0){
      cout << "OK";
    }
  } if(A <= K || (B-3) % K == 0){
      cout << "OK";
    }
  } if(A <= K || (B-4) % K == 0){
      cout << "OK";
    }
  } if(A <= K || (B-5) % K == 0){
      cout << "OK";
    }
  } if(A <= K || (B-6) % K == 0){
      cout << "OK";
    }
  } if(A <= K || (B-7) % K == 0){
      cout << "OK";
    }
  } if(A <= K || (B-8) % K == 0){
      cout << "OK";
    }
  } if(A <= K || (B-9) % K == 0){
      cout << "OK";
    }
  } else{
      cout << "NO";
  }
}

Compiler output:
a.cc:12:5: error: expected unqualified-id before 'if'
   12 |   } if(A <= K || (B-2) % K == 0){
      |     ^~
a.cc:15:3: error: expected declaration before '}' token
   15 |   } if(A <= K || (B-3) % K == 0){
      |   ^
a.cc:15:5: error: expected unqualified-id before 'if'
   15 |   } if(A <= K || (B-3) % K == 0){
      |     ^~
a.cc:18:3: error: expected declaration before '}' token
   18 |   } if(A <= K || (B-4) % K == 0){
      |   ^
a.cc:18:5: error: expected unqualified-id before 'if'
   18 |   } if(A <= K || (B-4) % K == 0){
      |     ^~
a.cc:21:3: error: expected declaration before '}' token
   21 |   } if(A <= K || (B-5) % K == 0){
      |   ^
a.cc:21:5: error: expected unqualified-id before 'if'
   21 |   } if(A <= K || (B-5) % K == 0){
      |     ^~
a.cc:24:3: error: expected declaration before '}' token
   24 |   } if(A <= K || (B-6) % K == 0){
      |   ^
a.cc:24:5: error: expected unqualified-id before 'if'
   24 |   } if(A <= K || (B-6) % K == 0){
      |     ^~
a.cc:27:3: error: expected declaration before '}' token
   27 |   } if(A <= K || (B-7) % K == 0){
      |   ^
a.cc:27:5: error: expected unqualified-id before 'if'
   27 |   } if(A <= K || (B-7) % K == 0){
      |     ^~
a.cc:30:3: error: expected declaration before '}' token
   30 |   } if(A <= K || (B-8) % K == 0){
      |   ^
a.cc:30:5: error: expected unqualified-id before 'if'
   30 |   } if(A <= K || (B-8) % K == 0){
      |     ^~
a.cc:33:3: error: expected declaration before '}' token
   33 |   } if(A <= K || (B-9) % K == 0){
      |   ^
a.cc:33:5: error: expected unqualified-id before 'if'
   33 |   } if(A <= K || (B-9) % K == 0){
      |     ^~
a.cc:36:3: error: expected declaration before '}' token
   36 |   } else{
      |   ^
a.cc:36:5: error: expected unqualified-id before 'else'
   36 |   } else{
      |     ^~~~
a.cc:39:1: error: expected declaration before '}' token
   39 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n, A, B;
  cin >> n >> A >> B;
  
  bool c=0;
  for(int i=A; i<=B; i++){
  if(a%n==0){
  bool c=1;
  break;
  }
  }
  if(c) cout << "OK" << endl;
  else cout << "NG" << endl;
}


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

/* Author : Prasuk Jain */
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
 
#define int              long long int
#define ull              unsigned long long
#define ld               long double
#define fo(i, n)         for(int i=0; i<n; i++)
#define FOR(i, a, b)     for(int i=a; i<b; i++)
#define rfor(i, n)       for(int i=n-1; i>=0; i--)
#define RFOR(i, a, b)    for(int i=b-1; i>=a; i--)
#define tr(it, v)        for(auto it=a.begin(); it!=a.end(); it++)
#define vi               vector<int>
#define pii              pair<int,int>
#define mii              map<int,int>
#define pqb              priority_queue<int>
#define pqs              priority_queue<int,vi,greater<int>>
#define mp               make_pair
#define pb(x)            push_back(x)
#define hcf(x, y)        __gcd(x, y)
#define lcm(x, y)        boost::math::lcm(x,y)
#define setpre(x, y)     fixed << setprecision(y) << x
#define setbits(x)       __builtin_popcountll(x)
#define zerolead(x)      __builtin_clzll(x)
#define zerotrail(x)     __builtin_ctzll(x)
#define all(x)           x.begin(), x.end()
#define sortall(x)       sort(all(x))
#define PI               3.1415926535897932384626
const int mod = 1e9+7;
const int inf = 1e18;
int mpow(int base, int exp);
bool isprime(int num);
void prifact(int num);
 
//*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!//
 
void coderprasukj(){ 
    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
}
 
int32_t main() {
    //coderprasukj();
    int t, n, k, x, y;
    cin >> t;
    cin >> x >> y;
    if(y-x>=t || t==1 || (x<=t && y>=t)) cout << "OK\n";
    else (y-x<t ||(x<t && y<t) cout << "NG\n";
    return 0;
}
 
//*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!*!//
 
int mpow(int base, int exp) {
    base %= mod;
    int result = 1;
    while (exp > 0) {
        if (exp & 1) result = ((int)result * base) % mod;
        base = ((int)base * base) % mod;
        exp >>= 1;
    }
  return result;
}
 
bool isprime(int num) {
    if(num <= 1) return false;
    for(int i=2; i*i <= num; i++)
        if(num%i == 0) return false;
    return true;
}
 
void prifact(int num){
    for(int i=2; i<=num; i++)
    if(num%i == 0){
        int cnt = 0;
        while(num%i == 0)
        cnt++ , num /= i;
        cout << i << "^" << cnt << " ";
    }
    if(num > 1)
    cout << num << "^" << "1" << " ";
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:54:31: error: expected ')' before 'cout'
   54 |     else (y-x<t ||(x<t && y<t) cout << "NG\n";
      |          ~                    ^~~~~
      |                               )
Language: C++

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

int main (){
int a;
cin>>a;
intA,B,,K,N;
cin>>A>>B>>K>>N>>;
A<a&&a<B;
if(a=K*N){
cout<<"OK"<<endl;
}
else{
cout<<"NG"<<endl;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'intA' was not declared in this scope; did you mean 'int'?
    7 | intA,B,,K,N;
      | ^~~~
      | int
a.cc:7:6: error: 'B' was not declared in this scope
    7 | intA,B,,K,N;
      |      ^
a.cc:7:8: error: expected primary-expression before ',' token
    7 | intA,B,,K,N;
      |        ^
a.cc:7:9: error: 'K' was not declared in this scope
    7 | intA,B,,K,N;
      |         ^
a.cc:7:11: error: 'N' was not declared in this scope
    7 | intA,B,,K,N;
      |           ^
a.cc:8:6: error: 'A' was not declared in this scope
    8 | cin>>A>>B>>K>>N>>;
      |      ^
a.cc:8:18: error: expected primary-expression before ';' token
    8 | cin>>A>>B>>K>>N>>;
      |                  ^
Language: C++

#include <iostream>
#include <math.h>
using namespace std;
int main()
{
  int A,B,K;
  if(B % K == 0 && A % K == 0){
    cout << "OK";
  } else if(A <= K || (B-1) % K == 0){
      cout << "OK";
    }
  } else if(A <= K || (B-2) % K == 0){
      cout << "OK";
    }
  } else if(A <= K || (B-3) % K == 0){
      cout << "OK";
    }
  } else if(A <= K || (B-4) % K == 0){
      cout << "OK";
    }
  } else if(A <= K || (B-5) % K == 0){
      cout << "OK";
    }
  } else if(A <= K || (B-6) % K == 0){
      cout << "OK";
    }
  } else if(A <= K || (B-7) % K == 0){
      cout << "OK";
    }
  } else if(A <= K || (B-8) % K == 0){
      cout << "OK";
    }
  } else if(A <= K || (B-9) % K == 0){
      cout << "OK";
    }
  } else{
      cout << "NO";
  }
}

Compiler output:
a.cc:12:5: error: expected unqualified-id before 'else'
   12 |   } else if(A <= K || (B-2) % K == 0){
      |     ^~~~
a.cc:15:3: error: expected declaration before '}' token
   15 |   } else if(A <= K || (B-3) % K == 0){
      |   ^
a.cc:15:5: error: expected unqualified-id before 'else'
   15 |   } else if(A <= K || (B-3) % K == 0){
      |     ^~~~
a.cc:18:3: error: expected declaration before '}' token
   18 |   } else if(A <= K || (B-4) % K == 0){
      |   ^
a.cc:18:5: error: expected unqualified-id before 'else'
   18 |   } else if(A <= K || (B-4) % K == 0){
      |     ^~~~
a.cc:21:3: error: expected declaration before '}' token
   21 |   } else if(A <= K || (B-5) % K == 0){
      |   ^
a.cc:21:5: error: expected unqualified-id before 'else'
   21 |   } else if(A <= K || (B-5) % K == 0){
      |     ^~~~
a.cc:24:3: error: expected declaration before '}' token
   24 |   } else if(A <= K || (B-6) % K == 0){
      |   ^
a.cc:24:5: error: expected unqualified-id before 'else'
   24 |   } else if(A <= K || (B-6) % K == 0){
      |     ^~~~
a.cc:27:3: error: expected declaration before '}' token
   27 |   } else if(A <= K || (B-7) % K == 0){
      |   ^
a.cc:27:5: error: expected unqualified-id before 'else'
   27 |   } else if(A <= K || (B-7) % K == 0){
      |     ^~~~
a.cc:30:3: error: expected declaration before '}' token
   30 |   } else if(A <= K || (B-8) % K == 0){
      |   ^
a.cc:30:5: error: expected unqualified-id before 'else'
   30 |   } else if(A <= K || (B-8) % K == 0){
      |     ^~~~
a.cc:33:3: error: expected declaration before '}' token
   33 |   } else if(A <= K || (B-9) % K == 0){
      |   ^
a.cc:33:5: error: expected unqualified-id before 'else'
   33 |   } else if(A <= K || (B-9) % K == 0){
      |     ^~~~
a.cc:36:3: error: expected declaration before '}' token
   36 |   } else{
      |   ^
a.cc:36:5: error: expected unqualified-id before 'else'
   36 |   } else{
      |     ^~~~
a.cc:39:1: error: expected declaration before '}' token
   39 | }
      | ^
Language: C

#include <stdio.h>
int main(void)
 {
int i;
int K,A,B;
 
scanf("%d",&K); scanf("%d",&A); scanf("%d",&B);
 
for(i=A;i<=B;i++){
if(i%K=0){
printf("OK");
break;
}
if(i=B){
printf("NG");
break;
}
}
 
return 0;
}
 
#include <stdio.h>
int main(void)
 {
int i,K,A,B;
 
scanf("%d",K); scanf("%d",A); scanf("%d",B);
 
for(i=A;i<=B;i++){
if(i%K=0){
printf("OK");
break;
}
if(i=B){
printf("NG");
break;
}
}
 
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:7: error: lvalue required as left operand of assignment
   10 | if(i%K=0){
      |       ^
main.c: At top level:
main.c:24:5: error: redefinition of 'main'
   24 | int main(void)
      |     ^~~~
main.c:2:5: note: previous definition of 'main' with type 'int(void)'
    2 | int main(void)
      |     ^~~~
main.c: In function 'main':
main.c:31:7: error: lvalue required as left operand of assignment
   31 | if(i%K=0){
      |       ^
Language: C++

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

int main(){
    int K,A,B;
    cin >> K >> A >> B;
    int n = A%K;
    if(n == 0){
        cout << "OK" << endl;
        return 0;
    }

    if(K*n > A && K*n <= B){
        cout << "OK" << endl;
    }else if(K*(n+1) > A && K*(n+1) <= B{
        cout << "OK" << endl;
    }else{
        cout << "NG" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:41: error: expected ')' before '{' token
   15 |     }else if(K*(n+1) > A && K*(n+1) <= B{
      |             ~                           ^
      |                                         )
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
using ll = long long;

int main()
{
	ll x;
	cin >> x;
	int b = 100;
	int sol = 0;
	while(b < x)
	{
		b += 0.01*b
		sol += 1;
	}
	cout << sol;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: expected ';' before 'sol'
   15 |                 b += 0.01*b
      |                            ^
      |                            ;
   16 |                 sol += 1;
      |                 ~~~
Language: C++

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

int main() { 
  int X;
  cin >> X;
  //cout << 100 * 1.01<<
  for (int i = 0; i < X; i++) {
    cout << 100 * 1.01 >= i << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |     cout << 100 * 1.01 >= i << endl;
      |                           ~~^~~~~~~
Language: C++

#include <iostream>
#include <math.h>
using namespace std;
int main()
{
  int A,B,K;
  if(B % K == 0 && A % K == 0){
    cout << "OK";
  } else if(A <= K <= B || (B-1) % K == 0){
      cout << "OK";
    }
  } else if(A <= K <= B || (B-2) % K == 0){
      cout << "OK";
    }
  } else if(A <= K <= B || (B-3) % K == 0){
      cout << "OK";
    }
  } else if(A <= K <= B || (B-4) % K == 0){
      cout << "OK";
    }
  } else if(A <= K <= B || (B-5) % K == 0){
      cout << "OK";
    }
  } else if(A <= K <= B || (B-6) % K == 0){
      cout << "OK";
    }
  } else if(A <= K <= B || (B-7) % K == 0){
      cout << "OK";
    }
  } else if(A <= K <= B || (B-8) % K == 0){
      cout << "OK";
    }
  } else if(A <= K <= B || (B-9) % K == 0){
      cout << "OK";
    }
  } else{
      cout << "NO";
  }
}

Compiler output:
a.cc:12:5: error: expected unqualified-id before 'else'
   12 |   } else if(A <= K <= B || (B-2) % K == 0){
      |     ^~~~
a.cc:15:3: error: expected declaration before '}' token
   15 |   } else if(A <= K <= B || (B-3) % K == 0){
      |   ^
a.cc:15:5: error: expected unqualified-id before 'else'
   15 |   } else if(A <= K <= B || (B-3) % K == 0){
      |     ^~~~
a.cc:18:3: error: expected declaration before '}' token
   18 |   } else if(A <= K <= B || (B-4) % K == 0){
      |   ^
a.cc:18:5: error: expected unqualified-id before 'else'
   18 |   } else if(A <= K <= B || (B-4) % K == 0){
      |     ^~~~
a.cc:21:3: error: expected declaration before '}' token
   21 |   } else if(A <= K <= B || (B-5) % K == 0){
      |   ^
a.cc:21:5: error: expected unqualified-id before 'else'
   21 |   } else if(A <= K <= B || (B-5) % K == 0){
      |     ^~~~
a.cc:24:3: error: expected declaration before '}' token
   24 |   } else if(A <= K <= B || (B-6) % K == 0){
      |   ^
a.cc:24:5: error: expected unqualified-id before 'else'
   24 |   } else if(A <= K <= B || (B-6) % K == 0){
      |     ^~~~
a.cc:27:3: error: expected declaration before '}' token
   27 |   } else if(A <= K <= B || (B-7) % K == 0){
      |   ^
a.cc:27:5: error: expected unqualified-id before 'else'
   27 |   } else if(A <= K <= B || (B-7) % K == 0){
      |     ^~~~
a.cc:30:3: error: expected declaration before '}' token
   30 |   } else if(A <= K <= B || (B-8) % K == 0){
      |   ^
a.cc:30:5: error: expected unqualified-id before 'else'
   30 |   } else if(A <= K <= B || (B-8) % K == 0){
      |     ^~~~
a.cc:33:3: error: expected declaration before '}' token
   33 |   } else if(A <= K <= B || (B-9) % K == 0){
      |   ^
a.cc:33:5: error: expected unqualified-id before 'else'
   33 |   } else if(A <= K <= B || (B-9) % K == 0){
      |     ^~~~
a.cc:36:3: error: expected declaration before '}' token
   36 |   } else{
      |   ^
a.cc:36:5: error: expected unqualified-id before 'else'
   36 |   } else{
      |     ^~~~
a.cc:39:1: error: expected declaration before '}' token
   39 | }
      | ^
Language: C

#include <stdio.h>
int main(void)
 {
int i;
int K,A,B;
 
scanf("%d",&K); scanf("%d",&A); scanf("%d",&B);
 
for(i=A;i<=B;i++){
if(i%K=0){
printf("OK");
break;
}
if(i=B){
printf("NG");
break;
}
}
 
return 0;
}
 
#include <stdio.h>
int main(void)
 {
int i,K,A,B;

scanf("%d",K); scanf("%d",A); scanf("%d",B);

for(i=A;i<=B;i++){
if(i%K=0){
printf("OK");
break;
}
if(i=B){
printf("NG");
break;
}
}
 
return 0;
}
 
提出情報


Compiler output:
main.c: In function 'main':
main.c:10:7: error: lvalue required as left operand of assignment
   10 | if(i%K=0){
      |       ^
main.c: At top level:
main.c:24:5: error: redefinition of 'main'
   24 | int main(void)
      |     ^~~~
main.c:2:5: note: previous definition of 'main' with type 'int(void)'
    2 | int main(void)
      |     ^~~~
main.c: In function 'main':
main.c:31:7: error: lvalue required as left operand of assignment
   31 | if(i%K=0){
      |       ^
main.c: At top level:
main.c:44:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
   44 | 提出情報
      | ^~~~~~~~
Language: C++

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

int main() { 
  int X;
  cin >> X;
  //cout << 100 * 1.01<<
  for (int i = 0; i < X; i++)
    cout << 100 * 1.01 >= i << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    9 |     cout << 100 * 1.01 >= i << endl;
      |                           ~~^~~~~~~
a.cc: At global scope:
a.cc:11:1: error: expected declaration before '}' token
   11 | }
      | ^
Language: C

#include <stdio.h>
int main(){
int a,b,k;
int i =1;
scanf("%d",&k);
scanf("%d %d",&a,&b);
if((a%k!= 0)&&(b%k!=0)&&(b-a < k)){
++i;
k *= i;
if(a<=k && k<=b){printf("OK");
break;}
else continue;}
else if(a%k == 0||b%k==0)printf("OK");
else if (b-a >= k)printf("OK");
else printf("NG");
}

Compiler output:
main.c: In function 'main':
main.c:11:1: error: break statement not within loop or switch
   11 | break;}
      | ^~~~~
main.c:12:6: error: continue statement not within a loop
   12 | else continue;}
      |      ^~~~~~~~
Language: C

#include <stdio.h>
int main(void)
 {
int i,K,A,B;

scanf("%d",K); scanf("%d",A); scanf("%d",B);

for(i=A;i<=B;i++){
if(i%K=0){
printf("OK");
break;
}
if(i=B){
printf("NG");
break;
}
}
 
return 0;
}
 

Compiler output:
main.c: In function 'main':
main.c:9:7: error: lvalue required as left operand of assignment
    9 | if(i%K=0){
      |       ^
Language: Java

import java.util.*;

public class Corona {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		int k;
		int A;
		int B;
		 Scanner k1 = new Scanner(System.in); 
		  
		 // Read the next integer from the screen 
		 	k= k1.nextInt(); 
		 	Scanner A1 = new Scanner(System.in); 
	        
	        // Read the next integer from the screen 
	        A = A1.nextInt(); 
	        
	        Scanner B1 = new Scanner(System.in); 
	        
	        // Read the next integer from the screen 
	        B= B1.nextInt();
	        check(k,A,B);
	        }
	public static void check(int k,int A,int B)
	{
		int l=0;
		for(int i=A;i<=B;i++)
		{
			if(i%k==0)
			{
			l=1	;
			}
		}
		
		if(l==1)
		{
			System.out.print("OK");
		}
		else 
		{
			System.out.print("NG");	
		}	
	}
}


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

public class Main {
	static int K;
	static int A;
	static int B;
	static int a;
	static int b;
	public static void main(String[]args) {
		Scanner sc=new Scanner(System.in);
		K=sc.nextInt();
		A=sc.nextInt();
		B=sc.nextInt();
		a=A/K;
		b=B/K;
		if(a!=b||a==b&&A/K==0||a==b&&B/K==0) {
			System.out.println("OK");
		}
		else {
			System.out.println("NG");
		}
	}
}

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

#include<bits/bits/stdc++.h>

using namespace std;

int main()
{
    int k,a,b;
    cin>>k>>a>>b;
    int flag = 0;

    for(int i=a;i<=b;i++)
    {
        if(i%k==0)
        {
            flag = 1;
            break;
        }
    }

    if(flag==1)
        cout<<"OK"<<endl;
    else
        cout<<"NG"<<endl;

    return 0;
}


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

#include <iostream>
#include <queue>

using namespace std;


unsigned long long func(unsigned long long A, unsigned long long B, unsigned long long x) {
    unsigned long long modulos = INT_MAX;
    A = A % INT_MAX;
    B = B % INT_MAX;
    x = x % INT_MAX;
    return (A * x) / B - A * (x / B); 
}

int main () {
    long long A, B, N;
    cin >> A >> B >> N;

    unsigned long long lo = 1;
    unsigned long long hi = N;

    while (lo <= hi) {
        unsigned long long mid = lo + (hi - lo) / 2;
        unsigned long long next = mid + 1;
        if (mid + 1 > N) {
            lo = mid;
            break;
        }
        if (func(A, B, mid) <= func(A, B, next)) {
            lo = mid + 1;
        } else {
            hi = mid - 1;
        }
    }

    cout << func(A, B, lo) << endl;

    return 0;
}


Compiler output:
a.cc: In function 'long long unsigned int func(long long unsigned int, long long unsigned int, long long unsigned int)':
a.cc:8:34: error: 'INT_MAX' was not declared in this scope
    8 |     unsigned long long modulos = INT_MAX;
      |                                  ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include <queue>
  +++ |+#include <climits>
    3 |