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

 main(){
  int s,i,g;
  scanf("%d",&s);
   g=7%s;
   for(i=0;i<s;i++){
    if(g%s==0)printf("%d",i+1);return 0;
     g=10*g+7;}
   printf("-1")return 0;
 }


Compiler output:
main.c:1:2: error: return type defaults to 'int' [-Wimplicit-int]
    1 |  main(){
      |  ^~~~
main.c: In function 'main':
main.c:3:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |   scanf("%d",&s);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 |  main(){
main.c:3:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |   scanf("%d",&s);
      |   ^~~~~
main.c:3:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:15: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 |     if(g%s==0)printf("%d",i+1);return 0;
      |               ^~~~~~
main.c:6:15: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:15: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:15: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:4: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    8 |    printf("-1")return 0;
      |    ^~~~~~
main.c:8:4: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:16: error: expected ';' before 'return'
    8 |    printf("-1")return 0;
      |                ^~~~~~
      |                ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define pb push_back
int main(){
   ll k,n=1,ans=0;
   cin>>k;
   if(k%7==0) k/=7;
   if(__gcd(10,k)!=1){
      cout<<-1;
      return 0;
   }
   while(n!=0){
      n=(n*10+1)%k;
      ans++;
   }
   cout<<ans;
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: no matching function for call to '__gcd(int, long long int&)'
   10 |    if(__gcd(10,k)!=1){
      |       ~~~~~^~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: candidate: 'template<class _EuclideanRingElement> _EuclideanRingElement std::__gcd(_EuclideanRingElement, _EuclideanRingElement)'
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:1137:5: note:   template argument deduction/substitution failed:
a.cc:10:12: note:   deduced conflicting types for parameter '_EuclideanRingElement' ('int' and 'long long int')
   10 |    if(__gcd(10,k)!=1){
      |       ~~~~~^~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int K;
  cin >> K;
  for (int i=0; i<N; i++){
    for (int j=0; j<i; j++){
      int c=0;
      c+=7*pow(10,j);
    }
  }
  
  
        
      
       

Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: 'N' was not declared in this scope
    6 |   for (int i=0; i<N; i++){
      |                   ^
a.cc:9:12: error: 'pow' was not declared in this scope
    9 |       c+=7*pow(10,j);
      |            ^~~
a.cc:11:4: error: expected '}' at end of input
   11 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#include<iostream>
#include <math.h>//pow(x,y)=x^y 99999とかの場合+1するif文
#include <algorithm>//sort(a.begin(), a.end());reverse(a.begin(), a.end());
#define rep(init,i,n) for (int i=init; i <(n);i++)
#define ll long long
#define rev(s) reverse(s.begin(),s.end())
#define sor(v) sort(v.begin(),v.end())

using namespace std;


int main() {
ll K,L;
cin>>K;

if(K%7==0){
    L = 9*K/7;
}else{
    L = 9*K;
}

rep(0,i,7){
    ll M = pow(10,(i+1));
    if(M&10!==0){M=M+1;}
    cout<<M<<endl;
    if(M%L==1){
        cout<<i+1<<endl;return 0;
    }
}
cout<<-1<<endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:14: error: expected primary-expression before '=' token
   25 |     if(M&10!==0){M=M+1;}
      |              ^
Language: C++

#include <bits/stdc++.h>
#include<iostream>
#include <math.h>//pow(x,y)=x^y
#include <algorithm>//sort(a.begin(), a.end());reverse(a.begin(), a.end());
#define rep(init,i,n) for (int i=init; i <(n);i++)
#define ll long long
#define rev(s) reverse(s.begin(),s.end())
#define sor(v) sort(v.begin(),v.end())

using namespace std;


int main() {
ll K,L;
cin>>K;

if(K%7==0){
    L = 9*K/7;
}else{
    L = 9*K;
}

rep(0,i,7){
    ll M = pow(10,(i+1));
    if(M%L==0){
        cout<<i+1<<endl;return;
    }
}
cout<<-1<<endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
   26 |         cout<<i+1<<endl;return;
      |                         ^~~~~~
Language: C++

#include <bits/stdc++.h>
#include<iostream>
#include <math.h>//pow(x,y)=x^y
#include <algorithm>//sort(a.begin(), a.end());reverse(a.begin(), a.end());
#define rep(init,i,n) for (int i=init; i <(n);i++)
#define ll long long
#define rev(s) reverse(s.begin(),s.end())
#define sor(v) sort(v.begin(),v.end())

using namespace std;


int main() {
ll K,L;
cin>>K;

if(K%7==0){
    L = 9*K/7;
}else{
    L = 9*K;
}

rep(0,i,7){
    ll M = pow(10,(i+1)
    if(M%L==0){
        cout<<i+1<<endl;return;
    }
}
cout<<-1<<endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:24: error: expected ')' before 'if'
   24 |     ll M = pow(10,(i+1)
      |               ~        ^
      |                        )
   25 |     if(M%L==0){
      |     ~~
Language: C++

#include <bits/stdc++.h>
#include<iostream>
#include <math.h>//pow(x,y)=x^y
#include <algorithm>//sort(a.begin(), a.end());reverse(a.begin(), a.end());
#define rep(init,i,n) for (int i=init; i <(n);i++)
#define ll long long
#define rev(s) reverse(s.begin(),s.end())
#define sor(v) sort(v.begin(),v.end())

using namespace std;


int main() {
ll K,L;
cin>>K;

if(K%7==0){
    L = 9*K/7;
}else{
    L = 9*K;
}

rep(0,i,7){
    if(pow(10,(i+1))%L==0){
        cout<<i+1<<endl;return;
    }
}
cout<<-1<<endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:21: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'long long int' to binary 'operator%'
   24 |     if(pow(10,(i+1))%L==0){
      |        ~~~~~~~~~~~~~^~
      |           |          |
      |           |          long long int
      |           __gnu_cxx::__promote<double>::__type {aka double}
a.cc:25:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
   25 |         cout<<i+1<<endl;return;
      |                         ^~~~~~
Language: C++

#include <bits/stdc++.h>
#include<iostream>
#include <math.h>//pow(x,y)=x^y
#include <algorithm>//sort(a.begin(), a.end());reverse(a.begin(), a.end());
#define rep(init,i,n) for (int i=init; i <(n);i++)
#define ll long long
#define rev(s) reverse(s.begin(),s.end())
#define sor(v) sort(v.begin(),v.end())

using namespace std;


int main() {
ll K,L;
cin>>K;

if(K%7==0){
    L = 9*K/7;
}else{
    L = 9*K;
}

rep(0,i,7){
    if(10^(i+1)%L==0){
        cout<<i+1<<endl;return;
    }
}
cout<<-1<<endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
   25 |         cout<<i+1<<endl;return;
      |                         ^~~~~~
Language: C++

#include<bits/stdc++.h>
#define rep(i, n) for(int i=0; i<n; i++)
#define repo(i, n) for(int i=1; i<=n; i++)
#define INF 1001001001
#define INFll 100100100100100
// debug用
#define PrintVec(x) for (auto elementPrintVec: x) { cout << elementPrintVec << " "; } cout << endl;

using namespace std;
using ull = unsigned long long;
using ll = long long;
using P = pair<int, int>;
const int mod = 1000000007;

int main(){
  int k;
  cin >> k;
  int a=7%k;
  rep(i, k){
    if(a==0){
      cout << i+1 << endl;
      return 0;
    }
    a=(10a+7)%k;
  }
  cout << "-1" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:8: error: unable to find numeric literal operator 'operator""a'
   24 |     a=(10a+7)%k;
      |        ^~~
Language: C

#include<stdio.h>

int main(void){
  int k,i;
  scanf("%d",&k);
  int ans=7%k;
  int tmp=ans;
for(i=1;tmp!=0;i++){
  if(tmp==ans){
    printf("-1");
    return 0;
}
  tmp=(tmp*10+7)%k;
}
  printf("%d",i);
  return 0;
}
aa


Compiler output:
main.c:18:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
   18 | aa
      | ^~
Language: C

#include<stdio.h>

int main(void){
  int k,i;
  scanf("%d",&k);
  int ans=7%k;
  int tmp=ans;
for(i=1;tmp!=0;i++){
  if(tmp==ans){
    printf("-1");
    return 0;
}
  tmp=(tmp*10+7)%k;
}
  for(;i!=0;i--){
     printf("7");
  }
  return 0;
}
aa

Compiler output:
main.c:20:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
   20 | aa
      | ^~
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 seven = 7;
    int ans = -1;
    
    for(int i = 1; i <= K; ++i) {
      seven %= K;
      if(seven == 0) {
        ans = i;
        break;
      }
      seven = seven * 10 + 7;
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:1: error: <identifier> expected
import.java.util.*;
      ^
1 error
Language: C++

using namespace std;
void main()
{
  int k;
  cin>>k;
  int total=0;
  int flag=0;
  for(int i=0;i<1e7;i++)
  {
    total=(total*10+7)%k;
    if(total==0)
    {
      print("%d",i+1);
      flag=1;
      break;
    }
  
  }
  if(flag==0){print("%d",-1);}
}

Compiler output:
a.cc:2:1: error: '::main' must return 'int'
    2 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>k;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:13:7: error: 'print' was not declared in this scope; did you mean 'int'?
   13 |       print("%d",i+1);
      |       ^~~~~
      |       int
a.cc:19:15: error: 'print' was not declared in this scope; did you mean 'int'?
   19 |   if(flag==0){print("%d",-1);}
      |               ^~~~~
      |               int
Language: C++

using namespace std;
void main()
{
  int k;
  cin>>k;
  int total=0;
  int flag=0;
  for(int i=0;i<1e7;i++)
  {
    total=(total*10+7)%k;
    if(total==0)
    {
      print("%d",i+1);
      flag=1;
      break;
    }
  
  }
  if(flag==0){print("%d",-1)}
}

Compiler output:
a.cc:2:1: error: '::main' must return 'int'
    2 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>k;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:13:7: error: 'print' was not declared in this scope; did you mean 'int'?
   13 |       print("%d",i+1);
      |       ^~~~~
      |       int
a.cc:19:15: error: 'print' was not declared in this scope; did you mean 'int'?
   19 |   if(flag==0){print("%d",-1)}
      |               ^~~~~
      |               int
Language: Java

import java.util.Scanner;
 
public class Main {
 
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		
		Scanner sc = new Scanner (System.in);
		
		long k = sc.nextInt();
		long seven = 7%k;
		
		for(int i=1;i<=k;i++) {
			if(seven==0) {
				System.out.println(i);
				return;
			}
			//sevenの桁数が大きくなりすぎるので、割ったあまりを入れておく
			seven=(seven*10+7)%k;
		}
 
		System.out.println(-1);
 
 
	}
 

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

#include <stdio.h>

int main(void){
	long int k = 0;
  	long int sevens = 7;
  	long int count = 1;
  	
  	scanf("%ld",&k);
    if(k % 2 == 0 || k % 5 == 0){
    	printf("%d\n",-1);
      	return 0;
    }
    
  	while(1){
      	if(sevens % k == 0)break;
      	count++;
    	sevens = seven*10+7;
    }
    printf("%ld\n",count);
  	
  	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:18: error: 'seven' undeclared (first use in this function); did you mean 'sevens'?
   17 |         sevens = seven*10+7;
      |                  ^~~~~
      |                  sevens
main.c:17:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void){
	long int k = 0;
  	long int sevens = 7;
  	long int count = 1;
  	
  	scanf("%d",&k);
    if(k % 2 == 0 || k % 5 == 0){
    	printf("%d\n",-1);
      	return 0;
    }
    
  	while(1){
      	if(sevens % k == 0)break;
      	count++;
    	sevens = seven*10+7;
    }
    printf("%d\n",count);
  	
  	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:18: error: 'seven' undeclared (first use in this function); did you mean 'sevens'?
   17 |         sevens = seven*10+7;
      |                  ^~~~~
      |                  sevens
main.c:17:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
#define repr(i, n) for(int i = n; i >= 0; i--)
#define reps(i,a,b) for(int i= a; i < b; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main()
{
  ll k;
  cin >> k;
  vector<ll> vec(k+1, 0);
  vec[1] = 7 % k;
  if (vec.at[1] == 0) {
    cout << 1 << endl;
  }
  for (ll i = 2; i <= k; i++) {
    vec[i] = (vec[i-1] * 10 + 7) % k;
    if (vec[i] == 0) {
      cout << i << endl;
      return 0;
    }
  }
  
  cout << - 1 << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   15 |   if (vec.at[1] == 0) {
      |             ^
Language: C++

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

int main()
{
	ll k;cin>>k;
	num=7;
	int index=1;
	if(k%2==0)
	{
		cout<<-1<<"\n";
	}
	else if(k==7)
	{
		cout<<1<<"\n";
	}
	else{
	
	while(num%k!=0)
	{
		num=num*10+7;
		index++;
	}
	cout<<index-1<<"\n";
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'num' was not declared in this scope; did you mean 'enum'?
    8 |         num=7;
      |         ^~~
      |         enum
Language: C

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

int main(void){
  int i,k,which=0;
  int term=7; //第1項目の値
  int number_terms=1; //第1項目
 

  
  scanf("%d",&k);  
    
  while(number_terms<=k){
    if((term%k)==0){
      printf("%d",number_terms);
      which=1;
      break;
    }
    term+=7*pow(10,number_terms);
    number_terms++;
    printf()
    
  }


  
  if(which==0){
    printf("-1");
  }
  
  return 0;
  
}

Compiler output:
main.c: In function 'main':
main.c:21:5: error: too few arguments to function 'printf'
   21 |     printf()
      |     ^~~~~~
In file included from main.c:1:
/usr/include/stdio.h:363:12: note: declared here
  363 | extern int printf (const char *__restrict __format, ...);
      |            ^~~~~~
main.c:21:13: error: expected ';' before '}' token
   21 |     printf()
      |             ^
      |             ;
   22 | 
   23 |   }
      |   ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long a[1000001];

int main(){
  long long n;
  cin >> n;
  a[0] = 7 % n;
  for(int i = 1; i < k; i++) a[i] = (10 * a[i-1] + 7) % n;
  
  for(int i = 0; i < k; i++){
    if(a[i] == 0){
      cout << i << endl;
      return 0;
    }
  }
  cout << -1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: 'k' was not declared in this scope
    9 |   for(int i = 1; i < k; i++) a[i] = (10 * a[i-1] + 7) % n;
      |                      ^
a.cc:11:22: error: 'k' was not declared in this scope
   11 |   for(int i = 0; i < k; i++){
      |                      ^
Language: C

#include <stdio.h>
int a[1000000];
int main(){
    int k;
    scanf("%d",&k);
    a[0]=7%k;
    for(int i=1;ik;i++)a[i]=(a[i-1]*10+7)%k;

    for(int i=0;i<k;i++)if(a[i]==0){
        printf("%d\n",i+1);
        return 0;
    }
    printf("-1\n");
}


Compiler output:
main.c: In function 'main':
main.c:7:17: error: 'ik' undeclared (first use in this function); did you mean 'i'?
    7 |     for(int i=1;ik;i++)a[i]=(a[i-1]*10+7)%k;
      |                 ^~
      |                 i
main.c:7:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int a[1000000];
int main(){
    int k;
    scanf("%d",&k);
    a[0]=7%k;
    for(int i=1;i<k;i++)a[i]=(a[i-1]*10+7)%K;

    for(int i=0;i<k;i++)if(a[i]==0){
        printf("%d\n",i+1);
        return 0;
    }
    printf("-1\n");
}


Compiler output:
main.c: In function 'main':
main.c:7:44: error: 'K' undeclared (first use in this function)
    7 |     for(int i=1;i<k;i++)a[i]=(a[i-1]*10+7)%K;
      |                                            ^
main.c:7:44: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int a[1000000];
int main(){
    int k;
    scanf("%d",&k);
    a[0]=7%k;
    for(int i=1;ik;i++)a[i]=(a[i-1]*10+7)%K;

    for(int i=0;i<k;i++)if(a[i]==0){
        printf("%d\n",i+1);
        return 0;
    }
    printf("-1\n");
}


Compiler output:
main.c: In function 'main':
main.c:7:17: error: 'ik' undeclared (first use in this function); did you mean 'i'?
    7 |     for(int i=1;ik;i++)a[i]=(a[i-1]*10+7)%K;
      |                 ^~
      |                 i
main.c:7:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:43: error: 'K' undeclared (first use in this function)
    7 |     for(int i=1;ik;i++)a[i]=(a[i-1]*10+7)%K;
      |                                           ^
Language: C++

void solve1()
{
    int n;cin>>n;
    int c=0,ans=0;
    for(int i=0;i<10000000;i++)
    {
        c+=7;
        c%=n;c*=10;
        ans++;
        if(c==0)
        {
            break;
        }
    }
    if(c==0)cout<<ans<<endl;
    else cout<<-1<<endl;
}

Compiler output:
a.cc: In function 'void solve1()':
a.cc:3:11: error: 'cin' was not declared in this scope
    3 |     int n;cin>>n;
      |           ^~~
a.cc:15:13: error: 'cout' was not declared in this scope
   15 |     if(c==0)cout<<ans<<endl;
      |             ^~~~
a.cc:15:24: error: 'endl' was not declared in this scope
   15 |     if(c==0)cout<<ans<<endl;
      |                        ^~~~
a.cc:16:10: error: 'cout' was not declared in this scope
   16 |     else cout<<-1<<endl;
      |          ^~~~
a.cc:16:20: error: 'endl' was not declared in this scope
   16 |     else cout<<-1<<endl;
      |                    ^~~~
Language: C

#include<iostream>
using namespace std;

int main(){
    int K;
    cin >> K;
    int ans = 1;

    int seven = 7;
    int modK = 7;

    while(seven%K != 0){
        modK = modK*10 % K;
        if(modK == 0){
            cout << -1 << endl;
            return 0;
        }
        seven = (seven % K) +modK;
        ans++;
    }

    cout << ans << endl;
}

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

   //____________________________________________________________________\\
  //________________________________NAMAN_________________________________\\
 //________________________________TALAYCHA________________________________\\
//__________________________________________________________________________\\

#include <bits/stdc++.h>
#define rep(i, a, b )   for (ll i = a; i < b; i++)

using namespace std;

void solve()
{
 int m=0,k=0,d=0,c=0;
 
  cin>>k;
  
  rep(i,0,10000000)
  {
    c+=7;
    c%=k;
    c*=10;
    d++;
    if(c==0)
      break;
  }
  if(c==0) cout<<d;
  else 
    cout<<-1;
}



int main() {

 

   int TESTS = 1;
  // cin>>TESTS;
  while (TESTS--) {
    solve();

  }

  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:7:30: error: 'll' was not declared in this scope
    7 | #define rep(i, a, b )   for (ll i = a; i < b; i++)
      |                              ^~
a.cc:17:3: note: in expansion of macro 'rep'
   17 |   rep(i,0,10000000)
      |   ^~~
a.cc:17:7: error: 'i' was not declared in this scope
   17 |   rep(i,0,10000000)
      |       ^
a.cc:7:40: note: in definition of macro 'rep'
    7 | #define rep(i, a, b )   for (ll i = a; i < b; i++)
      |                                        ^
Language: C++

   //____________________________________________________________________\\
  //________________________________NAMAN_________________________________\\
 //________________________________TALAYCHA________________________________\\
//__________________________________________________________________________\\

#include <bits/stdc++.h>
#define rep(i, a, b )   for (ll i = a; i < b; i++)

using namespace std;

void solve()
{
 int m=0,k=0,d=0,c=0;
 long long n;
  cin>>k;
  
  rep(1,0,10000000)
  {
    c+=7;
    c%=k;
    c*=10;
    d++;
    if(c==0)
      break;
  }
  if(c==0) cout<<d;
  else 
    cout<<-1;
}

   //___________________________________________________________________________
//---------------------------END----------------------------------------------




int main() {

 

   int TESTS = 1;
  // cin>>TESTS;
  while (TESTS--) {
    solve();

  }

  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:7:30: error: 'll' was not declared in this scope
    7 | #define rep(i, a, b )   for (ll i = a; i < b; i++)
      |                              ^~
a.cc:17:3: note: in expansion of macro 'rep'
   17 |   rep(1,0,10000000)
      |   ^~~
a.cc:17:7: error: lvalue required as increment operand
   17 |   rep(1,0,10000000)
      |       ^
a.cc:7:47: note: in definition of macro 'rep'
    7 | #define rep(i, a, b )   for (ll i = a; i < b; i++)
      |                                               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
void solve()
{#include<bits/stdc++.h>
using namespace std;
 
void solve()
{
  int m=0,k=0,d=1;
  long long n;
  cin>>k;
  if(k%2==0 || k%5==0)
  {
    cout<<-1;
    return ;
  }
  n=7;
  while(k>=n)
  {
    n=n*10+7;
    d++;
    
  }
  int t=15;
  while(t--)
  {
    if(n%k==0) {
    cout<<d;
    return;}
    
    n=n*10+7;
    d++;
    
  }
   cout<<-1;
    return ; 
}
 
int main(){
int t=1;
  //cin>>t;
  while(t--)
  {
    solve();
  }
return 0;
}


 
int main(){
int t=1;
  //cin>>t;
  while(t--)
  {
    solve();
  }
return 0;
}


Compiler output:
a.cc:5:2: error: stray '#' in program
    5 | {#include<bits/stdc++.h>
      |  ^
a.cc: In function 'void solve()':
a.cc:5:3: error: 'include' was not declared in this scope
    5 | {#include<bits/stdc++.h>
      |   ^~~~~~~
a.cc:5:11: error: 'bits' was not declared in this scope
    5 | {#include<bits/stdc++.h>
      |           ^~~~
a.cc:5:16: error: 'stdc' was not declared in this scope; did you mean 'std'?
    5 | {#include<bits/stdc++.h>
      |                ^~~~
      |                std
a.cc:6:1: error: expected primary-expression before 'using'
    6 | using namespace std;
      | ^~~~~
a.cc:9:1: error: a function-definition is not allowed here before '{' token
    9 | {
      | ^
a.cc:40:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   40 | int main(){
      |         ^~
a.cc:40:9: note: remove parentheses to default-initialize a variable
   40 | int main(){
      |         ^~
      |         --
a.cc:40:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:40:11: error: a function-definition is not allowed here before '{' token
   40 | int main(){
      |           ^
a.cc:52:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   52 | int main(){
      |         ^~
a.cc:52:9: note: remove parentheses to default-initialize a variable
   52 | int main(){
      |         ^~
      |         --
a.cc:52:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:52:11: error: a function-definition is not allowed here before '{' token
   52 | int main(){
      |           ^
a.cc:60:2: error: expected '}' at end of input
   60 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {#include<bits/stdc++.h>
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
void solve()
{#include<bits/stdc++.h>
using namespace std;
 
void solve()
{
  int m=0,k=0,d=1;
  long long n;
  cin>>k;
  if(k%2==0 || k%5==0)
  {
    cout<<-1;
    return ;
  }
  n=7;
  while(k>=n)
  {
    n=n*10+7;
    d++;
    
  }
  int t=15;
  while(t--)
  {
    if(n%k==0) {
    cout<<d;
    return;}
    
    n=n*10+7;
    d++;
    
  }
   cout<<-1;
    return ; 
}
 
int main(){
int t=1;
  //cin>>t;
  while(t--)
  {
    solve();
  }
return 0;
}

}
 
int main(){
int t;
  //cin>>t;
  while(t--)
  {
    solve();
  }
return 0;
}


Compiler output:
a.cc:5:2: error: stray '#' in program
    5 | {#include<bits/stdc++.h>
      |  ^
a.cc: In function 'void solve()':
a.cc:5:3: error: 'include' was not declared in this scope
    5 | {#include<bits/stdc++.h>
      |   ^~~~~~~
a.cc:5:11: error: 'bits' was not declared in this scope
    5 | {#include<bits/stdc++.h>
      |           ^~~~
a.cc:5:16: error: 'stdc' was not declared in this scope; did you mean 'std'?
    5 | {#include<bits/stdc++.h>
      |                ^~~~
      |                std
a.cc:6:1: error: expected primary-expression before 'using'
    6 | using namespace std;
      | ^~~~~
a.cc:9:1: error: a function-definition is not allowed here before '{' token
    9 | {
      | ^
a.cc:40:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   40 | int main(){
      |         ^~
a.cc:40:9: note: remove parentheses to default-initialize a variable
   40 | int main(){
      |         ^~
      |         --
a.cc:40:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:40:11: error: a function-definition is not allowed here before '{' token
   40 | int main(){
      |           ^
Language: C++

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

void solve()
{
  int n,m=0,k=0,d=1;
  cin<<k;
  if(k%2==0 || k%5==0)
  {
    cout<<-1;
    return ;
  }
  n=7;
  while(k>=n)
  {
    n=n*10+7;
    d++;
    
  }
  int t=7;
  while(t--)
  {
    if(n%k==0) {
    cout<<d;
    return;}
    
    n=n*10+7;
    d++;
    
  }
   cout<<-1;
    return ; 
}

int main(){
int t;
  //cin>>t;
  while(t--)
  {
    solve();
  }
return 0;
}

Compiler output:
a.cc:2:20: error: expected ';' before ':' token
    2 | using namespace std:
      |                    ^
      |                    ;
a.cc:2:20: error: expected unqualified-id before ':' token
a.cc: In function 'int main()':
a.cc:40:5: error: 'solve' was not declared in this scope
   40 |     solve();
      |     ^~~~~
Language: C++

#include <iostream>
#include <cmath>

int main(void) {
    int k;

    std::cin >> k;

    int mult = 7;
    for(int i = i; i < INT32_MAX; i++) {
        if(mult % ko == 0){
            std::cout << i;
            break;
        }
        mult *= 10;
        mult += 7;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: 'INT32_MAX' was not declared in this scope
   10 |     for(int i = i; i < INT32_MAX; i++) {
      |                        ^~~~~~~~~
a.cc:3:1: note: 'INT32_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    2 | #include <cmath>
  +++ |+#include <cstdint>
    3 | 
a.cc:11:19: error: 'ko' was not declared in this scope; did you mean 'k'?
   11 |         if(mult % ko == 0){
      |                   ^~
      |                   k
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: invalid operands of types 'float' and 'int' to binary 'operator%'
   17 |         if (c%1==0)
      |             ~^~
      |             | |
      |             | int
      |             float
Language: C++

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

int x[100001];

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: expected primary-expression before ';' token
    7 |   int k = ;
      |           ^
Language: C

#include <stdio.h>
int main(void)
{
    int K=0;
    int a=7;
    int extra=0;

    scanf("%d",&K);

    extra=a%K;
    if (extra==0){
        printf("1");
        return 0;
    }
    for(int i=1;i<K;i++){
        extra=(a*10+7)%K;
        if(extra==0){
            printf("%d",i+1);
            return 0;
    }
    printf("-1");
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
 
    ll n;
    cin>>n;
    if(__gcd(n,(ll)10)>1)  // is a multiple of 2 or 5 or both 
    {
        cout<<-1<<endl;
        return 0;
    }
    ll num=7%n,ans=1;
    while(num!=0)
    {
        ans++;
        num*=10;
        num=num+7;
        num%=n;
    }
    cout<<ans<<endl;
 
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'll' was not declared in this scope
    8 |     ll n;
      |     ^~
a.cc:9:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 |     cin>>n;
      |          ^
      |          yn
a.cc:10:20: error: expected ')' before numeric constant
   10 |     if(__gcd(n,(ll)10)>1)  // is a multiple of 2 or 5 or both
      |             ~      ^~
      |                    )
a.cc:15:7: error: expected ';' before 'num'
   15 |     ll num=7%n,ans=1;
      |       ^~~~
      |       ;
a.cc:16:11: error: 'num' was not declared in this scope; did you mean 'enum'?
   16 |     while(num!=0)
      |           ^~~
      |           enum
a.cc:18:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |         ans++;
      |         ^~~
      |         abs
a.cc:23:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |     cout<<ans<<endl;
      |           ^~~
      |           abs
a.cc:25:14: error: expected '}' at end of input
   25 |     return 0;
      |              ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
 
    ll n;
    cin>>n;
    if(__gcd(n,(ll)10)>1)  // is a multiple of 2 or 5 or both 
    {
        cout<<-1<<endl;
        return 0;
    }
    ll num=7%n,ans=1;
    while(num!=0)
    {
        ans++;
        num*=10;
        num=num+7;
        num%=n;
    }
    cout<<ans<<endl;
 
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'ios' has not been declared
    3 |     ios::sync_with_stdio(false);
      |     ^~~
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin.tie(nullptr);
      |     ^~~
a.cc:6:5: error: 'll' was not declared in this scope
    6 |     ll n;
      |     ^~
a.cc:7:10: error: 'n' was not declared in this scope
    7 |     cin>>n;
      |          ^
a.cc:8:20: error: expected ')' before numeric constant
    8 |     if(__gcd(n,(ll)10)>1)  // is a multiple of 2 or 5 or both
      |             ~      ^~
      |                    )
a.cc:8:8: error: '__gcd' was not declared in this scope
    8 |     if(__gcd(n,(ll)10)>1)  // is a multiple of 2 or 5 or both
      |        ^~~~~
a.cc:10:9: error: 'cout' was not declared in this scope
   10 |         cout<<-1<<endl;
      |         ^~~~
a.cc:10:19: error: 'endl' was not declared in this scope
   10 |         cout<<-1<<endl;
      |                   ^~~~
a.cc:13:7: error: expected ';' before 'num'
   13 |     ll num=7%n,ans=1;
      |       ^~~~
      |       ;
a.cc:14:11: error: 'num' was not declared in this scope; did you mean 'enum'?
   14 |     while(num!=0)
      |           ^~~
      |           enum
a.cc:16:9: error: 'ans' was not declared in this scope
   16 |         ans++;
      |         ^~~
a.cc:21:5: error: 'cout' was not declared in this scope
   21 |     cout<<ans<<endl;
      |     ^~~~
a.cc:21:11: error: 'ans' was not declared in this scope
   21 |     cout<<ans<<endl;
      |           ^~~
a.cc:21:16: error: 'endl' was not declared in this scope
   21 |     cout<<ans<<endl;
      |                ^~~~
a.cc:23:14: error: expected '}' at end of input
   23 |     return 0;
      |              ^
a.cc:2:1: note: to match this '{'
    2 | {
      | ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  long long i=1,k,c=0;
  cin>>k;
  if(k%2==0){
    cout<<"-1"
      return 0;
  }
    
  while(i<=1e7){
    c=(c*10)+7;
    if(c%k==0){
      cout<<i;
      return 0;
    }
    i++;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected ';' before 'return'
    7 |     cout<<"-1"
      |               ^
      |               ;
    8 |       return 0;
      |       ~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  long long int n,k;
  long long int a=[n];
  cin>>n>>k;
  int count=0;
  a[1]=7;
  for(long long int i=2;i<=n;i++)
     a[i]=(a[i-1]*10+7);
  for(long long int i=1;i<=n;i++)
  {
    if(a[i]%k==0)
    {
      count++;
      cout<<a[i];
      break;
    }
  }
  if(count==0)
    cout<<"-1";
  return 0;
}
  

Compiler output:
a.cc: In lambda function:
a.cc:6:22: error: expected '{' before ';' token
    6 |   long long int a=[n];
      |                      ^
a.cc: In function 'int main()':
a.cc:6:19: error: cannot convert 'main()::<lambda()>' to 'long long int' in initialization
    6 |   long long int a=[n];
      |                   ^~~
      |                   |
      |                   main()::<lambda()>
a.cc:9:4: error: invalid types 'long long int[int]' for array subscript
    9 |   a[1]=7;
      |    ^
a.cc:11:7: error: invalid types 'long long int[long long int]' for array subscript
   11 |      a[i]=(a[i-1]*10+7);
      |       ^
a.cc:11:13: error: invalid types 'long long int[long long int]' for array subscript
   11 |      a[i]=(a[i-1]*10+7);
      |             ^
a.cc:14:9: error: invalid types 'long long int[long long int]' for array subscript
   14 |     if(a[i]%k==0)
      |         ^
a.cc:17:14: error: invalid types 'long long int[long long int]' for array subscript
   17 |       cout<<a[i];
      |              ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  long long i=1,k,c=0;
  cin>>k;
  while(i<=1000000){
    c=(c*10)+7;
    if(c%k=0){
      cout<<i;
      return;
    }
    i++;
  }
  cout<<"-1";
}
      


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: lvalue required as left operand of assignment
    8 |     if(c%k=0){
      |        ~^~
a.cc:10:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   10 |       return;
      |       ^~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  long long i=1,k,c=7;
  cin>>k;
  if(c%k==0)
    cout<<"1";
 else if
 {
   while(i<1000000){
     c=(c*10)+7;
     if(c%k==0){
       cout<<i;
       break;
     }
     i++;
   }
 }
  else
    cout<<"-1";
}

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

#include<iostream>
using namespace std;
int main(){
  long long i=1,k,c=7;
  cin>>k;
  if(c%k==0)
    cout<<"1";
 else if
 {
   while(i<=1000000){
     c=(c*10)+7;
     if(c%k==0){
       cout<<i;
       break;
     }
     i++;
   }
 }
  else
    cout<<"-1";
}

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

#include<iostream>
using namespace std;
int main(){
  long long i=1,k,c=7;
  cin>>k;
  if(c%k==0)
    cout<<"1";
 else
 {
   while(c<=1000000){
     c=(c*10)+7;
     if(c%k==0){
       cout<<i;
       break;
     }
     i++;
   }
 }

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

#include<stdio.h>

long long int s;
int k,ans;

int main (void){
  scanf("%d",&k)
  while(s%k!=0){
    s=10*s+7;
    ans++;
  }
  printf("%d",ans);
 
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:17: error: expected ';' before 'while'
    7 |   scanf("%d",&k)
      |                 ^
      |                 ;
    8 |   while(s%k!=0){
      |   ~~~~~
Language: C

include<stdlib.h>
long long int s=0;
int k,ans;

int main (void){
  
  scanf("%d"&k);
  
  while(s%k!=0){
    s=10:s+7;
    ans++;
  }
  prinntf("%d",ans);
  return 0;
}


Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdlib.h>
      |        ^
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 |   scanf("%d"&k);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include<stdlib.h>
main.c:7:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 |   scanf("%d"&k);
      |   ^~~~~
main.c:7:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:13: error: invalid operands to binary & (have 'char *' and 'int')
    7 |   scanf("%d"&k);
      |         ~~~~^
      |         |
      |         char *
main.c:9:9: error: 's' undeclared (first use in this function)
    9 |   while(s%k!=0){
      |         ^
main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:9: error: expected ';' before ':' token
   10 |     s=10:s+7;
      |         ^
      |         ;
main.c:13:3: error: implicit declaration of function 'prinntf' [-Wimplicit-function-declaration]
   13 |   prinntf("%d",ans);
      |   ^~~~~~~
Language: C++

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

const int INF = 1e9+7; 

int main(){
    int n;cin>>n;
    int temp = 7;
    int pos = 1;
    if(n<temp){
    	cout<<-1<<endl;
    	return 0;
    }
    while(true){
    	if(temp%k==0){
    		cout<<pos;
    		return 0;
    	}
    	temp = temp*10 + 7;
    	pos++;
    }    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: 'k' was not declared in this scope
   16 |         if(temp%k==0){
      |                 ^
Language: C

#include <stdio.h>

int main(void){
  int K, count=1, ans=0;
  long int seven=7;
  scanf("%d",&K);
  
  if(K % 2 == 0){
    ans = -1;
    break;
  }else{
      while(count == 0){
        if(seven % K == 0){
          break;
        }else{
          seven = seven * 10 + 7;
          count++;
        }
      }
  }
  printf("%d",ans);
}

Compiler output:
main.c: In function 'main':
main.c:10:5: error: break statement not within loop or switch
   10 |     break;
      |     ^~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    6 |   vector<int64_t>A();
      |                   ^~
a.cc:7:5: error: request for member 'at' in 'A', which is of non-class type 'std::vector<long int>()'
    7 |   A.at(1)=7%K;
      |     ^~
a.cc:9:7: error: request for member 'at' in 'A', which is of non-class type 'std::vector<long int>()'
    9 |     A.at(i)=(A.at(i-1)*10+7)%K;
      |       ^~
a.cc:9:16: error: request for member 'at' in 'A', which is of non-class type 'std::vector<long int>()'
    9 |     A.at(i)=(A.at(i-1)*10+7)%K;
      |                ^~
a.cc:12:10: error: request for member 'at' in 'A', which is of non-class type 'std::vector<long int>()'
   12 |     if(A.at(i)==0){
      |          ^~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    6 |   vector<int64_t>A();
      |                   ^~
a.cc:7:5: error: request for member 'at' in 'A', which is of non-class type 'std::vector<long int>()'
    7 |   A.at(1)=7%K;
      |     ^~
a.cc:9:5: error: 'a' was not declared in this scope
    9 |     a.at(i)=(A.at(i-1)*10+7)%K;
      |     ^
a.cc:9:16: error: request for member 'at' in 'A', which is of non-class type 'std::vector<long int>()'
    9 |     a.at(i)=(A.at(i-1)*10+7)%K;
      |                ^~
a.cc:12:10: error: request for member 'at' in 'A', which is of non-class type 'std::vector<long int>()'
   12 |     if(A.at(i)==0){
      |          ^~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    6 |   vector<int64_t>A();
      |                   ^~
a.cc:7:3: error: 'a' was not declared in this scope
    7 |   a.at(1)=7%K;
      |   ^
a.cc:9:16: error: request for member 'at' in 'A', which is of non-class type 'std::vector<long int>()'
    9 |     a.at(i)=(A.at(i-1)*10+7)%K;
      |                ^~
a.cc:12:10: error: request for member 'at' in 'A', which is of non-class type 'std::vector<long int>()'
   12 |     if(A.at(i)==0){
      |          ^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    6 |   vector<int64_t>A();
      |                   ^~
a.cc:7:3: error: 'a' was not declared in this scope
    7 |   a.at(1)=7%K;
      |   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int K;
  cin>>K;
  int R=0;
  int T=0;
  if((10^T)*7%K!=0){
    T=T+1;
    R=R+1;
  }else if((10^T)*7%K==0){
    R=R+1
    cout<<R<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: expected ';' before 'cout'
   12 |     R=R+1
      |          ^
      |          ;
   13 |     cout<<R<<endl;
      |     ~~~~
Language: C++

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

int main()
{
    int K;
    cin >> K;
    int amari = 7;
    int count = 1;
    for (int i = 0; i < K; i++)
    {
        if (amari % K == 0)
        {
            break;
        }
        amari = (amari * 10 + 7) % K;
        count += 1;
    }
    if (count == K + 1)
    {
        count = -1
    }
    cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:19: error: expected ';' before '}' token
   21 |         count = -1
      |                   ^
      |                   ;
   22 |     }
      |     ~
Language: C++

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

int main()
{
    int K;
    cin >> K;
    int amari = 7;
    int count = 1;
    for (int i = 0; i < K; i++)
    {
        if (amari % K = 0)
        {
            break;
        }
        amari = (amari * 10 + 7) % K;
        count += 1;
    }
    cout << count << endl;
}

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

#include<iostream>

using namespace std;
int main (){
    long long int q,l=1;
    cin>>q;
    //y=1;
  if(q%2==0||q%5==0){
     cout<<-1<<endl;
      return 0;}
  long long int x=7;
    while(x%q!=0){
      
      
         l+=1;
        x=10*x+7;}
    }
  cout<<l<<endl;
    return 0;
}


Compiler output:
a.cc:18:3: error: 'cout' does not name a type
   18 |   cout<<l<<endl;
      |   ^~~~
a.cc:19:5: error: expected unqualified-id before 'return'
   19 |     return 0;
      |     ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

#include<iostream>

using namespace std;
int main (){
    long long int q,l=1;
    cin>>q;
    //y=1;
  if(q%2==0){
     cout<<-1<<endl;
      return0;}
  int x=7,y=1;
    while(y==1){
      
      if(x%q==0){
        
          break;}
      else{
         l+=1;
        x=10*x+7;}
    }
  cout<<l<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'return0' was not declared in this scope
   10 |       return0;}
      |       ^~~~~~~
Language: C++

#include <bits/stdc++.h>
#define MAX 10000000
using namespace std;
using ll = long long;
using P = pair<int,int>;
 
int main() {
  int k=0,i=0;
  cin  >> k;
  
  ll seed = k % 7;
  int i = 1;
  set<int>s;

  while(s.count(seed) == 0){
    if(seed == 0){
      cout << i << endl;
    }
    s.insert(seed);
    seed = (seed * 10  + 7) % k;
    i++;  
  }

  cout << -1 << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: redeclaration of 'int i'
   12 |   int i = 1;
      |       ^
a.cc:8:11: note: 'int i' previously declared here
    8 |   int k=0,i=0;
      |           ^
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();
		int ans = -1;
		int num = 7;
 
		for (int i = 1; i <= k; i++) {
			if (num % k == 0) {
				ans = i;
				break;
			}
 
			num = (((10 % k) * (num % k)) % k + 7 % k) % k;
		}
 
		System.out.println(ans);
 
		sc.close();
	

Compiler output:
Main.java:22: error: reached end of file while parsing
		sc.close();
		           ^
1 error
Language: C++

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

int main(){
    int k;

    cin >> k;

    int n = 0;

    if (k % 2 == 0){
        cout << "-1" << endl;
    } else {
        while (n) {
            n = n * 10 + 7;
            n %= k;
            if (n == 0){
                cout << ans << endl;
                return 0;
            }
            ans++;
        }
    }
    return 0;
}

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