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

#inlude<iostream>
using namespace std;
int main()
{
  long int n,count=1,a=7;
  cin>>n;
  if(n%2==0||n%5==0)
    cout<<"-1";
  else
    while(true)
    {
      if(a%n==0)
      {
        cout<<count;
        break;
      }  
      if(count>n)
      {
        cout<<"-1";
      	break;
      }
      a=(a%n)*10+7;
    } 
    return 0;
} 

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlude; did you mean #include?
    1 | #inlude<iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>n;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inlude<iostream>
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout<<"-1";
      |     ^~~~
a.cc:8:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:9: error: 'cout' was not declared in this scope
   14 |         cout<<count;
      |         ^~~~
a.cc:14:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:9: error: 'cout' was not declared in this scope
   19 |         cout<<"-1";
      |         ^~~~
a.cc:19:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#inlude<iostream>
using namespace std;
int main()
{
  long int n,count=1,a=7;
  cin>>n;
  if(n%2==0||n%5==0)
    cout<<"-1";
  else
    while(true)
    {
      if(a%n==0)
      {
        cout<<count;
        break;
      }  
      if(count>n)
      {
        cout<<"-1";
      	break;
      }
      a=(a*10+7)%n;
    } 
    return 0;
} 

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlude; did you mean #include?
    1 | #inlude<iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>n;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inlude<iostream>
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout<<"-1";
      |     ^~~~
a.cc:8:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:9: error: 'cout' was not declared in this scope
   14 |         cout<<count;
      |         ^~~~
a.cc:14:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:9: error: 'cout' was not declared in this scope
   19 |         cout<<"-1";
      |         ^~~~
a.cc:19:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#includ<bits/stdc++.h>
using namespace std;
void solve() {
	int K; cin >> K;
	ll now = 7;
	for(int i = 1;i< 1e7;++i) {
		if (now%K == 0) {
			print(i); return;
		}
		now *= 10;
		now += 7;
		now %= K;
	}
	print(-1);
}



signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	//int q;
	//cin >> q;
	//while (q--)
	solve();

}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #includ; did you mean #include?
    1 | #includ<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'void solve()':
a.cc:4:16: error: 'cin' was not declared in this scope
    4 |         int K; 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 | #includ<bits/stdc++.h>
a.cc:5:9: error: 'll' was not declared in this scope
    5 |         ll now = 7;
      |         ^~
a.cc:7:21: error: 'now' was not declared in this scope
    7 |                 if (now%K == 0) {
      |                     ^~~
a.cc:8:25: error: 'print' was not declared in this scope; did you mean 'int'?
    8 |                         print(i); return;
      |                         ^~~~~
      |                         int
a.cc:10:17: error: 'now' was not declared in this scope
   10 |                 now *= 10;
      |                 ^~~
a.cc:14:9: error: 'print' was not declared in this scope; did you mean 'int'?
   14 |         print(-1);
      |         ^~~~~
      |         int
a.cc: In function 'int main()':
a.cc:20:9: error: 'cin' was not declared in this scope
   20 |         cin.tie(0);
      |         ^~~
a.cc:20:9: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:9: error: 'ios' has not been declared
   21 |         ios::sync_with_stdio(false);
      |         ^~~
Language: C++

#include<bits/stdc++.h>

using namespace std;
using   ll=long long;

#define fast            ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)

#define endl            "\n"
#define pb              push_back
#define mp              make_pair
#define F               first
#define S               second
#define int             long long int
#define pll                pair<int , int>

#define ALL(v)          v.begin(),v.end()
#define ALLR(v)         v.rbegin(),v.rend()
#define pii             3.14159265358979323
#define inf             LLONG_MAX
#define ones(x)         __builtin_popcount(x)
#define fill(a,b)       memset(a,b,sizeof(a))
#define mod             1000000007
#define hell            998244353 

ll mod_pow(ll a,ll b,ll m) 
{
    ll res = 1;
    while(b)    
    {
        if(b&1)     
        {
            res=(res*a) % m;
        }
        a=(a*a) % m;
        b>>=1;
    }
    return res;
}

ll mod_inverse(ll a) 
{
    return mod_pow(a , mod-2 , mod);
}

void solve() 
{
	int K;  
	
	cin >> K;
	
    int a = 7;
    
    for (int i = 1; i <= K; ++i) {
        if (a % K == 0) {
            cout << i << endl;
            return 0;
        }
        else {
        	a = (10 * a + 7) % K;
        }
    }
    
    cout << -1 << endl;
}

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


Compiler output:
a.cc: In function 'void solve()':
a.cc:56:20: error: return-statement with a value, in function returning 'void' [-fpermissive]
   56 |             return 0;
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
// #define cerr if(false)cerr
typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll, ll> ii;
typedef vector<vector<ll>> vvll;
typedef vector<pair<ll, ll>> vii;
typedef long double ld;
typedef vector<ld> vld;
typedef vector<vector<ld>> vvld;
typedef vector<bool> vbl;
typedef vector<vbl> mbl;
#define ff first
#define ss second
#define pb emplace_back
#define mp make_pair
#define all(s) (s).begin(), (s).end()
#define minel(a) *min_element(all(a))
#define maxel(a) *max_element(all(a))
#define pq(t) priority_queue<t, vector <t>, greater <t>>
#define pqd(t) priority_queue<t>
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))      // Used to iterate over the types

const ll mod = 1e9 + 7;
const ll mx = 1e18;
const ll inf = 1e7;

// ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// For printing variables and their respective values

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }

