Language: C++

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

typedef vector<int> vi;
typedef pair<int,int> ii;
typedef long long int ll;
typedef unsigned long long int ull;
#define inf INT_MAX
#define minf INT_MIN
#define watch(x)	cout<<(#x)<<"=>"<<x<<'\n';
#define sz(a) (int)(a).size()
#define all(x) x.begin(),x.end()
#define MOD 1000000007 

ll ans;
int arr[300009];
vi vr;
void solve()
{
    int n;  cin>>n;
    ans = n;
    ans = ans * (n-1);
    ans = ans % MOD;
    for(int i = 2; i < n; ++i){
        ans = ((ans)*10)%MOD;
    }
    cout<<ans;

    cout<<'\n';
}

void sol(){
    int n;  cin>>n;
    ll tenn =1, ninen =1, aten = 1;

    for(int i = 0; i < n; ++i){
        tenn *= 10;
        tenn %= MOD;
        ninen *= 9;
        ninen %= MOD;
        aten *= 8;
        aten %= MOD;
    }
    ninen *= 2;
    ninen %= MOD;
    ans = (tenn - ninen) % MOD;
    if(ans < 0) ans += MOD;
    ans = (ans + aten) % MOD;
    cout<<ans;

}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int testc;  testc = 1;
    for(int t = 0; t < testc; ++t){
        sol();
    }
    return 0;
}

	//Sun 13 Sep 2020 05:46:43 PM IST


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

typedef vector<int> vi;
typedef pair<int,int> ii;
typedef long long int ll;
typedef unsigned long long int ull;
#define inf INT_MAX
#define minf INT_MIN
#define watch(x)	cout<<(#x)<<"=>"<<x<<'\n';
#define sz(a) (int)(a).size()
#define all(x) x.begin(),x.end()
#define MOD 1000000007 

ll ans;
int arr[300009];
vi vr;
void solve()
{
    int n;  cin>>n;
    ans = n;
    ans = ans * (n-1);
    ans = ans % MOD;
    for(int i = 2; i < n; ++i){
        ans = ((ans)*10)%MOD;
    }
    cout<<ans;

    cout<<'\n';
}

void sol(){
    int n;  cin>>n;
    ll tenn =1, ninen =1, aten = 1;

    for(int i = 0; i < n; ++i){
        tenn *= 10;
        tenn %= MOD;
        ninen *= 9;
        ninen %= MOD;
        aten *= 8;
        aten %= MOD;
    }
    ninen *= 2;
    ninen %= MOD;
    ans = (tenn - ninen) % MOD;
    if(ans < 0) ans += MOD;
    ans = (ans + aten) % MOD;
    cout<<ans;

}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int testc;  testc = 1;
    for(int t = 0; t < testc; ++t){
        sol();
    }
    return 0;
}

	//Sun 13 Sep 2020 05:46:43 PM IST


		/***astrainL3gi0N***/


Compiler output:
a.cc:83:4: error: redefinition of 'll ans'
   83 | ll ans;
      |    ^~~
a.cc:15:4: note: 'll ans' previously declared here
   15 | ll ans;
      |    ^~~
a.cc:84:5: error: redefinition of 'int arr [300009]'
   84 | int arr[300009];
      |     ^~~
a.cc:16:5: note: 'int arr [300009]' previously declared here
   16 | int arr[300009];
      |     ^~~
a.cc:85:4: error: redefinition of 'vi vr'
   85 | vi vr;
      |    ^~
a.cc:17:4: note: 'vi vr' previously declared here
   17 | vi vr;
      |    ^~
a.cc:86:6: error: redefinition of 'void solve()'
   86 | void solve()
      |      ^~~~~
a.cc:18:6: note: 'void solve()' previously defined here
   18 | void solve()
      |      ^~~~~
a.cc:100:6: error: redefinition of 'void sol()'
  100 | void sol(){
      |      ^~~
a.cc:32:6: note: 'void sol()' previously defined here
   32 | void sol(){
      |      ^~~
a.cc:121:5: error: redefinition of 'int main()'
  121 | int main()
      |     ^~~~
a.cc:53:5: note: 'int main()' previously defined here
   53 | int main()
      |     ^~~~