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

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

int main() {
  
  int n;
  cin >> n;
  long a[];
  a[0]=7.0;
  

  for(int i=2;;i++){
    a[i-1]=a[i-2]+7*10
      if(n==7){
        cout << 1 <<endl;
        break;
      }
   
      if(a[i-1]%n==0.0;){
        cout << i << endl;
        break;
      }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: storage size of 'a' isn't known
    8 |   long a[];
      |        ^
a.cc:19:24: error: expected primary-expression before ')' token
   19 |       if(a[i-1]%n==0.0;){
      |                        ^
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL); 
	unsigned long long int k=7,c=0;
	int n; cin>>n;
    if(k%2==0)
      continue;
  else{
	while(k<777777777){
		if(k%n!=0){
			k *= 10;
			k += 7;
			c++;
		}
		else{
			break;
		}
	}
  }
	if(c!=0)
	cout << c+1;
	else
	cout << -1;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: continue statement not within a loop
   10 |       continue;
      |       ^~~~~~~~
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[];
        A=new int[100];
		double B[];
        B=new double[100];
        B[0]=7;
        for(int i=1;i<100;i++){
        	B[i]=B[i-1]+7.0*(10.0)^i;
        }
        for(int i=1;i<100;i++){
        	A[i]=(int)B[i];
        }        
        int C[];
        C=new int[100];
        for(int i=1;i<100;i++){
        	C[i]=A[i]%K;
            if (K=0){
            	System.out.println(i);
            } else {
            	System.out.println(-1);
            }
        }               
	}
}


Compiler output:
Main.java:13: error: bad operand types for binary operator '^'
        	B[i]=B[i-1]+7.0*(10.0)^i;
        	                      ^
  first type:  double
  second type: int
Main.java:22: error: incompatible types: int cannot be converted to boolean
            if (K=0){
                 ^
2 errors
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[];
        A=new int[100];
		double B[];
        B=new double[100];
        B[0]=7;
        for(double i=1.0;i<100.0;i++){
        	B[i]=B[i-1]+7.0*(10.0)^i;
        }
        for(int i=1;i<100;i++){
        	A[i]=(int)B[i];
        }        
        int C[];
        C=new int[100];
        for(int i=1;i<100;i++){
        	C[i]=A[i]%K;
            if (K=0){
            	System.out.println(i);
            } else {
            	System.out.println(-1);
            }
        }               
	}
}


Compiler output:
Main.java:13: error: incompatible types: possible lossy conversion from double to int
        	B[i]=B[i-1]+7.0*(10.0)^i;
        	  ^
Main.java:13: error: incompatible types: possible lossy conversion from double to int
        	B[i]=B[i-1]+7.0*(10.0)^i;
        	        ^
Main.java:13: error: bad operand types for binary operator '^'
        	B[i]=B[i-1]+7.0*(10.0)^i;
        	                      ^
  first type:  double
  second type: double
Main.java:22: error: incompatible types: int cannot be converted to boolean
            if (K=0){
                 ^
4 errors
Language: C++

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

int main()
{
    unsigned long long int sevens = 0;
    unsigned long long int tens = 1;
    unsigned long long int ans = 0;
    unsigned long longint N = 0;
    unsigned long longint i, j;

    cin >> N;

    for (i = 0; i <= 10000000; i++)
    {
        for (j = 0; j <= i; j++)
        {
            tens *= 10;
        }
        ans = 7 + sevens * 10;

        if (ans % N == 0)
        {
            cout << j << endl;
            break;
        }
        sevens = ans;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: expected initializer before 'N'
    9 |     unsigned long longint N = 0;
      |                           ^
a.cc:10:27: error: expected initializer before 'i'
   10 |     unsigned long longint i, j;
      |                           ^
a.cc:12:12: error: 'N' was not declared in this scope
   12 |     cin >> N;
      |            ^
a.cc:14:10: error: 'i' was not declared in this scope
   14 |     for (i = 0; i <= 10000000; i++)
      |          ^
a.cc:16:14: error: 'j' was not declared in this scope; did you mean 'jn'?
   16 |         for (j = 0; j <= i; j++)
      |              ^
      |              jn
a.cc:24:21: error: 'j' was not declared in this scope; did you mean 'jn'?
   24 |             cout << j << endl;
      |                     ^
      |                     jn
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[];
        A=new int[100];
		double B[];
        B=new double[100];
        B[0]=7;
        for(double i=1;i<100;i++){
        	B[i]=B[i-1]+7.0*(10.0)^i;
        }
        for(int i=1;i<100;i++){
        	A[i]=(int)B[i];
        }        
        int C[];
        C=new int[100];
        for(int i=1;i<100;i++){
        	C[i]=A[i]%K;
            if (K=0){
            	System.out.println(i);
            } else {
            	System.out.println(-1);
            }
        }               
	}
}


Compiler output:
Main.java:13: error: incompatible types: possible lossy conversion from double to int
        	B[i]=B[i-1]+7.0*(10.0)^i;
        	  ^
Main.java:13: error: incompatible types: possible lossy conversion from double to int
        	B[i]=B[i-1]+7.0*(10.0)^i;
        	        ^
Main.java:13: error: bad operand types for binary operator '^'
        	B[i]=B[i-1]+7.0*(10.0)^i;
        	                      ^
  first type:  double
  second type: double
Main.java:22: error: incompatible types: int cannot be converted to boolean
            if (K=0){
                 ^
4 errors
Language: Java

import java.util.Scanner;

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

        int k = sc.nextInt();
        String seven = 7;
        int count = 0;

        if (k % 2 == 0) {
            System.out.println(-1);
        } else {
            while(seven % k != 0) {
                count++;
                seven = seven * 10 + 7;
            }

            System.out.println(count);
        }
    }
}

