Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for(ll i = 0; i < (n); ++i)
#define FOR(i, m, n) for(ll i = m; i < (n); i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
using vi = vector<int>;
using vii = vector<vi>;
using pii = pair<int, int>; 
using vl = vector<ll>;
using vll = vector<vl>;
using pll = pair<ll, ll>;

const int MAX = 610000;
const int MOD = 1000000007;

ll fac[MAX], finv[MAX], inv[MAX];

void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    FOR(i, 2, MAX){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

ll COM(ll n, ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

ll modpow(ll a, ll n){
    ll res = 1;
    while(n > 0){
        if(n & 1) res = res * a % MOD;
        a = a * a % MOD;
        n >>= 1;
    }
    return res;
}

ll modinv(ll a){
    return modpow(a, MOD - 2);
}

int main() {
    ll N;
    cin >> N;
    ll ten = 1, eight = 1, nine = 1;
    rep(i, N){
        ten *= 10;
        ten %= MOD;
        eight *= 8;
        eight %= MOD;
        nine *= 9;
        nine %= MOD;
    }
    nine = nine*2 % MOD;
    ll ans = (ten-nine) % MOD;
    ans = (ans + eight) % MOD;
    #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for(ll i = 0; i < (n); ++i)
#define FOR(i, m, n) for(ll i = m; i < (n); i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
using vi = vector<int>;
using vii = vector<vi>;
using pii = pair<int, int>; 
using vl = vector<ll>;
using vll = vector<vl>;
using pll = pair<ll, ll>;

const int MAX = 610000;
const int MOD = 1000000007;

ll fac[MAX], finv[MAX], inv[MAX];

void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    FOR(i, 2, MAX){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

ll COM(ll n, ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

ll modpow(ll a, ll n){
    ll res = 1;
    while(n > 0){
        if(n & 1) res = res * a % MOD;
        a = a * a % MOD;
        n >>= 1;
    }
    return res;
}

ll modinv(ll a){
    return modpow(a, MOD - 2);
}

int main() {
    ll N;
    cin >> N;
    ll ten = 1, eight = 1, nine = 1;
    rep(i, N){
        ten *= 10;
        ten %= MOD;
        eight *= 8;
        eight %= MOD;
        nine *= 9;
        nine %= MOD;
    }
    nine = nine*2 % MOD;
    ll ans = (ten-nine) % MOD;
    ans = (ans + eight) % MOD;
    #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for(ll i = 0; i < (n); ++i)
#define FOR(i, m, n) for(ll i = m; i < (n); i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
using vi = vector<int>;
using vii = vector<vi>;
using pii = pair<int, int>; 
using vl = vector<ll>;
using vll = vector<vl>;
using pll = pair<ll, ll>;

const int MAX = 610000;
const int MOD = 1000000007;

ll fac[MAX], finv[MAX], inv[MAX];

void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    FOR(i, 2, MAX){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

ll COM(ll n, ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

ll modpow(ll a, ll n){
    ll res = 1;
    while(n > 0){
        if(n & 1) res = res * a % MOD;
        a = a * a % MOD;
        n >>= 1;
    }
    return res;
}

ll modinv(ll a){
    return modpow(a, MOD - 2);
}

int main() {
    ll N;
    cin >> N;
    ll ten = 1, eight = 1, nine = 1;
    rep(i, N){
        ten *= 10;
        ten %= MOD;
        eight *= 8;
        eight %= MOD;
        nine *= 9;
        nine %= MOD;
    }
    nine = nine*2 % MOD;
    ll ans = (ten-nine) % MOD;
    ans = (ans + eight) % MOD;
    ans = (ans+MOD) % MOD;
    cout << ans;
}

    cout << ans;
}

    
    cout << ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:85:16: error: a function-definition is not allowed here before '{' token
   85 | void COMinit() {
      |                ^
a.cc:96:19: error: a function-definition is not allowed here before '{' token
   96 | ll COM(ll n, ll k){
      |                   ^
a.cc:102:22: error: a function-definition is not allowed here before '{' token
  102 | ll modpow(ll a, ll n){
      |                      ^
a.cc:112:16: error: a function-definition is not allowed here before '{' token
  112 | ll modinv(ll a){
      |                ^
a.cc:116:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
  116 | int main() {
      |         ^~
a.cc:116:9: note: remove parentheses to default-initialize a variable
  116 | int main() {
      |         ^~
      |         --
a.cc:116:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:116:12: error: a function-definition is not allowed here before '{' token
  116 | int main() {
      |            ^