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

import java.util.*;
public class Contest2A {

    
    public static void main(String[] args) {
       
        Scanner  input = new Scanner(System.in);
          
        int n = input.nextInt();
        int m = input.nextInt();
        if(n<10&&m<10)
        {
            System.out.println(m*n);
        }
        else System.out.println(-1);
        

                }
    
}

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

package contest2a;

import java.util.*;
public class Contest2A {

    
    public static void main(String[] args) {
       
        Scanner  input = new Scanner(System.in);
          
        int n = input.nextInt();
        int m = input.nextInt();
        if(n<10&&m<10)
        {
            System.out.println(m*n);
        }
        else System.out.println(-1);
        

                }
    
}


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

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

int main() {
    int a, b;
    cin >> a >> b;
    if (a < 10 and b < 10) cout << a * b << endl;
    else cout << -1 << endl;
}
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;

int main() {
    int a, b;
    cin >> a >> b;
    if (a < 10 and b < 10) cout << a * b << endl;
    else cout << -1 << endl;
}


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

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REP2(i, n) for (int i = 1; i <= (int)(n); i++)
#define FOR(i, m, n) for (int i = m; i n; i++)
#define SORT(x) sort(x.begin(), x.end())
#define REVE(x) reverse(x.begin(), x.end())
#define ALL(x) (x).begin(), (x).end()
#define SUM(x) accumulate(ALL(x));
struct initon
{
    initon()
    {
        cin.tie(0);
        ios::sync_with_stdio(false);
    };
};