Compiler output:
Main.java:8: error: incompatible types: int cannot be converted to String
        String seven = 7;
                       ^
Main.java:14: error: bad operand types for binary operator '%'
            while(seven % k != 0) {
                        ^
  first type:  String
  second type: int
Main.java:16: error: bad operand types for binary operator '*'
                seven = seven * 10 + 7;
                              ^
  first type:  String
  second type: int
3 errors
Language: C++

#include <bits/stdc++.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
 
int main() {
  int K,count=1,j=0;
  cin >> K;
  if((K%2) == 0){
    cout << "-1" << endl;
    return 0;
  }
  for(;;){
    j = count - 1;
   	string seven_char = "7";
    while(j>0){
      seven_char += "7";
      j--;
    }
    int seven_int = atoi(seven_char);
	if((seven_int%K) == 0){
      break;
    }
    count++;
  }
  cout << count << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:26: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   20 |     int seven_int = atoi(seven_char);
      |                          ^~~~~~~~~~
      |                          |
      |                          std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
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;
        A=new int[100];
		double B;
        B=new double[100];
        B[0]=7;
        for(double i=1;i<100;i++){
        	B[i]=B[i-1]+7.0*(10.0)^i;
        }
        for(int i=1;i<100;i++){
        	A[i]=(int)B[i];
        }        
        int C;
        C=new int[100];
        for(int i=1;i<100;i++){
        	C[i]=A[i]%K;
            if (K=0){
            	System.out.println(i);
            } else {
            	System.out.println(-1);
            }
        }               
	}
}


Compiler output:
Main.java:8: error: incompatible types: int[] cannot be converted to int
        A=new int[100];
          ^
Main.java:10: error: incompatible types: double[] cannot be converted to double
        B=new double[100];
          ^
Main.java:11: error: array required, but double found
        B[0]=7;
         ^
Main.java:13: error: incompatible types: possible lossy conversion from double to int
        	B[i]=B[i-1]+7.0*(10.0)^i;
        	  ^
Main.java:13: error: array required, but double found
        	B[i]=B[i-1]+7.0*(10.0)^i;
        	 ^
Main.java:13: error: incompatible types: possible lossy conversion from double to int
        	B[i]=B[i-1]+7.0*(10.0)^i;
        	        ^
Main.java:13: error: array required, but double found
        	B[i]=B[i-1]+7.0*(10.0)^i;
        	      ^
Main.java:16: error: array required, but int found
        	A[i]=(int)B[i];
        	 ^
Main.java:16: error: array required, but double found
        	A[i]=(int)B[i];
        	           ^
Main.java:19: error: incompatible types: int[] cannot be converted to int
        C=new int[100];
          ^
Main.java:21: error: array required, but int found
        	C[i]=A[i]%K;
        	 ^
Main.java:21: error: array required, but int found
        	C[i]=A[i]%K;
        	      ^