void err(istream_iterator<string> it) {}

template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
    cerr << *it << " = " << a << endl;
    err(++it, args...);
}

// ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

auto mods() { return 0; }

template<typename T, typename... Args>
auto mods(T a, Args... args) { return (a + mods(args...) + mod) % mod; }

auto modp() { return 1; }

template<typename T, typename... Args>
auto modp(T a, Args... args) { return ( a * modp(args...) )% mod; }
// ! inputs should be positive and less than `mod`.

// ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// !Taking `int` input

template<typename T>
T nxt(){
    T x;
    cin >> x;
    return x;
}

//  ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

inline void solve()
{
    int k = nxt<int>(), s = 0;
    for (int i = 1; i <= 1e6 + 1; i++)
    {
        s = (s * 10 + 7) % k;
        if (not s)
        {
            cout << i << endl;
            return 0;
        }
    }
    cout << -1 << endl;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

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

Compiler output:
a.cc: In function 'void solve()':
a.cc:76:20: error: return-statement with a value, in function returning 'void' [-fpermissive]
   76 |             return 0;
      |                    ^
Language: C++

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

int main(){
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    //freopen("../input.txt","r",stdin);

    int K;
    cin >> K;

    ll num = 7;
    bool possible = false;
    for (int i = 1; i <=(int)1e6; ++i) {
        if(num%K == 0){
            possible = true;
            ans = i;
            break;
        }else{
            num = num*10 + 7;
        }
    }
    if(possible){
        cout << ans << "\n";
    }else{
        cout << -1 << "\n";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |             ans = i;
      |             ^~~
      |             abs
a.cc:24:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   24 |         cout << ans << "\n";
      |                 ^~~
      |                 abs
Language: C++

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

int main(){
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    //freopen("../input.txt","r",stdin);

    int K;
    cin >> K;

    ll num = 7;
    for (int i = 1; i <=(int)1e6; ++i) {
        if(num%K == 0){
            possible = true;
            ans = i;
            break;
        }else{
            num = num*10 + 7;
        }
    }
    if(possible){
        cout << ans << "\n";
    }else{
        if(K<=18){
            cout << -1 << "\n";
        }else{
            cout << K-1 << "\n";
        }

    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'possible' was not declared in this scope
   15 |             possible = true;
      |             ^~~~~~~~
a.cc:16:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |             ans = i;
      |             ^~~
      |             abs
a.cc:22:8: error: 'possible' was not declared in this scope
   22 |     if(possible){
      |        ^~~~~~~~
a.cc:23:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |         cout << ans << "\n";
      |                 ^~~
      |                 abs
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   13 |       if((pow(10,i)-1)%L==0) ans=i;
      |          ~~~~~~~~~~~~~^~
      |                    |   |
      |                    |   int
      |                    __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#pragma GCC optimize("Ofast")

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

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define pop_b pop_back
#define pf push_front
#define pop_f pop_front
#define mt make_tuple
#define eb emplace_back
#define sf(x) sizeof(x)
#define len(x) x.length()
#define sz(x) x.size()
#define fastio() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)

#define LB(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define UB(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
typedef long long ll;
typedef pair<ll,ll> ii;
typedef long double ld; 
typedef vector<int> vi;
typedef vector<set<ll>> vset;
typedef vector<ll> vl;
typedef vector<ld> vd;
typedef deque<ll> dql;
typedef deque<int> dqi;
typedef unsigned long long ull;
typedef tuple<int,int,int> State;

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << endl;
	err(++it, args...);
}

#define vmax(type)   std::numeric_limits<type>::max()
#define vmin(type)   std::numeric_limits<type>::min()
#define each(a,x) for( auto &a:(x))
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define repr(i, n) for (ll i = (n) - 1; i >= 0; i--)
#define rep2(i, l, r) for (ll i = (l); i < (r); i++)
#define rep2r(i, l, r) for (ll i = (r) - 1; i >= (l); i--)
#define range(a) a.begin(), a.end()
#define deb(x) cout<<#x<<" "<<x<<endl;
#define cinai(a, n) vi a(n); rep(i, n) { cin>>a[i]; }
#define cinal(a, n) vl a(n); rep(i, n) { cin>>a[i]; }
#define coutai(a, n) rep(i, n) { cout<<a[i]<<" "; } ent;
#define coutal(a, n) rep(i, n) { cout<<a[i]<<" "; } ent;
#define ent cout<<endl;
#define resize_vec(a) a.resize(unique(a.begin(), a.end()) - a.begin());
#define ms(dp, x) memset(dp, x, sf(dp))
#define endl '\n'

ll powm(ll a, ll b, ll mod) {
	ll res=1;
	while(b) {
		if(b&1)
			res=(res*a)%mod;
		a=(a*a)%mod;
		b>>=1;
	}
	return res;
}

const ll mod = 10002667;
const ll mod1 = 10000000019;
const ll N = 1000005;
const ll inf = 1e9;

void solve()
{
	ll k, ll a = 7;
	rep(i, N){
		if(a % k == 0){
			cout<<i+1<<endl;
			return;
		}
		a *= 10;
		a += 7;
		a %= k;
	}
	cout<<-1<<endl;
}

// #define _DEBUG 
// #define testCases
signed main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0), cout.tie(0);
	cout << fixed << setprecision(15);
	
	int tc = 1;
#ifdef testCases
	cin>>tc;
#endif
	while(tc--)
	{
#ifdef _DEBUG
	int tt = clock();
#endif
		solve();
		
#ifdef _DEBUG
		cerr << "TIME = " << clock() - tt << endl;
		tt = clock();
#endif
	}
	return 0;
}



Compiler output:
a.cc: In function 'void solve()':
a.cc:78:18: error: expected initializer before 'a'
   78 |         ll k, ll a = 7;
      |                  ^
a.cc:80:20: error: 'a' was not declared in this scope
   80 |                 if(a % k == 0){
      |                    ^
a.cc:84:17: error: 'a' was not declared in this scope
   84 |                 a *= 10;
      |                 ^
Language: C++

#include <bits/stdc++.h>
#include<string.h>
#define rep(i,a,n) for(int i=int (a);i<int (n);i++)
#define OUT  freopen("output.txt", "w", stdout)
#define IN  freopen("input.txt", "r", stdin)
#define mem(a,b) memset((a),(b),sizeof(a))
#define NumofDigits(n) ((int)log10(n)+1)
#define NumofBits(n) ((int)log2(n)+1)
#define PI 3.14159265358979323846264
#define vii vector<pair<int,int>>
#define all(x) x.begin(),x.end()
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi  vector<int>
#define nl  cout<<"\n"
#define pb  push_back
#define mp  make_pair
#define ll  long long 
#define ss  second 
#define ff  first
#define endl "\n"
#define sp  " "
using namespace std;

int main(){
  ll k,c=0;
  cin>>k;
  ll a=7;
  unordered_set<int> b;
  b.insert(7);
  if(k%2 == 0){
    cout<<-1<<"\n";
    return 0;
  }
  else{
    while(a%k != 0){
      r = a%k;
      a = r*10+7;
      c++;
      if(b.find(a) != b.end()){
        cout<<-1<<"\n";
        return 0;
      }
      b.insert(a);
    }
    cout<<c;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:7: error: 'r' was not declared in this scope
   37 |       r = a%k;
      |       ^
Language: C++

#include<cstdio>
#include<iostream>
#include<bits/stdc++.h>
 
#define ll long long int
using namespace std;
ll calc(ll n)
{
	ll sum = 7, st = 10;
	for(int i = 0; i < 1000000; i++)
	{
		if(sum % n == 0)
			return i + 1;
		sum = stoi(string(i+2;'7'));
	}
	return -1;
}
int main()
{
    ll k;
    cin>>k;
    cout<<calc(k)<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'long long int calc(long long int)':
a.cc:14:34: error: expected primary-expression before '(' token
   14 |                 sum = stoi(string(i+2;'7'));
      |                                  ^
a.cc:14:38: error: expected ')' before ';' token
   14 |                 sum = stoi(string(i+2;'7'));
      |                                  ~   ^
      |                                      )
a.cc:14:42: error: expected ';' before ')' token
   14 |                 sum = stoi(string(i+2;'7'));
      |                                          ^
      |                                          ;
Language: C++

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

int main() {
  int K;
  cin >> K;
  
  int sevens = 7 % k;  // 初期値0にするとkが7のとき何度更新してもsevensが0になってしまう
  set<int> s;
  
  if (K % 2 == 0) cout << -1 << endl;
  else {
    // mod Kの値はK以下なので, forループする場合は上限をKにすれば良い.
    // mod Kの値は循環し, mod K == 0のときreturnするので,
    // 既に出た値に当たるということは既に一巡し, mod K == 0となることはない.
    // その場合-1を出力する
    // s.countは引数と等価な値がsetにある場合1を, ない場合0を返す
    while (s.count(sevens) == 0) {
      if (sevens == 0) {
        cout << i << endl;
        return 0;
      }
      s.insert(sevens);
      sevens = (sevens * 10 + 7) % K;
      i++;
    }
    cout << -1 << endl;  // 上限値までループしても見つからなかった場合
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: 'k' was not declared in this scope
    8 |   int sevens = 7 % k;  // 初期値0にするとkが7のとき何度更新してもsevensが0になってしまう
      |                    ^
a.cc:20:17: error: 'i' was not declared in this scope
   20 |         cout << i << endl;
      |                 ^
a.cc:25:7: error: 'i' was not declared in this scope
   25 |       i++;
      |       ^
Language: C++

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

int main()
{
  int k;
  cin >> k;
  int x = 7 % k;
  int i = 1;
  set<int> s;
  while(s.count(x) == 0) {
      if(x == 0) {
          cout << i << endl;
          return 0;
      }
    s.insert(x);
    x = (x * 10 + 7) % k;
    i++;
  }
  cout << -1 << endl;
  return 0;
}


Compiler output:
a.cc:4:11: error: 'Pair' does not name a type
    4 | using P = Pair<int, int>;
      |           ^~~~
Language: C++

// first second push_back unordered return continue break vector visited check flag bool while iterator begin end lower_bound upper_bound temp true false ll_MAX ll_MIN insert erase clear pop push compare ll64_MAX ll64_MIN  reverse replace stringstream string::npos length substr front priority_queue

#ifndef ONLINE_JUDGE
#include "debug.h"
#else
#include <bits/stdc++.h>
using namespace std;
#define debug(...) 42
#endif

#define endl '\n'
#define ll long long
#define rint register int
#define minpq priority_queue <int, vector<int>, greater<int> >
#define maxpq  priority_queue <int>

#define re register
#define pb(x) push_back(x);
#define ce(x) cout << x << '\n';

using db = long double;
using pll = pair < ll, ll >;
#define scan(a, n) 		for(int i = 0; i < n; i++)cin >> a[i];

#define rep(i,x,n,inc) for(i=x ; i<n ; i+=inc)
#define repr(i,x,n,inc) for( i=x ; i>n ; i+=inc)
#define all(a)      (a).begin(),(a).end()
#define unique_sort(x) sort(all(x)), x.resize(distance(x.begin(), unique(all(x))))

#define mp(a,b) make_pair(a,b)
#define ff first
#define ss second
#define hell 1000007
#define infl LLONG_MAX

#define conutBits(n)	__builtin_popcount(n)
#define Foxen(i,s) for (i=s.begin(); i!=s.end(); i++)
#define Fill(s,v) memset(s,v,sizeof(s))
#define cout_p(x, p) cout << fixed << setprecision((p)) << x << endl     //print with precision

#define tc(tt) \
    ll tt;    \
    cin >> tt; \
    for (ll _tt = 0; _tt < tt; _tt++) // testcase 

int32_t main() {
	ios::sync_with_stdio(0); 		cin.tie(0); cout.tie(0);

	ll t, i, x, j, y, 	z, k, n;
	cin >> k;
	// if (k % 2 == 0 or k % 5 == 0) {
	// 	return cout << -1, 0;
	// }

	int vis[hell + 10];
	// {
	int res = 1, cur;
	cur = 7 % k;
	while (cur) {
		if (vis[cur]) {
			ce(-1);
			return 0;
		}
		vis[cur] = 1;
		res++;
		cur = (cur * 10 + 7) % k;
	}
	ce(res);
	// }

}



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

// Working program using Reader Class 
import java.io.*; 
import java.util.*; 

public class Code
{ 
	static class Reader 
	{ 
		final private int BUFFER_SIZE = 1 << 16; 
		private DataInputStream din; 
		private byte[] buffer; 
		private int bufferPointer, bytesRead; 

		public Reader() 
		{ 
			din = new DataInputStream(System.in); 
			buffer = new byte[BUFFER_SIZE]; 
			bufferPointer = bytesRead = 0; 
		} 

		public Reader(String file_name) throws IOException 
		{ 
			din = new DataInputStream(new FileInputStream(file_name)); 
			buffer = new byte[BUFFER_SIZE]; 
			bufferPointer = bytesRead = 0; 
		} 

		public String readLine() throws IOException 
		{ 
			byte[] buf = new byte[64]; // line length 
			int cnt = 0, c; 
			while ((c = read()) != -1) 
			{ 
				if (c == '\n') 
					break; 
				buf[cnt++] = (byte) c; 
			} 
			return new String(buf, 0, cnt); 
		} 

		public int nextInt() throws IOException 
		{ 
			int ret = 0; 
			byte c = read(); 
			while (c <= ' ') 
				c = read(); 
			boolean neg = (c == '-'); 
			if (neg) 
				c = read(); 
			do
			{ 
				ret = ret * 10 + c - '0'; 
			} while ((c = read()) >= '0' && c <= '9'); 

			if (neg) 
				return -ret; 
			return ret; 
		} 

		public long nextLong() throws IOException 
		{ 
			long ret = 0; 
			byte c = read(); 
			while (c <= ' ') 
				c = read(); 
			boolean neg = (c == '-'); 
			if (neg) 
				c = read(); 
			do { 
				ret = ret * 10 + c - '0'; 
			} 
			while ((c = read()) >= '0' && c <= '9'); 
			if (neg) 
				return -ret; 
			return ret; 
		} 

		public double nextDouble() throws IOException 
		{ 
			double ret = 0, div = 1; 
			byte c = read(); 
			while (c <= ' ') 
				c = read(); 
			boolean neg = (c == '-'); 
			if (neg) 
				c = read(); 

			do { 
				ret = ret * 10 + c - '0'; 
			} 
			while ((c = read()) >= '0' && c <= '9'); 

			if (c == '.') 
			{ 
				while ((c = read()) >= '0' && c <= '9') 
				{ 
					ret += (c - '0') / (div *= 10); 
				} 
			} 

			if (neg) 
				return -ret; 
			return ret; 
		} 

		private void fillBuffer() throws IOException 
		{ 
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE); 
			if (bytesRead == -1) 
				buffer[0] = -1; 
		} 

		private byte read() throws IOException 
		{ 
			if (bufferPointer == bytesRead) 
				fillBuffer(); 
			return buffer[bufferPointer++]; 
		} 

		public void close() throws IOException 
		{ 
			if (din == null) 
				return; 
			din.close(); 
		} 
	} 

	public static void main(String[] args) throws IOException 
	{ 
		//Scanner sc=new Scanner(System.in);
		Reader sc=new Reader();
		PrintWriter out=new PrintWriter(System.out);
		int k=sc.nextInt();
		long curr=7;
		boolean pos=false;
		for(int i=1;i<=k+1;i++){
		    if(curr%k==0){
		        pos=true;
		        out.println(i);
		    }
		    curr=curr*10+7;
		    curr=curr%k;
		}
		if(!pos){
		    out.println(-1);
		}
		out.flush();
	}
}


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

#include<iostream>
#include<assert.h>

#define ios ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define write freopen("in.txt","r",stdin); freopen("out.txt","w",stdout); 

using namespace std;
//assert(x==i);
void solve()
{
int k;
cin>>k;
int a=7%k;
for(int i=0;i<a*3;++i)
{
	if(!a)
	{
		cout<<i+i<<"\n";
		return;
	}
a=(7*10+7)%k
}
cout<<"-1\n";
}
int main() 
{
ios;
//write;
int tc=1;
//cin>>tc;
for(int i=1;i<=tc;i++)
{
//cout<<"Case #"<<i<<": ";
solve();
}
return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:21:13: error: expected ';' before '}' token
   21 | a=(7*10+7)%k
      |             ^
      |             ;
   22 | }
      | ~
Language: C++

#include<iostream>
#include<assert.h>

#define ios ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define write freopen("in.txt","r",stdin); freopen("out.txt","w",stdout); 

using namespace std;
//assert(x==i);
void solve()
{
int k;
cin>>k;
int a=7%k;
for(int i=0;i<a*3;++i)
{
	if(!a)
	{
		cout<<i+i<<"\n";
		return;
	}
x=(7*10+7)%k
}
cout<<"-1\n";
}
int main() 
{
ios;
//write;
int tc=1;
//cin>>tc;
for(int i=1;i<=tc;i++)
{
//cout<<"Case #"<<i<<": ";
solve();
}
return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:21:1: error: 'x' was not declared in this scope
   21 | x=(7*10+7)%k
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  int K;
  cin >> K;
  if(K%7=0){
    K=K/7;
  }else if(10%K==0){
    cout << -1 << endl;

  }else{
  int S=1;
  int T=1;
  for(int i=0; i<1000000; i++){
    if(S%K==0){
      cout << i+1 << endl;
      break;
    }
      S=S+10*T;
      S=S%K;
      T=10*T%K;
  }
  return 0;
  }
}

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

#include <iostream>
using namespace std;

int main(){
  int K;
  cin >> K;
  if(K%7=0) K=K/7;
  }else if(10%K==0){
    cout << -1 << endl;

  }else{
  int S=1;
  int T=1;
  for(int i=0; i<1000000; i++){
    if(S%K==0){
      cout << i+1 << endl;
      break;
    }
      S=S+10*T;
      S=S%K;
      T=10*T%K;
  }
  return 0;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: lvalue required as left operand of assignment
    7 |   if(K%7=0) K=K/7;
      |      ~^~
a.cc: At global scope:
a.cc:8:4: error: expected unqualified-id before 'else'
    8 |   }else if(10%K==0){
      |    ^~~~
a.cc:11:4: error: expected unqualified-id before 'else'
   11 |   }else{
      |    ^~~~
a.cc:25:1: error: expected declaration before '}' token
   25 | }
      | ^
Language: C++

long long int cnt=0;
long long int dfs(long long int a, long long int n)
{ 
    if(a%n==0)
    return cnt;
    cnt++;
    return dfs((a*10+7)%n,n);
    
}
#include<iostream>  
  
using namespace std; 
  
// main function - 
// where the execution of program begins 
int main() 
{ 
  long long int n;
cin>>n;
long long int a=7;
if n%2==0 || n%5==0
print -1;
else
long long int q = dfs(long long int a, long long int n);
cout<<q;
    return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:4: error: expected '(' before 'n'
   21 | if n%2==0 || n%5==0
      |    ^
      |    (
a.cc:23:1: error: 'else' without a previous 'if'
   23 | else
      | ^~~~
a.cc:24:23: error: expected primary-expression before 'long'
   24 | long long int q = dfs(long long int a, long long int n);
      |                       ^~~~
a.cc:24:40: error: expected primary-expression before 'long'
   24 | long long int q = dfs(long long int a, long long int n);
      |                                        ^~~~
Language: C++

long long int cnt=0;
long long int dfs(long long int a, long long int n)
{ 
    if(a%n==0)
    return cnt;
    cnt++;
    return dfs((a*10+7)%n,n);
    
}
#include<iostream>  
  
using namespace std; 
  
// main function - 
// where the execution of program begins 
int main() 
{ 
  long long int n;
cin>>n;
a=7;
if n%2==0 || n%5==0
print -1;
else
long long int q = dfs(long long int a, long long int n);
cout<<q;
    return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:1: error: 'a' was not declared in this scope
   20 | a=7;
      | ^
a.cc:21:4: error: expected '(' before 'n'
   21 | if n%2==0 || n%5==0
      |    ^
      |    (
a.cc:23:1: error: 'else' without a previous 'if'
   23 | else
      | ^~~~
a.cc:24:23: error: expected primary-expression before 'long'
   24 | long long int q = dfs(long long int a, long long int n);
      |                       ^~~~
a.cc:24:40: error: expected primary-expression before 'long'
   24 | long long int q = dfs(long long int a, long long int n);
      |                                        ^~~~
Language: C++

#include <iostream>
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
int main() 
{
    int n;
    cin>>n;
    int k=0,c=1;
    int f=0;
        while(1)
        {
        k=((k*10)+7)%n;
        if(k==0)
        {f=1;break;}
        c++;
        }
        if(f==0)
        cout<<"-1";
        else
    cout<<c;
    }
}

Compiler output:
a.cc:25:1: error: expected declaration before '}' token
   25 | }
      | ^
Language: C++

long long int cnt=0
long long int dfs(long long int a, long long int n)    // here a is initially 7
{ 
    if(a%n==0)
    return cnt;
    cnt++;
    return dfs((a*10+7)%n,n);
    
}
#include<iostream>  
  
using namespace std; 
  
// main function - 
// where the execution of program begins 
int main() 
{ 
  long long int n;
cin>>n;
  a=7;
if n%2==0 OR n%5==0
print -1;
else         //( I used dfs to solve the problem)
long long int q = dfs(long long int a, long long int n);
  cout<<q;
    return 0; 
} 


Compiler output:
a.cc:2:1: error: expected ',' or ';' before 'long'
    2 | long long int dfs(long long int a, long long int n)    // here a is initially 7
      | ^~~~
a.cc: In function 'int main()':
a.cc:20:3: error: 'a' was not declared in this scope
   20 |   a=7;
      |   ^
a.cc:21:4: error: expected '(' before 'n'
   21 | if n%2==0 OR n%5==0
      |    ^
      |    (
a.cc:23:1: error: 'else' without a previous 'if'
   23 | else         //( I used dfs to solve the problem)
      | ^~~~
a.cc:24:23: error: expected primary-expression before 'long'
   24 | long long int q = dfs(long long int a, long long int n);
      |                       ^~~~
a.cc:24:40: error: expected primary-expression before 'long'
   24 | long long int q = dfs(long long int a, long long int n);
      |                                        ^~~~
a.cc:24:19: error: 'dfs' was not declared in this scope
   24 | long long int q = dfs(long long int a, long long int n);
      |                   ^~~
Language: C++


long long int dfs(long long int a, long long int n)    // here a is initially 7
{ 
    if(a%n==0)
    return cnt;
    cnt++;
    return dfs((a*10+7)%n,n);
    
}
#include<iostream>  
  
using namespace std; 
  
// main function - 
// where the execution of program begins 
int main() 
{ 
  long long int n;
cin>>n;
  a=7;
if n%2==0 OR n%5==0
print -1;
else         //( I used dfs to solve the problem)
long long int q = dfs(long long int a, long long int n);
  cout<<q;
    return 0; 
} 

Compiler output:
a.cc: In function 'long long int dfs(long long int, long long int)':
a.cc:5:12: error: 'cnt' was not declared in this scope; did you mean 'int'?
    5 |     return cnt;
      |            ^~~
      |            int
a.cc:6:5: error: 'cnt' was not declared in this scope; did you mean 'int'?
    6 |     cnt++;
      |     ^~~
      |     int
a.cc: In function 'int main()':
a.cc:20:3: error: 'a' was not declared in this scope
   20 |   a=7;
      |   ^
a.cc:21:4: error: expected '(' before 'n'
   21 | if n%2==0 OR n%5==0
      |    ^
      |    (
a.cc:23:1: error: 'else' without a previous 'if'
   23 | else         //( I used dfs to solve the problem)
      | ^~~~
a.cc:24:23: error: expected primary-expression before 'long'
   24 | long long int q = dfs(long long int a, long long int n);
      |                       ^~~~
a.cc:24:40: error: expected primary-expression before 'long'
   24 | long long int q = dfs(long long int a, long long int n);
      |                                        ^~~~
Language: C++

#include<iostream>
using namespace std;
int n,f,i;
main(){
	cin>>n;
	for(i=1;i<=2e6;i++){
		f=(f*10+7)%n;
		if(!f){
			cout<<i<<endl;
			return;
		}
	}
	cout<<-1<<endl;
	return;
}


Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:10:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
   10 |                         return;
      |                         ^~~~~~
a.cc:14:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   14 |         return;
      |         ^~~~~~
Language: C++

#include<iostream>
using namespace std;
int n,f,i;
int main(){
	cin>>n;
	for(i=1;i<=2e6;i++){
		f=(f*10+7)%n;
		if(!f){
			cout<<i<<endl;
			return;
		}
	}
	cout<<-1<<endl;
	return;
}


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

#include<iostream>
using namespace std;
int n,f,i;
int main(){
	cin>>n;
	for(i=1;i<=2e6;i++){
		f=(f*10+7)%n;
		if(!f){
			cout<<i<<endl;
			return;
		}
	}
	return cout<<-1<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
   10 |                         return;
      |                         ^~~~~~
a.cc:13:24: error: cannot convert 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} to 'int' in return
   13 |         return cout<<-1<<endl;
      |                ~~~~~~~~^~~~~~
      |                        |
      |                        std::basic_ostream<char>::__ostream_type {aka std::basic_ostream<char>}
Language: C++

#include <bits/stdc++.h>
 
#define ll long long
#define ld long double
#define mp make_pair
#define mt make_tuple
#define ff first
#define ss second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define for0(i, n) for (int i = 0; i < (int)(n); ++i)
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define forr(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define forab(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
#define foriter(it, l) for (auto it = l.begin(); it != l.end(); it++)
#define endl '\n'
#define INF (ll)(1e9)
#define EPS 1e-9
#define MOD (ll)(1e9+7)
#define PI 3.1415926535897932384626433832795
#define set set
#define mset multiset
#define uset unordered_set
#define umset unordered_multiset
#define map map
#define mmap multimap
#define umap unordered_map
#define ummap unordered_multimap
 
using namespace std;
 
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpi;
typedef vector<vi> vvi;
typedef long long i64;
typedef vector<i64> vll;
typedef vector<vll> vvll;
typedef pair<i64, i64> pll;
 
int inp(){
  int x; 
  cin>>x;
  return x;
}
 
//=============================================================================//
 
void solve() {
    ll k; 
    cin>>k;
    
    if(k%2==0) cout<<-1;
    else{
      ll num = 7;
      ll ans = 1;
      while(num%k != 0){
        num = (num*10+7) % k;
        ans++;
        if(ans>1000000) {
          cout<<-1;
          return;
      }
      cout<<ans;
      }
}
 
int main() {
    
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.precision(10);
 
    int T=1;
    //cin >> T;
    while (T--) {
        solve();
        cout<<endl;
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:69:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   69 | int main() {
      |         ^~
a.cc:69:9: note: remove parentheses to default-initialize a variable
   69 | int main() {
      |         ^~
      |         --
a.cc:69:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:69:12: error: a function-definition is not allowed here before '{' token
   69 | int main() {
      |            ^
a.cc:83:2: error: expected '}' at end of input
   83 | }
      |  ^
a.cc:50:14: note: to match this '{'
   50 | void solve() {
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    int k;
    cin >> k;
    ll num = 7 % k;
    ll N = 1e6 + 100;
    for(i = 1 ; i < N ; i++)
    {
        if(num == 0)
        {
            cout << i << "\n";
            return 0;
        }
        num = ((num * 10) % k + 7) % k;
    }
    cout << "-1\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'i' was not declared in this scope
   10 |     for(i = 1 ; i < N ; i++)
      |         ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: expected ';' before '}' token
   19 |     }while(i<=K)
      |                 ^
      |                 ;
   20 |   }
      |   ~
Language: C++

#include <iostream>
#include <cmath>
#include <string>

int main()
{
	long long int K, seven = 7, 
	int ans = 1;
	std::cin >> K;
	while (seven % K != 0 && ans > 0)
	{
		seven =(seven * 10 + 7)% K;
		ans++;
	}
	std::cout << (ans > 0 ? ans : -1) << std::endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected unqualified-id before 'int'
    8 |         int ans = 1;
      |         ^~~
a.cc:10:34: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |         while (seven % K != 0 && ans > 0)
      |                                  ^~~
      |                                  abs
a.cc:15:23: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 |         std::cout << (ans > 0 ? ans : -1) << std::endl;
      |                       ^~~
      |                       abs
Language: C++

#include <iostream> 
#include <algorithm>
#include <vector>

using ll = long long;
using namespace std;

int main () {
    long a = 0;
    long K;
    cin >> K;
    if (K % 7 == 0)
        K /= 7;
    if (K % 2 == 0 || k % 5 == 0){cout << -1; exit(0);}
    long n = 1;
    long r = 1 % K;
    while (r != 0){
        r = (10*r+1) % K;
        n += 1;
    }
    cout << n;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: 'k' was not declared in this scope
   14 |     if (K % 2 == 0 || k % 5 == 0){cout << -1; exit(0);}
      |                       ^
Language: C++

<?php
list($k) = ints();
$mod = $cnt = 0;
while (true) {
    $mod = ($mod * 10 + 7) % $k;
    ++$cnt;
    if (isset($f[$mod])) exit('-1'); // ループするので終了
    else $f[$mod] = true;
    if ($mod === 0) break;
}
echo $cnt;
function ints()
{
    return array_map('intval', explode(' ', trim(fgets(STDIN))));
}


Compiler output:
a.cc:7:31: warning: multi-character character constant [-Wmultichar]
    7 |     if (isset($f[$mod])) exit('-1'); // ループするので終了
      |                               ^~~~
a.cc:14:22: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   14 |     return array_map('intval', explode(' ', trim(fgets(STDIN))));
      |                      ^~~~~~~~
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <?php
      | ^
a.cc:3:1: error: '$mod' does not name a type
    3 | $mod = $cnt = 0;
      | ^~~~
a.cc:4:1: error: expected unqualified-id before 'while'
    4 | while (true) {
      | ^~~~~
a.cc:11:1: error: 'echo' does not name a type
   11 | echo $cnt;
      | ^~~~
a.cc:12:1: error: 'function' does not name a type; did you mean 'union'?
   12 | function ints()
      | ^~~~~~~~
      | union
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  
  if (k % 2 == 0 || K % 5 == 0 || k < 7) {
  	cout <<-1<< endl;
  } else if (k == 7) {
    cout <<1<< endl;
  } else {
	long long num=0;
    for(int i=1;i<2e6;i++){
        num *= 10;
        num += 7;
        num %= k;
        if(num==0){
            cout<<i<<endl;
            return 0;
        }
    }
    cout<<-1<<endl;
  }
    
  }

 



Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'K' was not declared in this scope
    7 |   if (k % 2 == 0 || K % 5 == 0 || k < 7) {
      |                     ^
Language: C++

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

int main(){
    int K;
    //入力
    cin >> K;
    int ans = -1;
    for(int i=1;i<=1000001;i++){
      int seven = 0;
      seven = 10*seven + 7
        if(seven % K == 0){
          ans = i+1;
          break;
        }
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: expected ';' before 'if'
   11 |       seven = 10*seven + 7
      |                           ^
      |                           ;
   12 |         if(seven % K == 0){
      |         ~~
Language: C++

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

using namespace std;



int main(void) {
	int k;
	cin >> k;

	int ans;
	int n = 7;
	if (k == 2) {
		cout << "-1";
		return 0;
	}
	for (int i = 1;; i++) {
		if (n == 0) {
			ans = i;
			break;
		}

		n = n * 10 + 7;
		n = n % k;
	}

	cout << ans;


Compiler output:
a.cc: In function 'int main()':
a.cc:28:21: error: expected '}' at end of input
   28 |         cout << ans;
      |                     ^
a.cc:8:16: note: to match this '{'
    8 | int main(void) {
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define rep(i,n) for(ll i=0;i<n;++i)
#define ocut cout
#define ouct cout
#define itn int

struct Union{
  vector<ll> par;
  Union(ll a){
  par=vector<ll>(a,-1);
  }
  ll find(ll a){
    if(par[a]<0){
      return a;
    }
    else{
      return par[a]=find(par[a]);
    }
  }
  bool same(ll a,ll b){
    return (find(a)==find(b));
  }
  ll size(ll a){
    return -par[find(a)];
  }
  void unite(ll a,ll b){
    ll c=find(a),d=find(b);
    if(c==d)
      return;
    if(size(c)<size(d)){
      swap(c,d);
    }
    par[c]+=par[d];
    par[d]=c;
  }
};
ll euclidean_gcd(ll a, ll b) {
  if(a < b) return euclidean_gcd(b, a);
  ll r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
}
ll euclidean_lcm(ll a, ll b) {
  return a/euclidean_gcd(a,b)*b;
}

ll binary(ll bina){
    ll ans = 0;
    for (ll i = 0; bina>0 ; i++)
    {
        ans += bina%2;
        bina = bina/2;
    }
    return ans;
}
void revStr(char* str){
	int size = strlen(str);
	int i,j;
	char tmp = {0};
	
	for(i = 0, j = size - 1; i < size / 2; i++, j--){
		tmp = str[i];
		str[i] = str[j];
		str[j] = tmp;
	}
	return;	
}
int main(void){
  ll k;
  cin >> k;
  if(k%7==0)k/=7;
  ll h=7;
  ll l=0;
  rep(i,10000000){
    l=(l+h)%1000000007;
    h=h*10%1000000007;
    if(l%k==0){
      cout << i+1;
    }
    m++;
  }
  cout << -1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:86:5: error: 'm' was not declared in this scope
   86 |     m++;
      |     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define rep(i,n) for(ll i=0;i<n;++i)
#define ocut cout
#define ouct cout
#define itn int

struct Union{
  vector<ll> par;
  Union(ll a){
  par=vector<ll>(a,-1);
  }
  ll find(ll a){
    if(par[a]<0){
      return a;
    }
    else{
      return par[a]=find(par[a]);
    }
  }
  bool same(ll a,ll b){
    return (find(a)==find(b));
  }
  ll size(ll a){
    return -par[find(a)];
  }
  void unite(ll a,ll b){
    ll c=find(a),d=find(b);
    if(c==d)
      return;
    if(size(c)<size(d)){
      swap(c,d);
    }
    par[c]+=par[d];
    par[d]=c;
  }
};
ll euclidean_gcd(ll a, ll b) {
  if(a < b) return euclidean_gcd(b, a);
  ll r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
}
ll euclidean_lcm(ll a, ll b) {
  return a/euclidean_gcd(a,b)*b;
}

ll binary(ll bina){
    ll ans = 0;
    for (ll i = 0; bina>0 ; i++)
    {
        ans += bina%2;
        bina = bina/2;
    }
    return ans;
}
void revStr(char* str){
	int size = strlen(str);
	int i,j;
	char tmp = {0};
	
	for(i = 0, j = size - 1; i < size / 2; i++, j--){
		tmp = str[i];
		str[i] = str[j];
		str[j] = tmp;
	}
	return;	
}
int main(void){
  ll k;
  cin >> k;
  if(k%7==0)k/=7;
  ll h=7;
  ll l=0;
  rep(i,10000000){
    l=(l+h)%1000000007;
    h=h*10%1000000007;
    if((l-k)%1000000007==0){
      cout << i+1;
    }
    m++;
  }
  cout << -1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:86:5: error: 'm' was not declared in this scope
   86 |     m++;
      |     ^
Language: C++

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

 #define MAX INT_MAX
 #define ll long long int

int main(){
    ll k,n;
  	cin>>k;
  	if(k%2==0 || k%5==0) {
      cout<<-1;
      return 0;
    }
  	if k=7 {
      cout<<1;
      return 0;}
  	n=7;
  	for(ll i=1;;i++){
    	if(n%k!=0) n=n*10 + 7;
      	else break;
    }
  		cout<<i;
      return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: expected '(' before 'k'
   14 |         if k=7 {
      |            ^
      |            (
a.cc:22:23: error: 'i' was not declared in this scope
   22 |                 cout<<i;
      |                       ^
Language: C++

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

void solve(){
    int k; cin>>k;

    if(k%2 == 0 || k%5 == 0) printf("-1\n");
    else{
        int i = 1;
        int ans = -1;
        long long m = 7;

        while(i<=777777) {
            m = m*10*1ll+7;
            i++;

            if(m%k == 0 || k%m==0) {ans = i; break;}
        }

        if(k>777777)
            cout<<k-1<<endl;
        else
            cout<<ans<<endl;
    }
}

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


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | <#include<bits/stdc++.h>
      |  ^
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <#include<bits/stdc++.h>
      | ^
a.cc: In function 'void solve()':
a.cc:5:12: error: 'cin' was not declared in this scope
    5 |     int k; cin>>k;
      |            ^~~
a.cc:7:30: error: 'printf' was not declared in this scope
    7 |     if(k%2 == 0 || k%5 == 0) printf("-1\n");
      |                              ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | <#include<bits/stdc++.h>
a.cc:21:13: error: 'cout' was not declared in this scope
   21 |             cout<<k-1<<endl;
      |             ^~~~
a.cc:21:24: error: 'endl' was not declared in this scope
   21 |             cout<<k-1<<endl;
      |                        ^~~~
a.cc:23:13: error: 'cout' was not declared in this scope
   23 |             cout<<ans<<endl;
      |             ^~~~
a.cc:23:24: error: 'endl' was not declared in this scope
   23 |             cout<<ans<<endl;
      |                        ^~~~