int k=0,n=0, m=0, l=0,a=0, b=0, c=0, d=0,e=0,ans=0,ans2=0,x=0,y=0;
string s,t,S;
signed main() {
    cin >> n;
    for(int i=1;i<=9;a++)for(int j=1;j<=9;b++){
        if(i*j==n){
            cout << "Yes";
            return 0;
        }
    }
    cout << "No" return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:17: error: expected ';' before 'return'
   31 |     cout << "No" return 0;
      |                 ^~~~~~~
      |                 ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REP2(i, n) for (int i = 1; i <= (int)(n); i++)
#define FOR(i, m, n) for (int i = m; i n; i++)
#define SORT(x) sort(x.begin(), x.end())
#define REVE(x) reverse(x.begin(), x.end())
#define ALL(x) (x).begin(), (x).end()
#define SUM(x) accumulate(ALL(x));
struct initon
{
    initon()
    {
        cin.tie(0);
        ios::sync_with_stdio(false);
    };
};
 std::vector<bool> is_prime( N + 1 );
std::vector<int> Eratosthenes( const int N )
{
   
    for( int i = 0; i <= N; i++ )
    {
        is_prime[ i ] = true;
    }
    std::vector<int> P;
    for( int i = 2; i <= N; i++ )
    {
        if( is_prime[ i ] )
        {
            for( int j = 2 * i; j <= N; j += i )
            {
                is_prime[ j ] = false;
            }
            P.emplace_back( i );
        }
    }
    return P;
}
int main()
{
    int N;
    cin >> N;
    for( const auto &x: Eratosthenes( N ) )
    {
        cout << x << " ";
    }
    return 0;
}
int k=0,n=0, m=0, l=0,a=0, b=0, c=0, d=0,e=0,ans=0,ans2=0,x=0,y=0;
string s,t,S;
signed main() {
    cin >> n;
    for(int i=1;i<=9;a++)for(int j=1;j<=9;b++){
        if(i*j==n){
            cout << "Yes";
            return 0;
        }
    }
    cout << "No" return 0;
}

Compiler output:
a.cc:19:30: error: 'N' was not declared in this scope
   19 |  std::vector<bool> is_prime( N + 1 );
      |                              ^
cc1plus: error: '::main' must return 'int'
a.cc:53:8: error: redefinition of 'int main()'
   53 | signed main() {
      |        ^~~~
a.cc:41:5: note: 'int main()' previously defined here
   41 | int main()
      |     ^~~~
a.cc: In function 'int main()':
a.cc:61:17: error: expected ';' before 'return'
   61 |     cout << "No" return 0;
      |                 ^~~~~~~
      |                 ;
Language: C++

#include<stdio.h>

int main(){
    int a,b;
    scanf("%d%d",&a,&b);
    if (1<=a && a<=9 && 1<=b && b<=9){
        printf("%d",a*b);
    }else{
        printf(-1);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
    9 |         printf(-1);
      |                ^~
      |                |
      |                int
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include<stdio.h>

int main(){
    int a,b;
    scanf("%d%d",&a,&b);
    if (1<=a && a<=9 && 1<=b && b<=9){
        print("%d",a*b);
    }else{
        printf(-1);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'print' was not declared in this scope; did you mean 'printf'?
    7 |         print("%d",a*b);
      |         ^~~~~
      |         printf
a.cc:9:16: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
    9 |         printf(-1);
      |                ^~
      |                |
      |                int
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include<stdio.h>

int main(){
    int a,b;
    scanf("%d%d",&a,&b);
    if (1<=a && a<=9 && 1<=b && b<=9){
        printf(a*b);
    }else{
        printf(-1);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
    7 |         printf(a*b);
      |                ~^~
      |                 |
      |                 int
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:9:16: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
    9 |         printf(-1);
      |                ^~
      |                |
      |                int
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include<stdio.h>

int main(){
    int a,b;
    scanf("%d%d",&a,&b);
    if (1<=a && a<=9 && 1<=b && b<=9){
        print(a*b);
    }else{
        printf(-1);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'print' was not declared in this scope; did you mean 'printf'?
    7 |         print(a*b);
      |         ^~~~~
      |         printf
a.cc:9:16: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
    9 |         printf(-1);
      |                ^~
      |                |
      |                int
In file included from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include<stdio.h>

int main(){
    int a,b;
    scanf("%d%d",&a,&b);
    if (1<=a && a<=9 && 1<=b && b<=9){
        print(a*b);
    }else{
        print(-1);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'print' was not declared in this scope; did you mean 'printf'?
    7 |         print(a*b);
      |         ^~~~~
      |         printf
a.cc:9:9: error: 'print' was not declared in this scope; did you mean 'printf'?
    9 |         print(-1);
      |         ^~~~~
      |         printf
Language: C++

#include<stdio.h>

int main(){
    int a,b;
    scanf("%d%d",&a,&b)；
    if (1<=a && a<=9 && 1<=b && b<=9){
        print(a*b)；
    }else{
        print(-1)；
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:24: error: expected ';' before '\U0000ff1b'
    5 |     scanf("%d%d",&a,&b)；
      |                        ^~
      |                        ;
a.cc:8:6: error: 'else' without a previous 'if'
    8 |     }else{
      |      ^~~~
a.cc:9:9: error: 'print' was not declared in this scope; did you mean 'printf'?
    9 |         print(-1)；
      |         ^~~~~
      |         printf
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:12:5: error: expected '(' before '{' token
   12 |   if{printf("No");
      |     ^
      |     (
Language: C++

#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
    int A,B;
    cin >> A >> B;
    if ((A >=1 && A <=9)&&(B >=1 && B <=9))
    cout<<(A * B);
    else()
    cout <<"-1";
}


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

#include <iostream>

using namespace std;

int main()
{
  int A ,B,func;
  cout<<"please enter two numbers ? \n";
  cin>>A>>B;
  func=A*B;
  cout<<func;
    return 0;
}


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

#include<iostream>
using namespace std;
int main(){
  int i;
  cin >> i;
  for(i=1;i<=9;i++){
    cout << i*i << endl;
  }
  else{
    cout << "-1" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'else' without a previous 'if'
    9 |   else{
      |   ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int i;
  for(i=1;i<=9;i++){
    cout << i*i << endl;
  }
  else{
    cout << "-1" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'else' without a previous 'if'
    8 |   else{
      |   ^~~~
Language: C++


#pragma GCC optimize ("O3")

#include <bits/stdc++.h>

using namespace std;

#ifdef LOCAL
#include <prettyprint.hpp>
#define debug(...)  cerr << "[" << #__VA_ARGS__ << "]: ", d_err(__VA_ARGS__);
#else
#define debug(...) 83;
#endif

void d_err() {
    cerr << endl;
}

template <typename H, typename... T>
void d_err(H h, T... t) {
    cerr << h << " ";
    d_err(t...);
}

template <typename T>
void print(T x) {
    cout << x << endl;
}

#define ALL(x) (x).begin(), (x).end()
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define bcnt __builtin_popcountll

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<ll,ll> Pll;
typedef pair<int,int> Pin;

ll INF = 1e16;
int inf = 1e9;
ll MOD = 1e9+7;

int main(){
    cin.tie(0);
    ios_base::sync_with_stdio(false);
    cout << fixed << setprecision(20);
    
    int A, B;
    cin >> A >> B;

    if (A > 9 || B > 9) print(-1);
    else print(A * B)
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:59:22: error: expected ';' before '}' token
   59 |     else print(A * B)
      |                      ^
      |                      ;
   60 | 
   61 | }
      | ~
Language: C

A#include<stdio.h>
int main(void)
{
	int a,b,c;
	scanf("%d %d",&a,&b);
	c=a*b;
	if(1<=a && a<=9 && 1<=b && b<=9){
	printf("%d\n",c);
	}
	else{
	printf("%d\n",-1);
	}
	return 0;
}

Compiler output:
main.c:1:2: error: stray '#' in program
    1 | A#include<stdio.h>
      |  ^
main.c:1:1: error: unknown type name 'A'
    1 | A#include<stdio.h>
      | ^
main.c:1:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | A#include<stdio.h>
      |          ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
    
    int a,b,c;
    cin >> a >> b;
    
    if(a <= 9 && b <= 9)
        int ans;
        ans = a * b;
        cout << ans << endl;
    else
        cout << "-1" << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |         ans = a * b;
      |         ^~~
      |         abs
a.cc:12:5: error: 'else' without a previous 'if'
   12 |     else
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
    int a, b;
    cin a >> b;
    if (a <= 9 || b <= 9){
        cout << a*b << endl;
    }
    else cout << "-1" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: expected ';' before 'a'
    5 |     cin a >> b;
      |        ^~
      |        ;
Language: C++

#include <iostream>
using namespace std;
int main(void){
    int a,b;
    if(a >= 1 && a <= 9 && b >= 1 b <= 9){
        cout << a * b << endl;
    }
    else{
        cout << "-1" << endl;
    }

    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:34: error: expected ')' before 'b'
    5 |     if(a >= 1 && a <= 9 && b >= 1 b <= 9){
      |       ~                          ^~
      |                                  )
Language: C++

#include <iostream>
using namespace std;

int main() {
    int A,B;
    cin >> A>> B;
if（A>=10 || B >=10）cout << -1<< endl;
    else cout << A * B << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'if\U0000ff08A' was not declared in this scope
    7 | if（A>=10 || B >=10）cout << -1<< endl;
      | ^~~~~
a.cc:7:18: error: unable to find numeric literal operator 'operator""\U0000ff09cout'
    7 | if（A>=10 || B >=10）cout << -1<< endl;
      |                  ^~~~~~~~
a.cc:8:5: error: 'else' without a previous 'if'
    8 |     else cout << A * B << endl;
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int i,j,n;
  cin >> n,
  for(i=1;i<=9;i++){
    for(j=1;j<=9;j++){
      if(i*j==n){
        cout << "Yes" << endl;
        return 0;
      }
    }
  }
  cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected primary-expression before 'for'
    6 |   for(i=1;i<=9;i++){
      |   ^~~
a.cc:6:19: error: expected ';' before ')' token
    6 |   for(i=1;i<=9;i++){
      |                   ^
      |                   ;
Language: Java

import java.util.Scanner;
import java.util.*;
public class p1 {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int a = scn.nextInt();
		int b = scn.nextInt();
		if(a>=1 && a<=9) {
			if(b>=1 && b<=9) {
				System.out.println(a*b);
			}
			else {
				System.out.println(-1);
			}
		}
		else {
			System.out.println(-1);
		}
	}
}

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

#include <stdio.h>

int main(void) {
    int a, b;
    int ans=-1;
    scanf("%d %d", &a, &b);

    if (a >= 10 or b >= 10) {
        printf("%d\n", ans);
    }
    else {
        ans = a*b;
        printf("%d\n", ans);
    }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:16: error: expected ')' before 'or'
    8 |     if (a >= 10 or b >= 10) {
      |        ~       ^~~
      |                )
Language: C++

#include <iostream>
using namespace std;

int A;
int B;

int main(){
  cin >> A >> B;
  if(A > 9 || A < 1 || B > 9 || B < 1){
    cout << "-1";
  }
  else{
    cout A * B;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: expected ';' before 'A'
   13 |     cout A * B;
      |         ^~
      |         ;
Language: C++

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

int main(){
 
  int n;
 cin>>n;
 bool isOK = false;
 
 for(int i=1;i<=9;i++){
    for(int j=1;j<=9;j++){
        if(i*j == n){
          cout<<"Yes"<<endl;
         ifOK = true;
            return 0; 
           }
    }
 }
  
 if(isOK == false)
 cout<<"No"<<endl;
 
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: 'ifOK' was not declared in this scope; did you mean 'isOK'?
   16 |          ifOK = true;
      |          ^~~~
      |          isOK
Language: Java

	
import java.util.Scanner;
	publicclassMain{
	publicstaticvoid main(String[] args){
	Scanner sc =newScanner(System.in);
	int a = sc.nextInt();
	int b = sc.nextInt();
	if(a<=9&& b<=9){
	System.out.println(a*b);
	}else{
	System.out.println(-1);
	}
	}
	}





Compiler output:
Main.java:3: error: class, interface, enum, or record expected
	publicclassMain{
	^
Main.java:6: error: unnamed classes are a preview feature and are disabled by default.
	int a = sc.nextInt();
	^
  (use --enable-preview to enable unnamed classes)
Main.java:8: error: class, interface, enum, or record expected
	if(a<=9&& b<=9){
	^
Main.java:10: error: class, interface, enum, or record expected
	}else{
	^
Main.java:12: error: class, interface, enum, or record expected
	}
	^
5 errors
Language: C

#include <stdio.h>

int main(void)
{
        int a,b;

        scanf("%d%d",&a,&b)

        if(a>10 || b>10) printf("-1\n");
        else printf("%d\n",a*b);
        return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:28: error: expected ';' before 'if'
    7 |         scanf("%d%d",&a,&b)
      |                            ^
      |                            ;
    8 | 
    9 |         if(a>10 || b>10) printf("-1\n");
      |         ~~                  
main.c:10:9: error: 'else' without a previous 'if'
   10 |         else printf("%d\n",a*b);
      |         ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b; cin >>a>>b;
  puts((a<=9&&b<=9)? a*b : -1);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
    6 |   puts((a<=9&&b<=9)? a*b : -1);
      |        ~~~~~~~~~~~~^~~~~~~~~~
      |                    |
      |                    int
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 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/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b; cin >>a>>b;
  puts((a<=9&&b=9)? a*b : -1);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: lvalue required as left operand of assignment
    6 |   puts((a<=9&&b=9)? a*b : -1);
      |         ~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b; cin >>a>>b;
  puts((a<=9&&ab=9)? a*b : -1);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'ab' was not declared in this scope; did you mean 'b'?
    6 |   puts((a<=9&&ab=9)? a*b : -1);
      |               ^~
      |               b
Language: Java

import java.util.*;

public class Main {

	public static void main (String[] args){
		Scanner sc = new Scanner(System.in);
		int a, b;

		System.out.println("Enter two number for variable A and B");

		a= sc.nextInt();
		b= sc.nextInt();
		int c = a*b;

		if(a<=9 && Ab>=1 && a<=9 && b>=1){

			System.out.println(c);

		}else {

			System.out.println("-1");

		}

	}

}

Compiler output:
Main.java:15: error: cannot find symbol
		if(a<=9 && Ab>=1 && a<=9 && b>=1){
		           ^
  symbol:   variable Ab
  location: class Main
1 error
Language: C

#include<stdio.h>
int main(void)
{
  int A,B;
  
  scanf("%d",&A);
  scanf("%d",&B);
  
  if(A>9||b>9)
    printf("%d",-1);
  else
    printf("%d",A*B);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:11: error: 'b' undeclared (first use in this function)
    9 |   if(A>9||b>9)
      |           ^
main.c:9:11: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main{
  int a,b;
  cin >> a >> b;
  if(a > 9 || b > 9) cout << -1 << endl;
  else cout << a * b << endl;
}

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:3: error: expected primary-expression before 'int'
    4 |   int a,b;
      |   ^~~
a.cc:4:3: error: expected '}' before 'int'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:5:3: error: 'cin' does not name a type
    5 |   cin >> a >> b;
      |   ^~~
a.cc:6:3: error: expected unqualified-id before 'if'
    6 |   if(a > 9 || b > 9) cout << -1 << endl;
      |   ^~
a.cc:7:3: error: expected unqualified-id before 'else'
    7 |   else cout << a * b << endl;
      |   ^~~~
a.cc:8:1: error: expected declaration before '}' token
    8 | }
      | ^
Language: C++

#include <iostream>

int main(){
  	int a,b;cin>>a>>b;
    if(a>9||b>9){cout << -1 << endl;return 0;}
  	else{cout << a*b<<endl;}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |         int a,b;cin>>a>>b;
      |                 ^~~
      |                 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:5:18: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |     if(a>9||b>9){cout << -1 << endl;return 0;}
      |                  ^~~~
      |                  std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:5:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |     if(a>9||b>9){cout << -1 << endl;return 0;}
      |                                ^~~~
      |                                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:6:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |         else{cout << a*b<<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:6:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |         else{cout << a*b<<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;
int main(){
  int a,b;
  cin >> a >> b;
  0<a&&a<10&&0<b&&b<10 ? cout << a*b << endl : cout << -1 << endl;
}

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

import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
import java.io.Serializable;

public class atcoder111j {
	public static void main(final String[] args){
    
        Scanner sc = new Scanner(System.in);

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

        if(a >= 10 || b >= 10){
            System.out.println(-1);
        }else{
            System.out.println(a*b);
        }
        

        


    }
}

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

#include<stdio.h>
int main ()
  {
    int a,b;
    scanf("%d %d",&a,&b);
    c=a*b;
    if(1<=a,b<=9)
      printf("%d",c);
    else
      printf("-1");
  return 0;
  }


Compiler output:
main.c: In function 'main':
main.c:6:5: error: 'c' undeclared (first use in this function)
    6 |     c=a*b;
      |     ^
main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    int A,B;
    cin>>A>>B;
    if((1<=A&&A<=9)&&(1<=B&&B<=9)
    cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
  return 0;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:6:34: error: expected ';' before 'cout'
    6 |     if((1<=A&&A<=9)&&(1<=B&&B<=9)
      |                                  ^
      |                                  ;
    7 |     cout<<"Yes"<<endl;
      |     ~~~~                          
a.cc:8:5: error: expected primary-expression before 'else'
    8 |     else cout<<"No"<<endl;
      |     ^~~~
a.cc:7:23: error: expected ')' before 'else'
    7 |     cout<<"Yes"<<endl;
      |                       ^
      |                       )
    8 |     else cout<<"No"<<endl;
      |     ~~~~               
a.cc:6:7: note: to match this '('
    6 |     if((1<=A&&A<=9)&&(1<=B&&B<=9)
      |       ^
Language: C++

#include<bits/stdc++.h>
#define IO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;

int main() {
	IO
	cin>>n>>m;
	if(!(n<10&&m<<10))
    {
        cout<<-1<<endl;
        return 0;
    }
    cout<<n*m<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |         cin>>n>>m;
      |              ^
      |              yn
a.cc:7:17: error: 'm' was not declared in this scope; did you mean 'tm'?
    7 |         cin>>n>>m;
      |                 ^
      |                 tm
Language: C++

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

int main(){
  int a,b;
  cin>>a>>b;
  if(a*b<100 &&a<10 &&b<10){
    cout<<a*b<<endl;
  }
  else{
    cout<<-1<<endl;
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: expected '}' at end of input
   11 |     cout<<-1<<endl;
      |                    ^
a.cc:10:7: note: to match this '{'
   10 |   else{
      |       ^
a.cc:11:20: error: expected '}' at end of input
   11 |     cout<<-1<<endl;
      |                    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C

#include<stdio.h>

int main(void)
{
  int A,B;
  scanf("%d %d",&A,&B)
  if(10 > A||10 > B)printf("%d",A * B);
  else printf("-1");

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:23: error: expected ';' before 'if'
    6 |   scanf("%d %d",&A,&B)
      |                       ^
      |                       ;
    7 |   if(10 > A||10 > B)printf("%d",A * B);
      |   ~~                   
main.c:8:3: error: 'else' without a previous 'if'
    8 |   else printf("-1");
      |   ^~~~
Language: C

#include<stdio.h>

int main(void)
{
  int A,B;
  
  if(10 > A||10 > B)printf("%d" A * B);
  else printf("-1");
  
  return 0;
}
    

Compiler output:
main.c: In function 'main':
main.c:7:32: error: expected ')' before 'A'
    7 |   if(10 > A||10 > B)printf("%d" A * B);
      |                           ~    ^~
      |                                )
Language: C++

A, B = (int(x) for x in input().split())
if A>=1 and A <=9 and B >= 1 and B <= 9:
  print(A*B)
else:
  print(-1)

Compiler output:
a.cc:1:1: error: 'A' does not name a type
    1 | A, B = (int(x) for x in input().split())
      | ^
Language: Java

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class NineNine {
	
	static boolean isPerfectSquare(long x)  
    { 
          
        // Find floating point value of 
        // square root of x. 
        double sr = Math.sqrt(x); 
      
        // If square root is an integer 
        return ((sr - Math.floor(sr)) == 0); 
    } 
	
	
	 static boolean checkPrime(long n) 
	    { 
	        // Converting long to BigInteger 
	        BigInteger b = new BigInteger(String.valueOf(n)); 
	  
	        return b.isProbablePrime(1); 
	    } 
	
	static void canMultiply(long a) {

	long prev=1,current;
	for(long i=3;i<=(long)a/2;i=i+2) {
			if(a%i==0) {
				current=i;
				
				if(prev*current==a) {
					System.out.println(prev+current-2);
						return;
				}
				prev=current;
				
			}
		
	}
		
	}
	
	
	
	static void check(long a) {
		List<Long> list =new ArrayList<Long>();
		
		for(long i=1;i<=a;i++) {
			for(long j=1;j<=a;j++) {
				
				if(i*j==a) {
					list.add(i+j-2);
					
				}
				
			}
			
		}
		System.out.println(Collections.min(list));

	}
		public static void main(String[] args) {
			
			Scanner sc =new Scanner(System.in);
			
			
			long a,b;
			a=sc.nextLong();
			
			
			
			if(a<100) {
				check(a);
				
			}
			else {
			
			if(checkPrime(a)) {
				System.out.println(a-1);
			}
			else if(isPerfectSquare(a)) {
				System.out.println(2*(int)Math.sqrt(a)-2);

			}
			else {
			canMultiply(a);
			}
			
			
		
		}
		}
}


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

#include<Stdio.h>
int main()
{
    int a,b,m;
    scanf("%d%d",&a,&b);
    if(a>9||b>9)
    {
        m=-1;
        printf("%d",m);
    }
    else
    m=a*b;
    printf("%d",m);
    return 0;
}


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

import java.util.Scanner;

public class NineNine {
	
	
	static void canMultiply(int a) {
		
		for(int i=1;i<10;i++) {
			for(int j=1;j<10;j++) {
				if(a==j*i) {
					System.out.println("Yes");
					return;
				}
			}
		}
		System.out.println("No");
		
		
	}
		public static void main(String[] args) {
			
			Scanner sc =new Scanner(System.in);
			
			
			int a,b;
			a=sc.nextInt();
			
			canMultiply(a);
			
			
		
		
		
		}

}


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

import java.util.Scanner;

public class NineNine {
	
		public static void main(String[] args) {
			
			Scanner sc =new Scanner(System.in);
			
			
			int a,b;
			a=sc.nextInt();
			b=sc.nextInt();
			
			if(a>9||b>9) {
				System.out.println(-1);
				
			}
			else {
				System.out.println(a*b);
			}
			sc.close();
			
				
		}

}


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

import java.util.Scanner;

public class NineNine {
	
		public static void main(String[] args) {
			
			Scanner sc =new Scanner(System.in);
			
			
			int a,b;
			a=sc.nextInt();
			b=sc.nextInt();
			
			if(a>9||b>9) {
				System.out.println(-1);
				
			}
			else {
				System.out.println(a*b);
			}
			
				
		}

}


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

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

int main() {
    int a,b;
    cin>>a>>b;
    if(a<=9&&b<=9) cout<<a*b<<endl;
    else cout<<"-1"<<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:6:5: error: 'cin' was not declared in this scope
    6 |     cin>>a>>b;
      |     ^~~
a.cc:7:20: error: 'cout' was not declared in this scope
    7 |     if(a<=9&&b<=9) cout<<a*b<<endl;
      |                    ^~~~
a.cc:7:31: error: 'endl' was not declared in this scope
    7 |     if(a<=9&&b<=9) cout<<a*b<<endl;
      |                               ^~~~
a.cc:8:10: error: 'cout' was not declared in this scope
    8 |     else cout<<"-1"<<endl;
      |          ^~~~
a.cc:8:22: error: 'endl' was not declared in this scope
    8 |     else cout<<"-1"<<endl;
      |                      ^~~~
Language: C++

#include<iostream>
usnign namespace std;

int main()
{
  int a, b;
  cin>>a>>b;
  
  if(a>9 || b>9)
    cout<<"-1";
  else
    cout<<a*b;
  return 0;
}

Compiler output:
a.cc:2:1: error: 'usnign' does not name a type; did you mean 'union'?
    2 | usnign namespace std;
      | ^~~~~~
      | union
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>a>>b;
      |   ^~~
      |   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:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |     cout<<"-1";
      |     ^~~~
      |     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:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     cout<<a*b;
      |     ^~~~
      |     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<iostream>
using namespace std;

int main(){

  int a,b,c;
  c=a*b;
  if (c<= 81)
    
    cout << c;
  else
    cout << "-1"
 

}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected ';' before '}' token
   12 |     cout << "-1"
      |                 ^
      |                 ;
......
   15 | }
      | ~
Language: C++

#include<iostream>
using namespace std;

int main(){

  int a,b,c;
  c=a*b;
  if (c<= 81)
    
    cout << c;
  else
    cout << "-1"
 

}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected ';' before '}' token
   12 |     cout << "-1"
      |                 ^
      |                 ;
......
   15 | }
      | ~
Language: Java


// 問題URL
//

import java.util.Scanner;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer a = Integer.parseInt(scanner.next());
        Integer b = Integer.parseInt(scanner.next());
        int result =  -1;
        if (a < 10 && b < 10) {
            result = a * b
        }

        System.out.println(result);
    }
}

Compiler output:
Main.java:16: error: ';' expected
            result = a * b
                          ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int) n; i++)
using ll = long long;
template <class T>
using vt = vector<T>;
using vvi = vector<vector<int>>;

int main() {
  inr a,b;
  cin >> a >> b;
  if(a>9||b>9)
    cout << -1;

  else
    cout << a*b;
  return 0;
}


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

#include<iostream>
using namespace std;

int main(){
	int a, b;
	cin >> a >> b;
	int ans = -1
	if(0<a && a<10 && 0<b && b<10)	ans = a*b;
	
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected ',' or ';' before 'if'
    8 |         if(0<a && a<10 && 0<b && b<10)  ans = a*b;
      |         ^~
Language: C++

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

int main(){
  int A,B;
  cin >> A >> B;
  if(A<=9&&A>==1&&B>==1&&B<=9){
    cout << A*B;
  }
  else
    cout <<"-1";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected primary-expression before '=' token
    7 |   if(A<=9&&A>==1&&B>==1&&B<=9){
      |               ^
a.cc:7:22: error: expected primary-expression before '=' token
    7 |   if(A<=9&&A>==1&&B>==1&&B<=9){
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A, B; 
  cin >> A >> B;
  
  if(9 < A || 9 < B) cout << -1 << endl;
  else cout A * B << endl; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected ';' before 'A'
    9 |   else cout A * B << endl;
      |            ^~
      |            ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A, B; 
  cin >> A >> B;
  
  if(9 < A || 9 < B) cout << -1 << endl;
  else cout A * B; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected ';' before 'A'
    9 |   else cout A * B;
      |            ^~
      |            ;
Language: C

    #include <bits/stdc++.h>
    using namespace std;
    typedef long long ll;
    typedef long double ld;
    typedef pair<ll, ll> l_l;
    typedef pair<int , int> i_i;
    typedef vector<ll> vl;
    typedef vector<int> vi;
    typedef vector<char> vec;
    typedef vector<bool> veb;
    typedef vector<string> ves;
    typedef vector<vector<ll>> vvl;
    typedef vector<vector<int>> vvi;
    typedef vector<vector<char>> vvec;
    typedef vector<vector<bool>> vveb;
    typedef vector<vector<string>> vves;
    #define rep(i,n) for(int i=0;i<(int)(n);i++)
    #define rep1(i,n) for(int i=1;i<(int)(n);i++)
    #define rep2(i,n) for(int i=2;i<(int)(n);i++)
    #define repk(i,k,n) for(int i=k;i<(int)(n);i++)
    #define fs first
    #define sc second
    #define pb push_back
    #define pp pop_back
    #define all(a) a.begin(),a.end()
    #define rall(a) a.rbegin(),a.rend()
    #define maxel(a) *max_element(all(a))
    #define minel(a) *min_element(all(a))
    #define acc accumulate
    #define EPS (1e-7)
    #define INF (1e18)
    #define PI (acos(-1))
    #define mod (1000000007)
    typedef long long int64;
    //const int64 INF = 1LL << 58;
    #define dame { puts("-1"); return 0;}
    #define YES { cout << "YES" << endl; return 0; }
    #define NO { cout << "NO" << endl; return 0; }
    #define Yes { cout << "Yes" << endl; return 0; }
    #define No { cout << "No" << endl; return 0; }
    template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
    template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
    int dx[] = {0, 0, -1, 1};
    int dy[] = {1, -1, 0, 0};
     
     
    ll search(ll x){
        ll d = INF;
        for(ll i = 1; i*i<=x ; i++){
            if(x%i==0){
            if(d>=(i+(x/i)-2)) d = i+(x/i)-2 ;      
            }
        }
        return d;
    }
     
    int main(){
    	cin.tie(0);
    	ios::sync_with_stdio(false);
     
        ll n;
        cin >> n;
        cout << search(n) << endl;    
        return 0;
     
    }

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

#include <bits/stdc++.h>
#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
#define acc(v) accumulate(v.begin(), v.end(), 0)
#define cinv(n,v) rep(i,n) cin >> v[i]
using namespace std;
const int INF = 1e9;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vint;
typedef vector<string> vstr;
typedef vector<char> vchar;
const ll LINF = 1e18;
const ll MOD = 1e9 + 7;
int x_pos[4] = {1,0,-1,0}, y_pos[4] = {0,1,0,-1};
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;
}

void unique_vector(vector<int>& v){
	sort(all(v));
	v.erase(unique(all(v)), v.end());
}

// n次元配列の初期化。第２引数の型のサイズごとに初期化していく。
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}

//ユークリッドの互除法
//最大公約数
ll gcd(ll x, ll y) {
  if (y == 0) return x;
  return gcd(y, x%y);
}

//最小公倍数
ll lcm(ll x, ll y){
	ll g = gcd(x,y);
	return x/g*y;
}

ll myPow(ll x, ll n, ll m){
  if(n == 0)
    return 1;
  if(n % 2 == 0)
    return myPow(x * x % m, n / 2, m);
  else
    return x * myPow(x, n - 1, m) % m;
}

//素因数分解
map<ll, ll> prime_factor(ll n)
{
	map<ll, ll> ret;
	for (ll i = 2; i * i <= n; i++)
	{
		while (n % i == 0)
		{
			ret[i]++;
			n /= i;
		}
	}
	if (n != 1)
		ret[n] = 1;
	return ret;
}

int main() {
	int a,b;cin>>a>>b;
	cout << (a<10 && b<10 ? a*b ? -1) <<< endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:85:41: error: expected ':' before ')' token
   85 |         cout << (a<10 && b<10 ? a*b ? -1) <<< endl;
      |                                         ^
      |                                         :
a.cc:85:41: error: expected primary-expression before ')' token
a.cc:85:41: error: expected ':' before ')' token
   85 |         cout << (a<10 && b<10 ? a*b ? -1) <<< endl;
      |                                         ^
      |                                         :
a.cc:85:41: error: expected primary-expression before ')' token
a.cc:85:45: error: expected primary-expression before '<' token
   85 |         cout << (a<10 && b<10 ? a*b ? -1) <<< endl;
      |                                             ^
Language: C

#include <stdio.h>
int main(){
  int a,b;
    scanf ("%d%d",&a,&b);
  if(a<=9 && b<=9)printf("%d\n",a*b);
  else printf("-1\n",);
}

Compiler output:
main.c: In function 'main':
main.c:6:22: error: expected expression before ')' token
    6 |   else printf("-1\n",);
      |                      ^
Language: C++

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

int main() {
  int A,B;
  cin >> A >> B; 
  
  if (A >= 10 || B >= 10) {
    cout << -1 << endl;
  }
  else if cout << A * B << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: expected '(' before 'cout'
   11 |   else if cout << A * B << endl;
      |           ^~~~
      |           (
Language: C++

#include <iostream>
using namespace std;
int main() {
  int A. B;
  cin >> A >> B;
  if (A >= 1 && A <= 9 && B >= 1 && B <= 9) {
    cout << A * B << endl;
  }
  else {
    cout << -1 << endl;
  }


}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: expected initializer before '.' token
    4 |   int A. B;
      |        ^
a.cc:5:10: error: 'A' was not declared in this scope
    5 |   cin >> A >> B;
      |          ^
a.cc:5:15: error: 'B' was not declared in this scope
    5 |   cin >> A >> B;
      |               ^
Language: C++

#include <stdc++.h>
using namespace std;
int main()
{
  int a,b;
  cin>>a>>b;
  int ans=-1;
  if (a<10 &&b<10) ans=a*b;
  cout <<ans<<endl;
  
return 0;
}

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

# coding: utf-8
a,b = list(map(int,input().split()))
if a>=10 or b>=10:
    print("-1")
else: print("{:}".format(a*b))

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #coding
    1 | # coding: utf-8
      |   ^~~~~~
a.cc:2:1: error: 'a' does not name a type
    2 | a,b = list(map(int,input().split()))
      | ^
Language: C

#include<stdio.h>
int main(void){
  int a,b;
  scanf("%d%d",&a,&b);
  if(a<10 && b<10) {
    printf("%d",a*b);
    else {
      printf("-1");
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:5: error: expected '}' before 'else'
    7 |     else {
      |     ^~~~
main.c: At top level:
main.c:11:3: error: expected identifier or '(' before 'return'
   11 |   return 0;
      |   ^~~~~~
main.c:12:1: error: expected identifier or '(' before '}' token
   12 | }
      | ^
Language: C++

A = int(input())
B = int(input()) 
if 1 <= A >= 9 
   if 1 <= B >= 9
   ans = (A * B)
   print(ans)
if 1 > A >= 9 
print(-1)
if 1 <= A < 9 
print(-1)
if 1 > B >= 9
print(-1)
if 1 <= B < 9
print(-1)


Compiler output:
a.cc:1:1: error: 'A' does not name a type
    1 | A = int(input())
      | ^
Language: Java

import java.utils.*;
import java.lang.Math;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());

    if ( a > 9 || b > 9) {
      System.out.println("-1");
    }
    System.out.println(a * b);
  }
}


Compiler output:
Main.java:1: error: package java.utils does not exist
import java.utils.*;
^
Main.java:6: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
3 errors
Language: Java


public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		//intを受け取る
		int a = sc.nextInt();
		int b = sc.nextInt();
		
		if(a<=9 && b<=9) {
			System.out.println(a*b);
		}else {
			System.out.println("-1");
		}
	}
}


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


import java.util.*;

public class Abc144_a {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		//intを受け取る
		int a = sc.nextInt();
		int b = sc.nextInt();
		
		if(a<=9 && b<=9) {
			System.out.println(a*b);
		}else {
			System.out.println("-1");
		}
	}
}


Compiler output:
main.c:2:1: error: unknown type name 'import'
    2 | import java.util.*;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.util.*;
      |            ^
main.c:4:1: error: unknown type name 'public'
    4 | public class Abc144_a {
      | ^~~~~~
main.c:4:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Abc144_a'
    4 | public class Abc144_a {
      |              ^~~~~~~~
Language: C++

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

int main(){

  int a,b=0;
 
  cin>>a>>b;
  
  if(a>9 || b>9){cout<<-1<<endl;return 0}
  
  cout<<a*b<<endl;

  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:41: error: expected ';' before '}' token
   13 |   if(a>9 || b>9){cout<<-1<<endl;return 0}
      |                                         ^
      |                                         ;