Main.java:22: error: incompatible types: int cannot be converted to boolean
            if (K=0){
                 ^
13 errors
Language: C++

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


  
int main() {
    int k;
    cin>>k;
    if(k%2==0 || k==0 || k<7)
    {
    	cout<<"-1";
    }
    else
    {
    	int flag=-1;
    	int n=log2(k);
    	vector<ll> v(n);
    	v[0]=7;
    	for(int i=1;i<n;i++)
    	{
    		
    		v[i]=v[i-1]*10+7;
    	}
    	for(int i=0;i<n;i++)
    	{
    		if(v[i]%k ==0)
    		{
    			flag=i;
    			break;
    		}
    		else
    		{
    			if
    		}
    	}
    	cout<<flag;
    }
	return 0;
	

}

  
   


Compiler output:
a.cc: In function 'int main()':
a.cc:35:17: error: expected '(' before '}' token
   35 |                 }
      |                 ^
      |                 (
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
 
int main() {
  	int K, ans = 0, x = 0,a = 1;
  	cin >> K;
  	while(x*7 % K == 0){
    	
    	x = a + x
      	a *= 10;
      	ans++;
    }
  	
  	cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected ';' before 'a'
   10 |         x = a + x
      |                  ^
      |                  ;
   11 |         a *= 10;
      |         ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
int main(void){
  ll k;
  cin>>k;
  for(ll i=0;i<=100000;i++){
    if((7+7*pow(10,i))%k==0){
      cout<<i<<endl;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'll' {aka 'long long int'} to binary 'operator%'
    8 |     if((7+7*pow(10,i))%k==0){
      |        ~~~~~~~~~~~~~~~^~
      |          |             |
      |          |             ll {aka long long int}
      |          __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

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

bool  (ll num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false; 

    double sqrtNum = sqrt(num);
    for (ll i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            return false;
        }
    }

    return true;
}


void solve() 
{
    int k;cin>>k;
    if(7%k==0)cout<<1<<endl;
    else if(7777%k==0)cout<<4<<endl;
    else if(k!=2&&k!=5&&IsPrime(k))cout<<k-1<<endl;
    else cout<<-1<<endl;
}

int main()
{
    cin.tie(0);
	ios::sync_with_stdio(false);
    solve();
    return 0;
}

Compiler output:
a.cc:7:10: error: expected ')' before 'num'
    7 | bool  (ll num)
      |       ~  ^~~~
      |          )
a.cc: In function 'void solve()':
a.cc:31:25: error: 'IsPrime' was not declared in this scope
   31 |     else if(k!=2&&k!=5&&IsPrime(k))cout<<k-1<<endl;
      |                         ^~~~~~~
Language: C++

#include <boost/multiprecision/cpp_int.hpp>
#include <bits/stdc++.h>
using namespace std;
using namespace boost::multiprecision;
int main(){
    cpp_int x=7;
    long long n;
    cin>>n;
    if(n%2==0||n%5==0){
        cout<<-1<<endl;
        return 0;
    }
    for(int i=1;i<=1000000;i++){
        if(x%n==0){
            cout<<i<<endl;
            return 0;
        }
        x+=7*pow(10,i);
    }
    cout<<-1<<endl;
    return 0;
}


Compiler output:
a.cc:1:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
    1 | #include <boost/multiprecision/cpp_int.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int K;
  cin >> K;
  int i=1;
  int N=7;
  int ans;
  do{
    if(N%K==0) {
      ans=i;
      break;
    }
    else if(K%2==0){
      ans=-1
      break;
    }
    else{
      N=N*10+7;
      i++;
    }
  }while(i<=11111111);
  cout << ans <<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: expected ';' before 'break'
   16 |       ans=-1
      |             ^
      |             ;
   17 |       break;
      |       ~~~~~
Language: Java

package test02;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;

public class C174 {
	public static void main (String[] args) throws IOException{
	    InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
	    BufferedReader in = new BufferedReader(reader);
		int n = Integer.parseInt(in.readLine());
		int cnt = 0;
		long num = 7;

		if(n % 2 == 0) {
			System.out.println(-1);
			return;
		}
		for(int i=0; i < 7; i++) {
			cnt++;
			if(i == 0) {
				if(num % n == 0) {
					System.out.println(cnt);
					break;
				}
				continue;
			}
			else{
				num += 7*(long)Math.pow(10, i);
				if(num % n == 0) {
					System.out.println(cnt);
					break;
				}
			}
		}
	}
}

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

K = int(input())
if K % 2 == 0:
    print(-1)
elif K % 5 == 0:
    print(-1)
else:
    n = 7
    for i in range(1,40000):
        if n % K == 0:
            print(i)
            break
        n = n * 10 + 7
        i += 1
        if(i == 40000):
           print(K-1)


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

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner stdinScanner = new Scanner(System.in);
        int K = stdinScanner.nextInt();
        int count = 1;
        int current = 7;
        while (count <= K) {
            if (current % K == 0) {
                System.out.println(count);
                return;
            }
            count++;
            current = (current * 10 + 7) % K;
        }
        System.out.println("-1");
    }


Compiler output:
Main.java:18: error: reached end of file while parsing
    }
     ^
1 error
Language: C++

#include <iostream>
#include <cstdio>
using namespace std;
int n,d;
int main(){
	cin >> n;
	for(int i = 1; i < n; i ++){
		d = (d * 10 + n) % mod;
		if(d == 0){
			printf("%d\n",i);
			return 0;
		}
	}
	printf("-1\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:36: error: 'mod' was not declared in this scope
    8 |                 d = (d * 10 + n) % mod;
      |                                    ^~~
Language: C++

#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
 
int main() {
  int K,count=1;
  cin >> K;
  if((K%2) == 0){
    cout << "-1" << endl;
    return 0;
  }
  for(;;){
	char seven_char[count] = "0";
    for(int i=0;i<count;i++){
      seven_char[i] = "7";
    }
    int seven_int = atoi(seven_char);
	if((seven_int%K) == 0){
      break;
    }
    count++;
  }
  cout << count << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   15 |       seven_char[i] = "7";
      |                       ^~~
      |                       |
      |                       const char*
Language: C++

#include <iostream>
#include <cstdio>
using namespace std;
int n,d = 0;
int main(){
	cin >> n;
	for(int i = 1; i < n; i ++){
		d = (d * 10 + k) % mod;
		if(d == 0){
			printf("%d\n",i);
			return 0;
		}
	}
	printf("-1\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:31: error: 'k' was not declared in this scope
    8 |                 d = (d * 10 + k) % mod;
      |                               ^
a.cc:8:36: error: 'mod' was not declared in this scope
    8 |                 d = (d * 10 + k) % mod;
      |                                    ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int K;
  cin >> K;
  int i=1;
  int N=7;
  int ans;
  do{
    if(N%K==0) {
      ans=i;
      break;
    }
    else if(K%2==0){
      ans=-1
      break;
    }
    else{
      N=N*10+7;
      i++;
    }
  }while(ans!=i || ans!=-1);
  cout << ans <<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: expected ';' before 'break'
   16 |       ans=-1
      |             ^
      |             ;
   17 |       break;
      |       ~~~~~
Language: C++

#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
 
int main() {
  int K,count=1;
  cin >> K;
  if((K%2) == 0){
    cout << "-1" << endl;
    exit(0);
  }
  for(;;){
	char seven_char[count] = "0";
    for(int i=0;i<count;i++){
      seven_char[i] = "7";
    }
    int seven_int = atoi(seven_char);
	if((seven_int%K) == 0){
      break;
    }
    count++;
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   15 |       seven_char[i] = "7";
      |                       ^~~
      |                       |
      |                       const char*
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    long long int k;
    int c=0
    cin>>k;
    for(int i=1;i<pow(10,20);i++){
        if(((7/9)*(pow(10,i)-1))%k == 0){
            cout<<i<<endl;
            c=1;
            break;
        }
    }
    if(c==0){
        cout<<-1<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected ',' or ';' before 'cin'
    6 |     cin>>k;
      |     ^~~
a.cc:8:33: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'long long int' to binary 'operator%'
    8 |         if(((7/9)*(pow(10,i)-1))%k == 0){
      |            ~~~~~~~~~~~~~~~~~~~~~^~
      |                  |               |
      |                  |               long long int
      |                  __gnu_cxx::__promote<double>::__type {aka double}
Language: C

#include<iostream>
#include <cstdio>
#include <cmath>
#include <cstring> 
#include <algorithm>
using namespace std;
#include <queue> 
#define ll long long
int main()
{
	int k;
	cin>>k;
	int T=0;
	for(int i=7,j=1;j<=100000000000;i=i*10+7,j++) 
	{
		//printf("%d\n",i);
		if(i%k==0)
		{
			printf("%d",j);T=1;break;
		}
	}
	if(T==0)
	{
		printf("-1");
	}
}

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

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

int main() {
  int K;
  cin >> K;
  int ans=-1;
  
  int mod= 7777777%K;
  int amari=70000000%K;
  
  if(7%==0)ans =1;
  else if(77%K==0)ans=2;
  else if(777%K==0)ans=3;
  else if(7777%K==0)ans=4;
  else if(77777%K==0)ans=5;
  else if(777777%K==0)ans=6;
  else if(7777777%K==0)ans=7;
  else if(K%2!=0 && K%5!=0){
    for(int i=8; i<=K; i++){
      mod += amari;
      mod =  mod%K;
      if(mod==0){
        ans=i;
        break;
      }
      
      amari = amari*10%K;
    }
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: expected primary-expression before '=' token
   12 |   if(7%==0)ans =1;
      |         ^
Language: C++

#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
 
int main() {
  int K,count=1;
  cin >> K;
  if((K%2) == 0){
    cout << "-1" << endl;
    exit(0);
  }
  for(;;){
	char seven_char[count] = "0";
    for(int i=0;i<count;i++){
      seven_char[i] = "7";
    }
    int seven_int = atoi(seven_char);
	if(seven_int%K == 0){
      break;
    }
    count++;
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   15 |       seven_char[i] = "7";
      |                       ^~~
      |                       |
      |                       const char*
Language: C++

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

using namespace std;


int main(void){
    long long x;
    long long cnt=1;
    long long tmp=7;
    
    
    cin >> x;
    
    if (x%2 == 0) {
        cout << -1 << '\n';
        return 0;
    } else {
        while (true) {
            if (tmp%x == 0) {
                cout << cnt << '\n';
                return 0;
            } else {
                tmp += (7*(pow(10, cnt)))%x;
                cnt++;
            }
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:42: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'long long int' to binary 'operator%'
   25 |                 tmp += (7*(pow(10, cnt)))%x;
      |                        ~~~~~~~~~~~~~~~~~~^~
      |                          |                |
      |                          |                long long int
      |                          __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
 
int main() {
  int K,count=1;
  cin >> K;
  if((K%2) == 0){
    cout << "-1" << endl;
    return 0;
  }
  for(;;){
	char seven_char[count];
    for(int i=0;i<count;i++){
      seven_char[i] = "7";
    }
    int seven_int = atoi(seven_char);
	if(seven_int%K == 0){
      break;
    }
    count++;
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   15 |       seven_char[i] = "7";
      |                       ^~~
      |                       |
      |                       const char*
Language: C++

#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
 
int main() {
  int K,count=1;
  cin >> K;
  if((K%2) == 0){
    cout << "-1" << endl;
    exit(0);
  }
  for(;;){
	char seven_char[count];
    for(int i=0;i<count;i++){
      seven_char[i] = "7";
    }
    int seven_int = atoi(seven_char);
	if(seven_int%K == 0){
      break;
    }
    count++;
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   15 |       seven_char[i] = "7";
      |                       ^~~
      |                       |
      |                       const char*
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int K,A;
  cin >> K;
  A = 0;
  for(int i =1 ;i< 6;i*=10) {
    A += 7 * i;
    if(A%K = 0) {
      cout << i << endl;
      i = 6;
    }
  }
  cout << -1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: lvalue required as left operand of assignment
    9 |     if(A%K = 0) {
      |        ~^~
Language: C++

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

int main(){
  int k;
  cin>>k;
  long long x=0;
  for(int i=1;i<1000;i++){
    x=10*x+7;
    if(x%K==0){
      cout<<i<<endl;
      return 0;
    }
  }
  cout<<-1<<endl;
}


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

#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
 
int main() {
  int K,flag=0,count=1;
  cin >> K;
  if((K%2) == 0){
    cout << "-1" << endl;
    exit(0);
  }
  while(flag==0){
	char seven_char[count];
    for(int i=0;i<count;i++){
      seven_char[i] = "7";
    }
    int seven_int = atoi(seven_char);
	if(seven_int%K == 0){
      break;
    }
    count++;
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   15 |       seven_char[i] = "7";
      |                       ^~~
      |                       |
      |                       const char*
Language: Java

// 標準入力から2次元配列
import java.util.*;

public class Main {
    public static void main(String[] args) {
        int result=-1;
        Scanner sc = new Scanner(System.in);
        int K = sc.nextInt();
      if(n%2!=0){

        String str = "7";
		int seven = Integer.parseInt(str);
        
			for (int i = 1; i <= 10000000; i++){

			  if (seven%K==0){
                result=i;
			    break;
			  }
		        str = str + "7";
				seven = Integer.parseInt(str);
  
			}       
      }
        System.out.println(result);
    }
}

Compiler output:
Main.java:9: error: cannot find symbol
      if(n%2!=0){
         ^
  symbol:   variable n
  location: class Main
1 error
Language: C++

#include <cstdio>
#include <cstring>
#include <queue>
#include <iostream>
#include<bits/stdc++.h>
typedef long long int ll;
using namespace std;
int f;

ll division(ll n)
{
    //char ans[MAX_N];
   ll con=0;
    bool flag = true;
    ll k = 0,s = 0,t = 0;
    ll g=10000000;
    while(g--)
    {
        ll it=s;
        t = s*10 + 7;
        con++;
        if(t/n>0 || t == 0)
        {

            s = t%n;
            flag = false;
        }
        else
        {
            s = t;

        }
        if(!flag){if(it==s){f=0;return con;}}
        if(!flag){if(s==0){f=1;return con;}}
    }
    f=0;
    return;
}
int main()
{

   ll k;
   cin>>k;
   ll c=division(k);
   if(f==1||c==1)printf("%lld\n",c);
   else printf("-1\n");
    return 0;
}


Compiler output:
a.cc: In function 'll division(ll)':
a.cc:37:5: error: return-statement with no value, in function returning 'll' {aka 'long long int'} [-fpermissive]
   37 |     return;
      |     ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string k;
  cin >> k;
  int num = k.size();
  char a = k.at(num-1);
  if (a == "2" || a == "4" || a == "5" || a == "6" || a == "8"){
    cout << -1 << endl;
    return 0;
  }
  string s = "7";
  int cnt = 1;
  int ans = atoi(k.c_str());
  while (true) {
    int s_num = atoi(s.c_str());
    if (s_num % ans == 0){
      cout << cnt;
      return 0;
    }
    cnt++;
    s += "7";
  }  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if (a == "2" || a == "4" || a == "5" || a == "6" || a == "8"){
      |       ~~^~~~~~
a.cc:9:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if (a == "2" || a == "4" || a == "5" || a == "6" || a == "8"){
      |                   ~~^~~~~~
a.cc:9:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if (a == "2" || a == "4" || a == "5" || a == "6" || a == "8"){
      |                               ~~^~~~~~
a.cc:9:45: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if (a == "2" || a == "4" || a == "5" || a == "6" || a == "8"){
      |                                           ~~^~~~~~
a.cc:9:57: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if (a == "2" || a == "4" || a == "5" || a == "6" || a == "8"){
      |                                                       ~~^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int K;
  cin >> K;
  int ans = 1;
  int nana = 0;
  bool flag = false;
  if(K%2==0 || K%5==0){
    cout << -1 << endl;
  }else{
    while(flag == false){
      nana += 7*pow(10,ans-1);
      if(nana % K = 0){
        flag = true;
      }else{
        ans++;
      }
    }
    cout << ans << endl;
  }
}
        
      

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: lvalue required as left operand of assignment
   14 |       if(nana % K = 0){
      |          ~~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int x, y, i;
  cin >> x;
  i = 1;
  y = 7;
 
  while (y % x != 0) {
    y = y + 7 * pow(10, i);
    i = i + 1
  }
  
  cout << i << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: expected ';' before '}' token
   12 |     i = i + 1
      |              ^
      |              ;
   13 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int K,A;
  cin >> K;
  for(int i = ;i< 6;i*=10) {
    A += 7 * i;
    if(A/K) {
      cout << i << endl;
      i = 6;
    }
  }
  cout << -1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected primary-expression before ';' token
    6 |   for(int i = ;i< 6;i*=10) {
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int K;
  cin >> K;
  int ans = 1;
  int nana = 0
  bool flag = false;
  if(K%2==0 || K%5==0){
    cout << -1 << endl;
  }else{
    while(flag == false){
      nana += 7*pow(10,ans-1);
      if(nana % K = 0){
        flag = true;
      }else{
        ans++;
      }
    }
    cout << ans << endl;
  }
}
        
      

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'bool'
    8 |   bool flag = false;
      |   ^~~~
a.cc:12:11: error: 'flag' was not declared in this scope
   12 |     while(flag == false){
      |           ^~~~
a.cc:14:15: error: lvalue required as left operand of assignment
   14 |       if(nana % K = 0){
      |          ~~~~~^~~
Language: C++

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

int main(){
  int k;
  cin>>k;
  long long x=0;
  for(int i=1;i<100000000;i++){
    x=10*x+7;
    if(x%K==0){
      cout<<i<<endl;
      return 0;
    }
  }
  cout<<-1<<endl;
}

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

#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/rational.hpp>
#include <iostream>
#define rep(i,x,n) for(int i = x; i < (int)(n); i++)
#define rep_ll(i,x,n) for(ll i = x; i < (ll)(n); i++)
using namespace std;
namespace mp = boost::multiprecision;
// 任意長整数型
using Bint = mp::cpp_int;
typedef long long ll;
typedef unsigned long long u_ll;
typedef pair<int, int> pair_;
const long double PI = (acos(-1));
const int INF = 1001001001;
const int dx[] = {-1, 0, 1, 0}; const int dy[] = {0, -1, 0, 1};
ll mod = 1000000007;
int main(){
    Bint k;
    cin >> k;

    Bint da = 7;
    Bint da_=7;
    int ans=-1;
    for(Bint i=1;i <= 999982; i++){
        if(da%k==0) {
            ans=i;
            break;
        }
        da_=da_*10;
        da+=da_;
        //cout << da << endl;
    }
    cout << ans;
    //cout << da << " " << ans;

    return 0;
}


Compiler output:
a.cc:2:10: fatal error: boost/multiprecision/cpp_dec_float.hpp: No such file or directory
    2 | #include <boost/multiprecision/cpp_dec_float.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

//コンパイラ最適化用
#pragma GCC optimize("Ofast")
#define _GLIBCXX_DEBUG
//インクルード(アルファベット順)
#include<algorithm>//sort,二分探索,など
#include<bitset>//固定長bit集合
#include<chrono>//実行時間計測
#include<cmath>//pow,logなど
#include<complex>//複素数
#include<deque>//両端アクセスのキュー
#include<functional>//sortのgreater
#include<iomanip>//setprecision(浮動小数点の出力の誤差)
#include<iostream>//入出力
#include<iterator>//集合演算(積集合,和集合,差集合など)
#include<map>//map(辞書)
#include<numeric>//iota(整数列の生成),gcdとlcm,accumulate
#include<queue>//キュー
#include<set>//集合
#include<stack>//スタック
#include<string>//文字列
#include<unordered_map>//順序保持しないmap
#include<unordered_set>//順序保持しないset
#include<utility>//pair
#include<vector>//可変長配列
#include<bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
typedef pair<int, int> pii;
typedef pair<ll, ld> pld;
typedef pair<pii, int> ppiii;
typedef pair<pii, ll> ppiill;
typedef pair<pll, ll> ppllll;
typedef pair<pli, int> pplii;
typedef map<int, int> mii;
typedef deque<ll> dll;
typedef queue<ll> qll;
typedef priority_queue<ll> pqll;
typedef priority_queue<ll, vector<ll>, greater<ll>> pqrll;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef vector<vector<int>> vvint;
typedef vector<vector<pll>> vvpll;

//マクロ
//forループ
//引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
//Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる
#define REP(i,n) for(ll i=0;i<ll(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=ll(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=ll(b);i--)
//xにはvectorなどのコンテナ
#define ALL(x) x.begin(),x.end() 
#define SIZE(x) ll(x.size()) 
//定数
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007 //10^9+7:合同式の法
#define MAXR 100000 //10^5:配列の最大のrange
//略記
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素
#define cin(x) cin >> x

signed main(){
    //入力の高速化用のコード
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    //入力
    ll K = 0;
    cin(K);

    vll X = {7,77,777,7777,77777,777777,7777777,77777777,777777777}
    //REP(i,N) cin(X.at(i));

    int ans = 0;

    if(K%2==0) cout<< -1 <<endl;
    if(K%2==1){
        REP(i,8){
        if(X.at(i) % K ==0){
            cout << i+1 << endl;
            break;
        }
        }

    }
    //REP(i,N) cout << ans.at(i) <<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:83:5: error: expected ',' or ';' before 'int'
   83 |     int ans = 0;
      |     ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int K;
  cin >> K;
  
  int N = 7;
  int count = 0;
  
  for(int i = 0; i < 10⁷; i++){
  if(N % K == 0){
    cout << count << endl;
  }
  else{
    count ++;
    N = N*10 + 7;       
    }
  }
  if(count == 10⁷){
    cout << "-1" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: unable to find numeric literal operator 'operator""\U00002077'
   11 |   for(int i = 0; i < 10⁷; i++){
      |                      ^~~
a.cc:20:15: error: unable to find numeric literal operator 'operator""\U00002077'
   20 |   if(count == 10⁷){
      |               ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  long long int k;
  cin>>k;
  if(k%2==0) cout<<"-1"<<endl;
  else{
     string s='7';
    int c=0;
    while(1){
        long long int c=stoi(s);
        if(c%k==0) {
          c=c+1;
          cout<<c<<endl;
          break;}
        c=c+1;
        s=(s+'7');
    }
  
  }
  
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |      string s='7';
      |               ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define all(v)	((v).begin()), ((v).end())
#define pb	push_back
#define mp	make_pair
#define mod 1000000007
#define debug(x)  cout<<#x<<" = { "<<x<<" }\n"
typedef long long int;
void xin(){
	#ifndef ONLINE_JUDGE 
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
}
int repUnitValue(int n) 
{ 
 
 
    int rem = 1; 
    int power = 1; 
    int k = 1; 
    while (rem % n != 0) 
    { 
        k++; 
        power = power * 10 % n; 
        rem = (rem + power) % n; 
    } 
      
    return k; 
} 
int gcd(int a,int b)
{
	if(b==0)
		return a;
	return gcd(b,a%b);
}
int main()
{
  	xin();
	ios_base::sync_with_stdio(false); 
    cin.tie(NULL);
    cout.tie(NULL);
    
    int k;
    cin>>k;
    if(k==7)
    {
    	cout<<1<<endl;
    }
    else
    {
	    if(gcd(k,10) == 1)
	    {
	    	cout<<repUnitValue(k)<<endl;
	    }
	    else
	    {
	    	cout<<-1<<endl;
	    }
    }
    

}

Compiler output:
a.cc:8:19: error: declaration does not declare anything [-fpermissive]
    8 | typedef long long int;
      |                   ^~~
Language: C++

#include <iostream>

using namespace std;

int main(){
int K ;
cin >> K;
int a = 0;
int b = -1
int c ;
for(int i = 0; i < 10000000; i++)
{
a = a + 7 * 10^(i);
c = a % K;
if(c == 0)
{
b = i+1;
break;
} 
}
cout << b << endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:1: error: expected ',' or ';' before 'int'
   10 | int c ;
      | ^~~
a.cc:14:1: error: 'c' was not declared in this scope
   14 | c = a % K;
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string k;
  cin >> k;
  int num = (k.length());
  string a = k[num-1];
  if (a == "2" || a == "4" || a == "5" || a == "6" || a == "8"){
    cout << -1 << endl;
    return 0;
  }
  string s = "7";
  int cnt = 1;
  int ans = atoi(k.c_str());
  while (true) {
    int s_num = atoi(s.c_str());
    if (s_num % ans == 0){
      cout << cnt;
      return 0;
    }
    cnt++;
    s += "7";
  }  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string a = k[num-1];
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int x, y, i;
  cin >> x;
  i = 1;
  y = 7;
 
  while (y % x != 0) {
    y = y + 7 * pow(10, i)
    i = i++
  }
  
  cout << i << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: expected ';' before 'i'
   11 |     y = y + 7 * pow(10, i)
      |                           ^
      |                           ;
   12 |     i = i++
      |     ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int x,y,i;
  cin >> x;
  i = 1
  y = 7
 
  while (y % x != 0) {
    y = y + 7 * pow(10, i)
    i = i++
  }
  
  cout << i << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected ';' before 'y'
    7 |   i = 1
      |        ^
      |        ;
    8 |   y = 7
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string k;
  cin >> k;
  int num = (int)(k.length());
  string a = k[num-1];
  if (a == "2" || a == "4" || a == "5" || a == "6" || a == "8"){
    cout << -1 << endl;
    return 0;
  }
  string s = "7";
  int cnt = 1;
  int ans = atoi(k.c_str());
  while (true) {
    int s_num = atoi(s.c_str());
    if (s_num % ans == 0){
      cout << cnt;
      return 0;
    }
    cnt++;
    s += "7";
  }  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string a = k[num-1];
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int x;
  cin >> x;
  i = 1
  y = 7
 
  while (y % x != 0) {
    y = y + 7 * pow(10, i)
    i = i++
  }
  
  cout << i << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'i' was not declared in this scope
    7 |   i = 1
      |   ^
Language: C

#include<bits/stdc++.h>
using namespace std;
int t;
long long l;
long long ksm(long long a,long long b,long long c)
{
    long long res=1;
    while(b)
    {
        if(b&1)
            res=(res*a)%c;
        a=(a*a)%c;
        b>>=1;
    }
    return res;
}
long long phi(long long x)
{
    long long res=x;
    for(int i=2;i*i<=x;i++)
    {
        if(x%i==0)
        {
            res=res/i*(i-1);
            while(x%i==0)
                x/=i;
        }
    }
    if(x>1)
        res=res/x*(x-1);
    return res;
}
int main()
{
    int kase=0;
    cin>>l;
    long long mod=l/__gcd(7ll,l)*9ll;
    long long p=phi(mod);
    long long res=1e18;
    for(long long x=1;x*x<=p;x++)
    {
        if(p%x!=0) continue;
        if(ksm(10,x,mod)==1) res=min(res,x);
        if(ksm(10,p/x,mod)==1) res=min(res,p/x);
    }
    if(res==1e18)cout<<"-1"<<endl;
        else cout<<res<<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  n,t=0;
	cin>>n;
	if(7%n==0)
	t++;
	if(77%n==0)
	t++;
	if(777%n==0)
	t++;
	if(7777%n==0)
	t++;
	if(77777%n==0)
	t++;
	if(777777%n==0)
	t++;
	if(7777777%n==0)
	t++;
	if(77777777%n==0)
	t++;
	if(777777777%n==0)
	t++;
	if(7777777777%n==0)
	t++;
	if(77777777777%n==0)
	t++;
	if(777777777777%n==0)
	t++;
	if(7777777777777%n==0)
	t++;
	if(77777777777777%n==0)
	t++;
	if(777777777777777%n==0)
	t++;
	if(7777777777777777%n==0)
	t++;
	if(77777777777777777%n==0)
	t++;
	if(777777777777777777%n==0)
	t++;
	if(7777777777777777777%n==0)
	t++;
	if(t>0)
	cout<<t;
	else
	cout<<"-1";
}

Compiler output:
a.cc: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>
#define int long long
using namespace std;
signed main() {
	int n;
	cin>>n;
	int i;
	for(i=1;i<=n;i++){
		left=(7+left*10)%n;
		if(left==0){
			break;
		}
	}
	if(!left){
		cout<<i;
	}
	else{
		cout<<-1;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: invalid operands of types 'std::ios_base&(std::ios_base&)' and 'int' to binary 'operator*'
    9 |                 left=(7+left*10)%n;
      |                         ~~~~^~~
      |                         |    |
      |                         |    int
      |                         std::ios_base&(std::ios_base&)
Language: Java

import java.io.BufferedReader; 
import java.io.*;
import java.io.InputStreamReader; 
import java.util.Scanner; 
import java.util.StringTokenizer; 
import java.util.*;
import java.math.*;
public class Main 
{ 
    static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader()
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next()
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine();
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    } 
   public static void main(String args[])
    {
        FastReader sc=new FastReader();
        PrintWriter pw=new PrintWriter(System.out);
        int t=1;//sc.nextInt();
        long ans=0,mod=7,k=sc.nextLong(),te=0;
        while(mod<=77777777777777777777l)
        {
         ans++;
         if(mod%k==0){pw.println(ans);te=1;break;}
         mod=10*mod+7;
        }
        if(te==0) pw.println(-1);
           pw.close();
    }
}
  

Compiler output:
Main.java:72: error: integer number too large
        while(mod<=77777777777777777777l)
                   ^
1 error
Language: C++

# include <iostream>
using namespace std;

int main()
{
  int K;
  cin>>K;
  int a=1, b=7;
 while(b%K!=0){
   a++;
   b=b*10+7;
   }
  cout <<a;
  if (b%K!=0){
    cout << "-1";
  
  
 return 0;
  }

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

#include<iostream>
#define ll long long
#define MAX_N 200005

using namespace std;

int main() {
    ll k, ans = 0;
    cin >> k;
    if (k % 2 == 0) {
        cout << -1 << endl;
        return 0;
    }

    for (int i = 1; i <= MAX_N; i++) {
        ll an = (ll)7 * (1 + (double)((pow(10,i)-10)/9));
        if (an % k == 0) {
            ans = i; break;
        }
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:40: error: 'pow' was not declared in this scope
   16 |         ll an = (ll)7 * (1 + (double)((pow(10,i)-10)/9));
      |                                        ^~~
Language: Java

import java.util.*;
 
class Main{
  public static void main(String[] args){
  	Scanner sc = new Scanner(System.in);
 	 long K = sc.nextInt();
 	 int R = -1;
	 long Ar = 7;
     long i=1;
    if(K%2!=0){
	 while(i<=K){
   	 	if(Ar%K == 0){
    	  R = i;
          i = K+1;
        }else{
    	  Ar+= 7*Math.pow(10,i);
          i++;
    	}
	  }
    }
  	  System.out.println(R);
  }
}

Compiler output:
Main.java:13: error: incompatible types: possible lossy conversion from long to int
    	  R = i;
    	      ^
1 error
Language: C++

import sys
n=int(input())
if n%2==0:
    print("-1")
    sys.exit()
s=['7']
while(True):
    if (int("".join(s),10)%n==0):
        print(len(s))
        break
    else:
        s.append('7')

    





Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: Java

import java.util.*;
import java.util.function.*;
import java.math.*;
public class Main {
    public static void main(String[] args){
		int K = Integer.valueOf(s.next());
		if(K%2==0) {
			System.out.println(-1);
			return;
		}
		
		int cur = 7;
		int cnt = 1;
		for(int i = 0; i < 100000000; i++) {
			if(cur % K == 0) {
				System.out.println(cnt);
				return;
			}else {
				cur = (cur * 10 + 7) % K;
				cnt++;
			}
		}
		System.out.println(-1);
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
		int K = Integer.valueOf(s.next());
		                        ^
  symbol:   variable s
  location: class Main
1 error
Language: C++

#include<iostream>
#include<string>
#include<algorithm>

using namespace std;

int main()
{
  int k;
  cin>>k;
  bool ans=true;
  int anser=-1;
  if(k%7!=0)
  {
    ans=false;
    cout<<answer<<endl;
  }
  else
  {
    long long a=1;
    k=k/7;
    int count=0;
    while(true)
    {
      count++;
      if(a%k==0)
      {
        cout<<count<<endl;
        break;
      }
      a+=10*count;
    }  
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: 'answer' was not declared in this scope; did you mean 'anser'?
   16 |     cout<<answer<<endl;
      |           ^~~~~~
      |           anser