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

/*created by tanishk gupta*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define repl(i,a,n) for(long long int i=a;i<n;i++)
#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
typedef vector<int> VI;
typedef long long int ll;
typedef unsigned long long ull;
//typedef pair<int,int> PII;
typedef double db;
mt19937 mrand(random_device{}());
const ll MOD=1e9+7;
const ll mod=1e9+7;
//const llint MOD;
const ll N=(ll)(1e6+1);
int rnd(int x) { return mrand() % x;}
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
ll add(ll a,ll b){return ((a%MOD)+(b%MOD))%MOD;}
ll mul(ll a,ll b){return ((a%MOD)*(b%MOD))%MOD;}
ll sub(ll a,ll b){return ((a%MOD)-(b%MOD)+MOD)%MOD;}
ll binpow(ll x, ll y){ll z = 1;while(y){if(y & 1) z = mul(z, x);x = mul(x, x);y >>= 1;}return z;}
ll inv(int x){return binpow(x, MOD - 2);}
ll divide(ll x, ll y){return mul(x, inv(y));}
ll fact[N];
void precalc(){fact[0] = 1;for(ll i = 1; i < N; i++)fact[i] = mul(fact[i - 1], i);}
ll C(ll n, ll k){return divide(fact[n], mul(fact[k], fact[n - k]));}
//bool prime[N];
//void sieve() {for(int i=2;i<N;i++) {prime[i]=true;}for (int p=2; p*p<=N; p++){if (prime[p] == true){for (int i=p*p; i<=N; i += p)prime[i] = false;}}}
ll legendpow(ll n, ll p){ll total = 0;while (n){n /= p;total += n;}return total;}

//head==================================================================================



int main()
{
IOS;
precalc();
ll n;
cin>>n;
if (n==1)
{
    cout<<0;
}
else
{
   ll ans=0;
    ans=add(ans,powmod(10,n));
    ans=add(ans,powmod(8,n));
    ans=sub(ans,mul(2,powmod(9,n)));
    cout<<ans;
}


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

#include <stdio.h>
 
int main(int argc, const char * argv[]) {
    // insert code here...
    int x;
    scanf("%d", &x);
    if(x==2){
        printf("2\n");
    }if else(x==1){
        printf("0\n");
    }else{
      	printf("869121\n");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:9: error: expected '(' before 'else'
    9 |     }if else(x==1){
      |         ^~~~
      |         (
Language: C++

// Atcoder Beginner Contest 178
#include<bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef map<ll,ll>::iterator itll;
typedef long double ld;
typedef map<ll,ll> mapll;

#define con continue
#define pb push_back
#define fi first
#define se second
#define fr front()
#define INF 1000000000000000000
#define all(vl) vl.begin(),vl.end()
#define m_p make_pair 
#define sz(a) sizeof(a)
#define forn(mp,it) for(it = mp.begin();it!=mp.end();it++)
#define FOR(i,a,n) for(ll i=a;i<n;i++) 
#define FORE(i,a,n) FOR(i,a,n+1)
#define Endl endl
#define eNdl endl
#define enDl endl
#define endL endl

int main() 
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	cerr.tie(0);
	ll n;
	cin>>n;
	if(n<2)
	{
		cout<<0<<Endl;
		return 0;
	}
	ll ans = 1;
	FOR(i,0,n)
	{
		ans*=9;
		ans%=1000000007;
	}
	ans*=2;
	ans%=mod;
	ll ch = 1;
	FOR(i,0,n)
	{
		ch*=8;
		ch%=1000000007;
	}
	ans-=ch;
	ll he = 1;
	FOR(i,0,n)
	{
		he*=10;
		he%=1000000007;
	}
	cout<<he-ans<<Endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:14: error: 'mod' was not declared in this scope; did you mean 'modf'?
   48 |         ans%=mod;
      |              ^~~
      |              modf
Language: C

#include <stdio.h>

int main(int argc, const char * argv[]) {
    // insert code here...
    int x;
    scanf("%d", &x);
    if(x==2){
        printf("2\n");
    }if else(x==1){
        printf("0\n");
    }else{
      	printf("869121\n");
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:9: error: expected '(' before 'else'
    9 |     }if else(x==1){
      |         ^~~~
      |         (
main.c:14:1: error: expected declaration or statement at end of input
   14 | }
      | ^
Language: C++

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

int main()
{
	long long a, b, c, N;
	a = 1; b = 1; c = 1; N = 0;
	cin >> N;
	for (int i = 0; i < N; i++) {
		a *= 8;
		b *= 9;
		c *= 10;
		a %= 1000000007;
		b %= 1000000007;
		c %= 1000000007;
	}
	if (c - (2 * b - a) =< 0) {
		cout << (c - (2 * b - a) + 1000000007) % 1000000007;
	}
	else {
		cout <<( c - (2 * b - a))%1000000007;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:30: error: expected primary-expression before '<' token
   18 |         if (c - (2 * b - a) =< 0) {
      |                              ^
Language: Java

import java.math.BigInteger;
import java.util.Scanner;


public class App {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String x = sc.nextLine();
        int input = Integer.parseInt(x);

        
        BigInteger ten = new BigInteger("10");
        BigInteger nine = new BigInteger("9");
        BigInteger eight = new BigInteger("8");
        BigInteger wari = new BigInteger("1000000007");

        //BigDecimal tenBeki =  ten.pow(input);
        //BigDecimal nineBeki =  nine.pow(input).multiply(new BigDecimal(2));
        //BigDecimal eightBeki =  eight.pow(input);

        BigInteger answer = ten.pow(input).
        subtract(nine.pow(input).multiply(new BigInteger("2"))).add(eight.pow(input));
        answer = answer.remainder(wari);
        System.out.println(answer);
    }
}


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

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

int main() {
  long long int n;
  cin>>n;
  long long int res = 0;
  long long int q = pow(10, 9) + 7;
  res += pow(10, n)%q;
  res = res%q;
  res -= (2*pow(9, n))%q;
  res = res%q;
  res += pow(8, n)%q;
  res = res%q;
  cout<<res;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'long long int' to binary 'operator%'
    9 |   res += pow(10, n)%q;
      |          ~~~~~~~~~~^~
      |             |       |
      |             |       long long int
      |             __gnu_cxx::__promote<double>::__type {aka double}
a.cc:11:23: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'long long int' to binary 'operator%'
   11 |   res -= (2*pow(9, n))%q;
      |          ~~~~~~~~~~~~~^~
      |            |           |
      |            |           long long int
      |            __gnu_cxx::__promote<double>::__type {aka double}
a.cc:13:19: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'long long int' to binary 'operator%'
   13 |   res += pow(8, n)%q;
      |          ~~~~~~~~~^~
      |             |      |
      |             |      long long int
      |             __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define N 1000000007
using namespace std; 
 
long long exponentiation(long long base, long long exp) { 
    if (exp == 0) return 1; 
  	if (exp == 1) return base % N; 
  long long t = exponentiation(base, exp / 2); 
    t = (t * t) % N; 
    if (exp % 2 == 0) return t; 
  	else return ((base % N) * t) % N; 
} 
int main(){
	ll n;
	cin>>n;
	ll hasil=0;
	hasil=(hasil+exponentiation(10,n))%N;
	hasil=(hasil+N-2*(exponentiation(8,n)))%N;
	hsil=(hasil+exponentiation(8,n))%N;
	cout<<hasil<<'\n';
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'hsil' was not declared in this scope; did you mean 'hasil'?
   21 |         hsil=(hasil+exponentiation(8,n))%N;
      |         ^~~~
      |         hasil
Language: C++

#include<bits/stdc++.h>

using namespace std;

#define endl "\n"
#define lln long long int
#define IOS ios::sync_with_stdio(0);cin.tie(0);

const int MOD = 1e9 + 7;

int main(){
	IOS;

	int n;
	cin >> n;
	lln nine = 1, ten = 1,eig = 1;
	for(int i=0;i<n;i++){
		ten = (ten * 10) % MOD;
		nine = (nine * 9) % MOD;
		eig = (eig * 8) % MOD;
	}
	lln val = ((nine*2 - eig) % MOD;
	val = ((ten - val) % MOD);
	cout << val << endl;
	return 0;    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:40: error: expected ')' before ';' token
   22 |         lln val = ((nine*2 - eig) % MOD;
      |                   ~                    ^
      |                                        )
Language: C++

#include <cmath>
#include <iostream>
#include <string>
 
using namespace std;
 
int main(){
  long long n, a = 1000000007;
  cin >> n;
  
  cout << (n * (n - 1) * pow(10, n - 2)) % a << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:42: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'long long int' to binary 'operator%'
   11 |   cout << (n * (n - 1) * pow(10, n - 2)) % a << endl;
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
      |                        |                   |
      |                        |                   long long int
      |                        __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include<stdio.h>
#define mod 1000000007
#define ll long long
ll sp(ll a,ll b)
{
  ll c=1;
  while(a)
  {
    if(a&1){c*=b;c%=mod;}
    b*=b;
    b%=mod;
    a>>=1;
  }
  return c;
}
int main()
{
  ll n,ans;
  scanf("%lld",&n);
  if(n==1)ans=0;
  else if(n==2)ans=2;
  else {
    ans=(sp(n,10)%mod+sp(n,8)%mod-2*sp(n,9)%mod+mod+mod)%mod
  }
  printf("%lld\n",ans%mod);
}


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

#include <iostream>

using namespace std;

constexpr int Z = 1e9+7;

int mpow(int a, int x) {
    int r = 1;
    for (int i = 0; i < x; i++) {
        r = 1ll * r * a % Z;
    }
    return r;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);

    int n;
    cin >> n;

    cout << (0ll + pow(10, n) - pow(9, n) - pow(9, n) + pow(8, n) + 2 * Z) % Z << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:20: error: 'pow' was not declared in this scope; did you mean 'mpow'?
   22 |     cout << (0ll + pow(10, n) - pow(9, n) - pow(9, n) + pow(8, n) + 2 * Z) % Z << endl;
      |                    ^~~
      |                    mpow
Language: C++

#include <cmath>
#include <iostream>
#include <string>
 
using namespace std;
 
int main(){
  long long n;
  cin >> n;
  
  cout << (n * (n - 1) * pow(10, n - 2)) % 1000000007 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:42: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   11 |   cout << (n * (n - 1) * pow(10, n - 2)) % 1000000007 << endl;
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
      |                        |                   |
      |                        |                   int
      |                        __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int64_t n;
  cin>>n;
  int64_t a,b,c;
  a=1;
  b=2;
  c=1;
  for(int i=0;i<n;i++){
    a*=10;
    if(a>=1000000007){a%=1000000007;}
  }
  for (int i=0;i<n;i++){
    b*=9;
    if(b>=1000000007){b%=1000000007;}
  for (int i=0;i<n;i++){
    c*=8;
    if(b>=1000000007){b%=1000000007;}
    int64_t d=a-b+c;
    if(d>=1000000007){d%=1000000007;}
    cout<<d<<endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:23:4: error: expected '}' at end of input
   23 |   }
      |    ^
a.cc:14:24: note: to match this '{'
   14 |   for (int i=0;i<n;i++){
      |                        ^
a.cc:23:4: error: expected '}' at end of input
   23 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<stdio.h>
#define mod 1000000007
#define ll long long
ll sp(ll a,ll b)
{
  ll c=1;
  while(a)
  {
    if(a&1){c*=b;c%=mod;}
    b*=b;
    b%=mod;
    a>>=1;
  }
  return c;
}
int main()
{
  ll n,ans;
  scanf("%lld",&n);
  if(n==1)ans=0;
  else if(n==2)ans=2;
  else {
    ans=(sp(n,10)%mod+sp(n,8)%mod-2*sp(n,9)%mod+mod)%mod
  }
  printf("%lld\n",ans%mod);
}


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

#include <vector>
#include <algorithm>
using namespace std;
#define ll long long
int main() 
{
    ll n, ans = 1, nasi = 1, nasiz = 1;
    cin >> n;
    if(n == 1)
        cout << 0;
    else if(n == 2)
        cout << 2;
    else {
        for(ll i = 0; i < n; i++) {
            ans = ((ans * 10) % 1000000007);
        }
        for(ll i = 0; i < n; i++) {
            nasi = ((nasi * 8) % 1000000007);
        }
        for(ll i = 0; i < n; i++) {
            nasiz = ((nasiz * 9) % 1000000007);
        }
        ans = (ans - nasiz * 2 + nasi + 1000000007) % 1000000007;        
        cout << ans;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin >> n;
      |     ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <algorithm>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:10:9: error: 'cout' was not declared in this scope
   10 |         cout << 0;
      |         ^~~~
a.cc:10:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:9: error: 'cout' was not declared in this scope
   12 |         cout << 2;
      |         ^~~~
a.cc:12:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:24:9: error: 'cout' was not declared in this scope
   24 |         cout << ans;
      |         ^~~~
a.cc:24:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C

#include<stdio.h>
const long long = 1000000009; 
 


int main(){
    long long a,n,m=1;
    n=869121;
    a=n*(n-1);
    a=a%mod;
    for(int i=0;i<n;i++) m=(m*2)%mod;
    for(int i=1;i<=n-2;i++){
        a=a*8;
        a=a%mod;
    }
    printf("%lld\n",(a+m)%mod);

}



Compiler output:
main.c:2:17: error: expected identifier or '(' before '=' token
    2 | const long long = 1000000009;
      |                 ^
main.c:3:1: error: stray '\302' in program
    3 | <U+00A0>
      | ^~~~~~~~
main.c:6:4: error: stray '\302' in program
    6 | int<U+00A0>main(){
      |    ^~~~~~~~
main.c: In function 'main':
main.c:10:9: error: 'mod' undeclared (first use in this function)
   10 |     a=a%mod;
      |         ^~~
main.c:10:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  int n;
  if(n<2) return 0;
  long long mod = 1e9+7;
  long long res = ((n*(n-1)%mod) * (pow(10,n-2)%mod))%mod;
  cout<<res;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:48: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'long long int' to binary 'operator%'
    7 |   long long res = ((n*(n-1)%mod) * (pow(10,n-2)%mod))%mod;
      |                                     ~~~~~~~~~~~^~~~
      |                                        |        |
      |                                        |        long long int
      |                                        __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
 
int main () {
  int N;
  
  cin >> N;
  
  cout << powl(10, N) % (powl(10, 9) + 7) - powl(8, N) % (powl(10, 9) + 7) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: invalid operands of types 'long double' and 'long double' to binary 'operator%'
   10 |   cout << powl(10, N) % (powl(10, 9) + 7) - powl(8, N) % (powl(10, 9) + 7) << endl;
      |           ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
      |               |                      |
      |               long double            long double
a.cc:10:56: error: invalid operands of types 'long double' and 'long double' to binary 'operator%'
   10 |   cout << powl(10, N) % (powl(10, 9) + 7) - powl(8, N) % (powl(10, 9) + 7) << endl;
      |                                             ~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~
      |                                                 |                     |
      |                                                 long double           long double
Language: C

#include <stdio.h>
#include<limits.h>

int main(void) {

        int N;
      scanf("%d",&N);
    
    if(N>2){
      long int G = 1;
      
        for(int i=1;i<=N;i++){
        G *=10;
          if(G>=1000000007){
            G %=1000000007;
          }
      }
        
      long int P = 1;
      for (int j=1;j<=N;j++){
        P *=8;
          if(P>=1000000007){
            P %=1000000007;
        }
          
      }
      
     
    
    long int D =1;
    for (int l=1;l<=N;l++){
        D *=9;
         if (D>=1000000007){
            D %=1000000007;
        }
    
    }
    
    
    
    
      
    long int answer;
    answer = G-2*D+P;
    answer %= 1000000007;
      printf("%ld",answer);
    }
    else if(N==2){
        printf("2");
    }
    else {print("0");}
    

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:51:11: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   51 |     else {print("0");}
      |           ^~~~~
      |           printf
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)//iをaからn
#define per(i,a,n) for (int i=a-1;i>=n;i--)//iをnからa
#define db(x) cout << #x << " = " << x << endl
#define db2(x, y) cout << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")\n"; //デバッグ用
#define all(x) (x).begin(), (x).end()
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007 //10^9+7:合同式の法
 
 
//sort(all(a)); ソート
//sort(all(a),greater<int>()); 逆順ソート
 
int main() {
  long long int n;
  cin >>n;
  
  
  long long int all,not0,not9,not09;
  all=1;
  not0=1;
  not9=1;
  not09=1;
  rep(i,0,n){
  all*=10;
  not0*=9;
  not9*=9;
  not09*=8;
  (all+MOD)%=MOD;
  (not0+MOD)%=MOD;
  (not9+MOD)%=MOD;
  (not09+MOD)%=MOD;
  }
  long long int ans;
  ans=all-not0-not9+not09;
  cout<<(ans+MOD)%MOD<<endl;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:7: error: lvalue required as left operand of assignment
   30 |   (all+MOD)%=MOD;
      |   ~~~~^~~~~
a.cc:31:8: error: lvalue required as left operand of assignment
   31 |   (not0+MOD)%=MOD;
      |   ~~~~~^~~~~
a.cc:32:8: error: lvalue required as left operand of assignment
   32 |   (not9+MOD)%=MOD;
      |   ~~~~~^~~~~
a.cc:33:9: error: lvalue required as left operand of assignment
   33 |   (not09+MOD)%=MOD;
      |   ~~~~~~^~~~~
Language: C++


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

typedef unsigned long long ULLONG;
typedef long long LLONG;
static const LLONG MOD_NUM = 1000000007; //998244353;

template<class _T> static void get(_T& a) {
	std::cin >> a;
}
template<class _T> static void get(_T& a, _T& b) {
	std::cin >> a >> b;
}
template<class _T> static void get(_T& a, _T& b, _T& c) {
	std::cin >> a >> b >> c;
}
template <class _T> static _T tp_abs(_T a) {
	if (a < (_T)0) {
		a *= (_T)-1;
	}
	return a;
}

static void C();

int main()
{
	C();
	fflush(stdout);
	return 0;
}

static void C()
{
	LLONG N;
	get(N);

	LLONG ans = tp_modpow(10LL, N, MOD_NUM);
	ans = ans - ((tp_modpow(9LL, N, MOD_NUM) * 2LL) - tp_modpow(8LL, N, MOD_NUM));
	if (ans < 0LL) ans += MOD_NUM;
	printf("%lld\n", ans);
}


Compiler output:
a.cc: In function 'void C()':
a.cc:39:21: error: 'tp_modpow' was not declared in this scope
   39 |         LLONG ans = tp_modpow(10LL, N, MOD_NUM);
      |                     ^~~~~~~~~
Language: C++

#include<iostream>
#include <cmath>
using namespace std;
int main()
{
  int a;
  cin >> a;

  if(a >= 1) {
    cout << 0;
  }else if(a == 2){
    cout << 2;
  }
  
  int out = (2 * a * pow(10, a-2)) % (pow(10, 9) + 7); 
  cout << out;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:36: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   15 |   int out = (2 * a * pow(10, a-2)) % (pow(10, 9) + 7);
      |             ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
      |                    |                             |
      |                    |                             __gnu_cxx::__promote<double>::__type {aka double}
      |                    __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#include <cmath>
#define int long long
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
using namespace std;

int power(int x, int y, int p)  
{  
   int res = 1;     // Initialize result  
 
   x = x % p; // Update x if it is more than or  
               // equal to p
 
   if (x == 0) return 0; // In case x is divisible by p;
 
   while (y > 0)  
   {  
       // If y is odd, multiply x with result  
       if (y & 1)  
           res = (res*x) % p;  
 
       // y must be even now  
       y = y>>1; // y = y/2  
       x = (x*x) % p;  
   }  
   return res;  
}
int main()
{
   ll n,a,b,c;
   cin>>n;
   a = power(10,n,1000000007);
   a = (a - 2ll*power(9,n,1000000007))%(1000000007ll);
   a = (a + power(8,n,1000000007))%(1000000007ll);
   d1(a);
   return 0;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
a.cc: In function 'int main()':
a.cc:31:4: error: 'll' was not declared in this scope
   31 |    ll n,a,b,c;
      |    ^~
a.cc:32:9: error: 'n' was not declared in this scope; did you mean 'yn'?
   32 |    cin>>n;
      |         ^
      |         yn
a.cc:33:4: error: 'a' was not declared in this scope
   33 |    a = power(10,n,1000000007);
      |    ^
a.cc:36:4: error: 'd1' was not declared in this scope; did you mean 'y1'?
   36 |    d1(a);
      |    ^~
      |    y1
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>

using namespace std;
typedef long long ll; 
const ll  M = pow(10,9)+7;

int main(){
  ll N;
  cin >> N;
  vector<ll> fac(N+2);
  vector<ll> fac2(N+2);
  vector<ll> fac3(N+2);
  fac[0] = 1;
  fac2[0] = 1;
  fac3[0] = 1;
  for(ll i = 0; i<N+1; i++){
    fac[i+1] = fac[i]*8 % M;
    fac2[i+1] = fac2[i]*9 % M;
    fac3[i+1] = fac3[i]*10 % M;
  }
  cout << ((fac3[N]-fac[N])%M-2*(fac2[N]-fac[N])%M)%M << endl;
}


Compiler output:
a.cc:9:15: error: 'pow' was not declared in this scope
    9 | const ll  M = pow(10,9)+7;
      |               ^~~
Language: C++

#include<stdio.h>
#define mod 1000000007
#define ll long long
ll sp(ll a,ll b)
{
  ll c=1;
  while(a)
  {
    if(a&1){c*=b;c%=mod;}
    b*=b;
    b%=mod;
    a>>=1;
  }
  return c;
}
int main()
{
  ll n,ans;
  scanf("%lld",&n);
  if(n==1)ans=0;
  else if(n==2)ans=2;
  else {
    ans=(sp(n,10)-2*sp(n,9)+mod)%mod
      ans+=sp(n,8)%mod;
  }
  printf("%lld\n",ans%mod);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:7: error: expected ';' before 'ans'
   24 |       ans+=sp(n,8)%mod;
      |       ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  int n;
  if(n<2) return 0;
  long long mod = 1e9+7;
  long long res = ((n*(n-1)%mod) * (pow(10,n-2)%mod))%mod;
  return res;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:48: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'long long int' to binary 'operator%'
    7 |   long long res = ((n*(n-1)%mod) * (pow(10,n-2)%mod))%mod;
      |                                     ~~~~~~~~~~~^~~~
      |                                        |        |
      |                                        |        long long int
      |                                        __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  int n;
  if(n<2) return 0;
  int mod = 1e9+7;
  int res = ((n*(n-1)%mod) * (pow(10,n-2)%mod))%mod;
  return res;
}

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

MOD = 1000000007

def fpow(x, n):
    e = 1
    while n > 1:
        if n & 1: e = (e*x) % MOD
        x = (x*x) % MOD
        n >>=1
    return (x*e)%MOD

N = int(input())
print((fpow(10, N) - 2*fpow(9, N) + fpow(8, N))%MOD)

Compiler output:
a.cc:1:1: error: 'MOD' does not name a type
    1 | MOD = 1000000007
      | ^~~
Language: C++

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

int main() {
  int n;
  ll a;
  cin >> n;
  a = (n * (n-1)) % 1000000007
  for(int i=0;i<n-2;i++){
    a = (a * 10) % 1000000007
  }
  cout << a;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:31: error: expected ';' before 'for'
    9 |   a = (n * (n-1)) % 1000000007
      |                               ^
      |                               ;
   10 |   for(int i=0;i<n-2;i++){
      |   ~~~                          
a.cc:10:15: error: 'i' was not declared in this scope
   10 |   for(int i=0;i<n-2;i++){
      |               ^
Language: C++

#include <bits/stdc++.h>
#include<algorithm>
using namespace std;
#define ll long long 
const int MAX = 510000;
const ll mod = 1000000007;
int main() {
  ll n;
  cin >> n;
  ll cn;
  ll res;
  if(n==1){
    cout << 0;
  }else{
    ll total = 1;
    ll znai = 1;
    ll knai = 1;
    ll rnai = 1;
    for(int i = 0;i<n;i++){
      total *= 10;
      total %= mod;
      znai *= 9;
      znai %= mod;
      knai *= 9;
      knai %= mod;
      rnai *= 8;
      rnai %= mod;
    }
    
    res = total - znai -knai +rnai;
    res %= mod
       
    cout << res;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:15: error: expected ';' before 'cout'
   31 |     res %= mod
      |               ^
      |               ;
   32 | 
   33 |     cout << res;
      |     ~~~~
Language: C++

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

int main() {
  int n;
  ll a;
  cin >> n;
  a = (n * (n-1)) % (1000000007)
  for(int i=0;i<n-2;i++){
    a = (a * 10) % (1000000007)
  }
  cout << a;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:33: error: expected ';' before 'for'
    9 |   a = (n * (n-1)) % (1000000007)
      |                                 ^
      |                                 ;
   10 |   for(int i=0;i<n-2;i++){
      |   ~~~                            
a.cc:10:15: error: 'i' was not declared in this scope
   10 |   for(int i=0;i<n-2;i++){
      |               ^
Language: C++

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
constexpr ll INF = 1e18;
constexpr ll MOD = 1e9+7;

// https://qiita.com/drken/items/3b4fdf0a78e7a138cd9a
long long mod(long long val, long long m) {
  long long res = val % m;
  if (res < 0) res += m;
  return res;
}

int main(void) {
    ll N;
    cin >> N;
    ll all = 1;
    for (int i = 0; i < N; i++) {
        all = (all * 10) % MOD;
    }
    ll x9 = 1;
    for (int i = 0; i < N; i++) {
        x9 = (x9 * 9) % MOD;
    }
    ll x8 = 1;
    for (int i = 0; i < N; i++) {
        x8 = (x8 * 8) % MOD;
    }
    ll ans = mod(all - mod((((x9*2)%MOD) - x8), MOD), MOD)
    cout << ans << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:62:5: error: expected ',' or ';' before 'cout'
   62 |     cout << ans << endl;
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
 
int main(){
	long long n,ans=1,mod=1000000007;
  
  	cin>>n;
  
  	ans = (n*(n-1))/2
  	for(long long i=1;i<=n-2;++i){
      ans = (ans*10)%mod;
    }
  
  	cout<<ans;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: expected ';' before 'for'
    9 |         ans = (n*(n-1))/2
      |                          ^
      |                          ;
   10 |         for(long long i=1;i<=n-2;++i){
      |         ~~~               
a.cc:10:27: error: 'i' was not declared in this scope
   10 |         for(long long i=1;i<=n-2;++i){
      |                           ^
Language: C++

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

int M = 1000000007;

ll mpow(ll x, ll n){
    ll ans = 1;
    while(n != 0){
        if(n & 1) ans = ans * x % M;
        x = x*x % M;
        n = n >> 1;
    }
    return ans;
}


int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);


    ll n; cin >> n;
    cout << ll(mpow(10, n) - mpow(9, n)*2 + mpow(8, n)) << endl;


    return 0;
}


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

#include<iostream>
using namespace std;
 
int main(){
	long long n,ans=1,mod=1000000007;
  
  	cin>>n;
  
  	ans = (n*(n-1))/2
  	for(long long i=1;i<=n-2;++i){
      ans = (ans*10)%mod;
    }
  	for(long long i=1;i<=n;++i){
      ans = (ans*i)%mod;
    }
  	cout<<ans;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: expected ';' before 'for'
    9 |         ans = (n*(n-1))/2
      |                          ^
      |                          ;
   10 |         for(long long i=1;i<=n-2;++i){
      |         ~~~               
a.cc:10:27: error: 'i' was not declared in this scope
   10 |         for(long long i=1;i<=n-2;++i){
      |                           ^
Language: C++

#include<iostream>
#include<bits/stdc++.h>
#define mod 1000000007
using namespace std;
int main() {
	long long  n;
	cin>>n;
	long long ans=1,t=1,p=1;
	if(n==1)
    {
        cout<<0;
        return 0;
    }
	//ans=n%mod*(n-1)%mod;
	ans=1;
	;

	//cout<<ans;
	while(n)
    {

        ans=(ans%mod*10)%mod;
        t=(t%mod*9)%mod;
        p=(p%mod*8)%mod;
        //cout<<ans;
        n--;
    }
    ans

    cout<<((ans+p)%mod-(2*t)%mod)%mod;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:8: error: expected ';' before 'cout'
   28 |     ans
      |        ^
      |        ;
   29 | 
   30 |     cout<<((ans+p)%mod-(2*t)%mod)%mod;
      |     ~~~~
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
 
int main () {
  long int N;
  
  cin >> N;
  
  cout << (N * (N-1) * pow(9, (N-2))) % (pow(10, 9) + 7) << endl; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:39: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   10 |   cout << (N * (N-1) * pow(9, (N-2))) % (pow(10, 9) + 7) << endl;
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
      |                      |                              |
      |                      |                              __gnu_cxx::__promote<double>::__type {aka double}
      |                      __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include<iostream>
using namespace std;
 
int main(){
	long long a,ans=1,mod=1000000007;
  
  	cin>>a;
  
  	ans = (a*(a-1))/2
  	for(long long i=1;i<=n-2;++i){
      ans = (ans*10)%mod;
    }
  	for(long long i=1;i<=n;++i){
      ans = (ans*i)%mod;
    }
  	cout<<ans;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: expected ';' before 'for'
    9 |         ans = (a*(a-1))/2
      |                          ^
      |                          ;
   10 |         for(long long i=1;i<=n-2;++i){
      |         ~~~               
a.cc:10:27: error: 'i' was not declared in this scope
   10 |         for(long long i=1;i<=n-2;++i){
      |                           ^
a.cc:10:30: error: 'n' was not declared in this scope
   10 |         for(long long i=1;i<=n-2;++i){
      |                              ^
Language: C++

#include <bits/stdc++.h> 
using namespace std;
typedef long long ll;
ll n;
#define mod 1000000007
int main()
{
    cin>>n;
	if(n==1) cout<<1;
    else 
    {
      ll k1=(n-1)%mod;
      ll k2=n%mod;
      ll maxx=1;
      for(ll i=1; i<=n-2; i++)
      {
         maxx*=10;
         maxx%=mod
      }
      cout<<k1*k2*maxx%mod;
    }
      
	return 0;  
}

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

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

int main(){
long long a=1000000000+7;
long long n;
  cin >> n;
if(n==1) cout << 0 << endl;
if(n==2) cout << 2 << endl;
if(n>3){
long long s = (10<<(n-1))%a -(9<<(n-1))%a-(9<<(n-1))%a + (8<<(n-1))%a
cout << s << endl;


}  
}

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

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

#define mod 1000000007
int main()
{
    cin>>n;
	if(n==1) cout<<1;
    else 
    {
      ll k1=(n-1)%mod;
      ll k2=n%mod;
      ll maxx=1;
      for(int i=1; i<=n-2; i++)
      {
         maxx*=10;
         maxx%=mod
      }
      cout<<k1*k2*maxx%mod;
    }
      
	return 0;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |     cin>>n;
      |          ^
      |          yn
a.cc:11:7: error: 'll' was not declared in this scope
   11 |       ll k1=(n-1)%mod;
      |       ^~
a.cc:12:9: error: expected ';' before 'k2'
   12 |       ll k2=n%mod;
      |         ^~~
      |         ;
a.cc:13:9: error: expected ';' before 'maxx'
   13 |       ll maxx=1;
      |         ^~~~~
      |         ;
a.cc:16:10: error: 'maxx' was not declared in this scope
   16 |          maxx*=10;
      |          ^~~~
a.cc:19:13: error: 'k1' was not declared in this scope; did you mean 'y1'?
   19 |       cout<<k1*k2*maxx%mod;
      |             ^~
      |             y1
a.cc:19:16: error: 'k2' was not declared in this scope
   19 |       cout<<k1*k2*maxx%mod;
      |                ^~
a.cc:19:19: error: 'maxx' was not declared in this scope
   19 |       cout<<k1*k2*maxx%mod;
      |                   ^~~~
Language: C++

#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <bits/stdc++.h>

using namespace std;
using ll = long long;
ll gcd(ll a, ll b);
int main(){
cin.tie(0);
ll n,result=1,temp=1,ttemp=1;
cin>>n;
if(n==1)cout<<0;
else if(n==2)cout<<2;
else{
for(ll i=1;i<=n;i++){
    result*=10;
    result%=1000000007;
}
for(ll i=1;i<=n;i++){
    temp*=8;
    temp%=1000000007;
}
for(ll i=1;i<=n;i++){
    ttemp*=9;
    ttemp%=1000000007;
}
ttemp*=2;
ttemp%=1000000007;
result=result-ttemp
result%=1000000007;
result+=temp;
result%=1000000007;
if(result<0)result+=1000000007;
cout<<result;
}
return 0;
}






ll gcd(ll a, ll b){

   if (a%b == 0)
   {
       return(b);
   }
   else
   {
       return(gcd(b, a%b));
   }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:20: error: expected ';' before 'result'
   30 | result=result-ttemp
      |                    ^
      |                    ;
   31 | result%=1000000007;
      | ~~~~~~
Language: C++

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

int main()
{
 ll n;
 cin>>n;
 ll ans=1;
 if(n==1){
    cout<<0;
 }
 else
 {
     ll z=pow(2,n)%1000000007;
     cout<<z;
 }
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   15 |      ll z=pow(2,n)%1000000007;
      |           ~~~~~~~~^~~~~~~~~~~
      |              |     |
      |              |     int
      |              __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include <iostream>
#define int long long
#define IOS std::ios::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define mod 1000000007
#define lld long double
#define mii map<int, int>
#define mci map<char, int>
#define msi map<string, int>
#define pii pair<int, int>
#define ff first
#define ss second
#define all(x) (x).begin(), (x).end()
#define rep(i,x,y) for(int i=x; i<y; i++)
#define fill(a,b) memset(a, b, sizeof(a))
#define vi vector<int>
#define setbits(x) __builtin_popcountll(x)
#define w(x)  int x; cin>>x; while(x--)
using namespace std;
const long long N=100005, INF=2000000000000000000;
int32_t main()
{
    IOS;
    // pre();
    // fill(isprime,true);
    int n;
    cin>>n;
    if(n<2){
        cout<<0;
    }else{
        int ans = power(10,n,mod);
        ans-=power(8,n,mod);
        cout<<ans;
    }
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:31:19: error: 'power' was not declared in this scope
   31 |         int ans = power(10,n,mod);
      |                   ^~~~~
Language: C++

#include<iostream>
using namespace std;

int MOD = 1e9+7;

int fact(int n)
{
  if(n == 1 || n == 0)	return 1;
  else return (n * (fact(n-1)%MOD))%MOD;
}

int main()
{
  int n;
  cin >> n;
  cout << (fact(n)%MOD * (10*(N-2)))%MOD << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:31: error: 'N' was not declared in this scope
   16 |   cout << (fact(n)%MOD * (10*(N-2)))%MOD << endl;
      |                               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define PI 3.141592653589793
#define MOD 1000000007
#define rep(i, n) for (ll i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
typedef long long ll;
typedef long double ld;



int main(){
    ll N;
    cin >> N;
    ll sum = 1;
    ll diff = 1;
    ll over = 1;

    rep(i, N){
        sum *= 10;
        sum %= MOD;
    }

    rep(i, N){
        over *= 8;
        over %= MOD; 
    }    

    rep(i, N){
        diff *= 9;
        diff %= MOD; 
    }

    diff *= 2;
    diff %= MOD;

    ll ans = sum - diif + over;
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:20: error: 'diif' was not declared in this scope; did you mean 'diff'?
   37 |     ll ans = sum - diif + over;
      |                    ^~~~
      |                    diff
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<stack>
#include<set>
#include<iomanip>
#include<string.h>
#include<iterator>
#include<queue>
//#include<bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
#define ll long long
#define inf 244000000000000000
#define mod 1000000007
#define endl '\n'
int n;
ll fc[maxn];
ll qpow(ll base, ll n)
{
    ll res = 1;
    while (n)
    {
        if (n & 1)res =res*base%mod;
        base =base*base%mod;
        n >>= 1;
    }
    return res;
}
int main()
{
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    ll n;
    cin >> n;
    if (n <= 1) { puts("0"); return 0; }
    ll t = qpow(10, n);
    ll t2 = 2*qpow(9, n)%mod;
    ll t3 = qpow(8, n);
    ll ans = (t - t2 + mod) % mod;
    ans =(ans + t3)% mod;
    cout << ans << endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:42:25: error: expected '}' at end of input
   42 |     cout << ans << endl;
      |                         ^
a.cc:32:1: note: to match this '{'
   32 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int64_t n;
  cin>>n;
  int64_t x=2;
  if(n==1){cout<<"0"<<endl;}
  else if(n==2){cout<<"2"<<endl;}
  else{
    for (int i=3;i<=n;i++){
    x*=i*10;
    if(x>=1000000007){x%=1000000007;}
      cout<<x<<endl;
  }
  }

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

#include<stdio.h>

int main (void){
  int  N;
  scanf("%d",&N);
  int G = 1;
  for(int i=1;i<=N;i++){
    G *=10;
      if(G>=10000000000){
        G %=1000000007;
      }
  }
  int P = 1;
  for int j=1;j<=N;j++){
    P *=8;
      if(P>=10000000000){
        P %=1000000007;
    }
      
  }
  
  int answer 
    answer =G-P
  printf("%d",G-P);
  
}

Compiler output:
main.c: In function 'main':
main.c:14:7: error: expected '(' before 'int'
   14 |   for int j=1;j<=N;j++){
      |       ^~~
      |       (
main.c:14:15: error: 'j' undeclared (first use in this function)
   14 |   for int j=1;j<=N;j++){
      |               ^
main.c:14:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:23: error: expected ';' before ')' token
   14 |   for int j=1;j<=N;j++){
      |                       ^
      |                       ;
main.c:14:23: error: expected statement before ')' token
main.c:23:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'answer'
   23 |     answer =G-P
      |     ^~~~~~
main.c:23:5: error: 'answer' undeclared (first use in this function)
main.c:23:16: error: expected ';' before 'printf'
   23 |     answer =G-P
      |                ^
      |                ;
   24 |   printf("%d",G-P);
      |   ~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <atcoder/all>
#define FOR(i, a, n) for(int (i) = (int)(a); (i) < (int)(n); ++(i))
#define FORe(i, a, n) for(int (i) = (int)(a); (i) <= (int)(n); ++(i))
#define rFOR(i, a, n) for(int (i) = (int)(n)-1; (i) >= (int)(a); --(i))
#define rFORe(i, a, n) for(int (i) = (int)(n); (i) >= (int)(a); --(i))
#define REP(i, n) FOR((i), 0, (n))
#define REPe(i, n) FORe((i), 1, (n))
#define REPo(i, n) FORe((i), 0, (n))
#define rREP(i, n) rFOR((i), 0, (n))
#define rREPe(i, n) rFORe((i), 1, (n))
#define rREPo(i, n) rFORe((i), 0, (n))
#define rep(i, n) FOR((i), 0, (n))
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define fi first
#define se second
#define dup(x, y) (((x)+(y)-1)/(y))
#define vc(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
using namespace atcoder;
using ll = long long;
using ull = unsigned long long;
using P = pair<int,int>;
using pll = pair<ll,ll>;
using T = tuple<int,int,int>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vs = vector<string>;
using vp = vector<P>;
using vt = vector<T>;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

// auto mod int
const int mod = 1000000007;
// const int mod = 998244353;
struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x((x%mod+mod)%mod){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;}
  mint operator+(const mint a) const { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= a;}
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const { return pow(mod-2);}
  mint& operator/=(const mint a) { return *this *= a.inv();}
  mint operator/(const mint a) const { return mint(*this) /= a;}
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}

int main() {
  ll n;
  cin>>n;
  mint ans = 1;
  mint t9 = 1;
  mint t8 = 1;
  REP(i, n) {
    ans *= 10;
    t9 *= 9;
    t8 *= 8;
  }
  t9 *= 2;
  ans -= t9;
  ans += t8;
  cout << ans << endl;

  return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define INF (1<<29)
#define LINF (1LL<<60)
#define EPS (1e-10)
#define PI 3.1415926535897932384626433832795028
#define all(a) (a).begin(),(a).end()
#define sz(x) (int)x.size()
#define max_heap priority_queue<int>
#define min_heap priority_queue<int,vector<int>,greater<int>>
using ll = long long;
#define int long long
#define endl "\n"
#define vi vector<int>
#define pb push_back
#define inp_arr(a,n) for(ll i=0;i<n;i++)cin>>a[i];
#define out_arr(a) for(ll i=0;i<a.size();i++)cout<<a[i]<<" ";
#define deb(n) cerr << #n << " = " << n << "\n";
int gcd(int a, int b) { if (a == 0) return b; return gcd(b % a, a);}
ll mypower(ll x,ll n,ll c){
    if(n == 0)
        return 1;
    ll temp = mypower(x,n/2,c)%c;
    if(n%2)
        return (n<0)? (1/x)*temp*temp%c: ((x*temp)%c)*temp%c;
    else
        return temp*temp%c;
}
bool codejam = 0;

int32_t main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
	#ifndef ONLINE_JUDGE
		freopen("input.txt","r",stdin);
		freopen("output.txt","w",stdout);
	#endif

	ll n;
	cin>>n;
	ll ans = 0;
	ans += 2*(mypower(10,n,MOD)%MOD-mypower(9,n,MOD))%MOD;
	ans %=MOD:
	ans -= mypower(10,n,MOD)%MOD-mypower(8,n,MOD)%MOD;
	ans%=MOD;
	cout<<ans%MOD<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:45:18: error: expected ';' before ':' token
   45 |         ans %=MOD:
      |                  ^
Language: C++

#include<stdio.h>

int main(){
  long k=1000000007
  long n;
  scanf("%ld",&n);
  
  long ans;
  long a10=1;
  long a8=1;
  
  for(int i=1;i<=n;i++){
    a10*=10;
    a10%=k;
    a8*=8;
    a8%=k;
  }
  
  ans=a10-a8;
  if(ans<0){
    ans+=k;
  }
  printf("%ld",ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: expected ',' or ';' before 'long'
    5 |   long n;
      |   ^~~~
a.cc:6:16: error: 'n' was not declared in this scope
    6 |   scanf("%ld",&n);
      |                ^
Language: C++

#include<stdio.h>
#define mod 1e9+7
#define ll long long
ll sp(ll a,ll b)
{
  ll c=1;
  while(a)
  {
    if(a&1){c*=b;c%=mod;}
    b*=b;
    b%=mod;
    a>>=1;
  }
  return c;
}
int main()
{
  ll n,ans;
  scanf("%lld",&n);
  if(n==1)ans=0;
  else if(n==2)ans=2;
  else {
    ans=sp(n,9)+(((sp(n-2,9)*(n-1))%mod)*(n-2))%mod;
  }
  printf("%lld\n",ans%mod);
}

Compiler output:
a.cc: In function 'long long int sp(long long int, long long int)':
a.cc:9:19: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
    9 |     if(a&1){c*=b;c%=mod;}
      |                   ^
a.cc:9:19: note:   in evaluation of 'operator%=(long long int, double)'
a.cc:11:6: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   11 |     b%=mod;
      |      ^
a.cc:11:6: note:   in evaluation of 'operator%=(long long int, double)'
a.cc: In function 'int main()':
a.cc:23:36: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   23 |     ans=sp(n,9)+(((sp(n-2,9)*(n-1))%mod)*(n-2))%mod;
      |                   ~~~~~~~~~~~~~~~~~^
      |                             |
      |                             long long int
a.cc:25:22: error: invalid operands of types 'long long int' and 'double' to binary 'operator%'
   25 |   printf("%lld\n",ans%mod);
      |                   ~~~^
      |                   |
      |                   long long int