Problem:


Score : 300 points

Problem Statement

How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions?

0 \leq A_i \leq 9

There exists some i such that A_i=0 holds.

There exists some i such that A_i=9 holds.

The answer can be very large, so output it modulo 10^9 + 7.

Constraints

1 \leq N \leq 10^6

N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

Print the answer modulo 10^9 + 7.

Sample Input 1

2

Sample Output 1

2

Two sequences \{0,9\} and \{9,0\} satisfy all conditions.

Sample Input 2

1

Sample Output 2

0

Sample Input 3

869121

Sample Output 3

2511445



Sample input:
2


Sample output:
2

Submission status: Wrong Answer

Solution code:
N = int(input())
mod = 10**9+7

ans = pow(10, N, mod) - 2*pow(9, N, mod) + pow(8, N, mod)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 10**9+7
print(10**n%mod - 2*(9**n%mod)%mod + 8**n%mod)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 10**9+7
print(pow(10,n,mod)-pow(9,n,mod)*2%mod+pow(8,n,mod))

Submission status: Wrong Answer

Solution code:
n = int(input())

MOD = 10**9 + 7

print(pow(10, n, MOD)-pow(9, n, MOD) - pow(9, n, MOD) + pow(8, n, MOD))

Submission status: Wrong Answer

Solution code:
n = int(input())

MOD = 10**9 + 7

print(pow(10, n, MOD)-2*pow(9, n, MOD) + pow(8, n, MOD))

Submission status: Wrong Answer

Solution code:
N = int(input())
print(pow(10, N, mod=1000000007) - pow(9, N, mod=1000000007) - pow(9, N, mod=1000000007) + pow(8, N, mod=1000000007))

Submission status: Wrong Answer

Solution code:
N = int(input())
print((10 ** N - 8 ** N) % (10 ** 9 + 7))

Submission status: Wrong Answer

Solution code:
n = int(input())
mod= 10 ** 9 + 7
ans = (2*(10**n-9**n))-(10**n-8**n)%mod
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=n*(n-1)//2
z=2*a
mm=(n-2)**10
ans=mm*z//(10**9+7)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = (10**n-2*(9**n)-8**n)//1000000007
print(10**n-2*(9**n)-8**n)

Submission status: Wrong Answer

Solution code:
n = int(input())
print(10**n-2*(9**n)-8**n)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = (10**9)+7
ans = (10**n)%mod - (2*(9**n)-8**n)%mod
print(ans)

Submission status: Wrong Answer

Solution code:
mod = 1000000007
def f(a, b):
  ans = 1
  while b:
    ans = ans * a % mod
    b >>= 1
    a = a * a % mod
  return ans
n=int(input())
print(((f(10,n)-2*f(9,n)+f(8,n))%mod+mod)%mod)

Submission status: Wrong Answer

Solution code:
seq = int(input())
answer = 10**seq - 2*9**seq + 8**seq
print(answer)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 7+10**9
a = 10**n % mod
b = 9**n % mod
c = 8**n % mod
print(a - 2*b + c)

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

sys.setrecursionlimit(10**7)

ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

def modpow(n, p, m):
    if p == 0:
        return 1
    if p % 2 == 0:
        t = modpow(n, p // 2, m)
        return t * t % m
    return n * modpow(n, p - 1, m) % m

n = ni()

A = modpow(9, n, mod)
B = A
C = modpow(8, n, mod)
D = modpow(10, n, mod)

ans = D - A - B + C

print(ans)

Submission status: Wrong Answer

Solution code:
num = int(input())

print(2**num - 2)

Submission status: Wrong Answer

Solution code:
MOD=10**9+7
N=int(input())
ans=pow(10,N,MOD)
ans-=2*pow(9,N,MOD)
ans+=pow(8,N,MOD)
print(ans)

Submission status: Wrong Answer

Solution code:
mod = pow(10, 7) + 7
def powmod(x, y):
    res = 1
    for i in range(y):
        res = res * x % mod
    return res


n = int(input())
ans = powmod(10, n) - powmod(9, n) - powmod(9, n) + powmod(8, n)
ans %= mod
ans = (ans + mod) % mod
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
m = 10**9 +7
result = pow(10,N,m) - 2*pow(9,N,m) + pow(8,N,m)
print(result)

Submission status: Wrong Answer

Solution code:
def modpow(a, n, mod):
    res = 1
    while n:
        if n % 2:
            res = res * a % mod
        a = a * a % mod
        n >>= 1
    return res


MOD = 1000000007

n = int(input())
ans = modpow(10, n, MOD) - 2 * modpow(9, n, MOD) + modpow(8, n, MOD)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
MOD = int(1e9 + 7)

a, b, c = 1, 1, 1

for i in range(n):
    a *= 10;
    b *= 18;
    c *= 8;
    a %= MOD;
    b %= MOD;
    c %= MOD;
    
print((a - b + c) % MOD);

Submission status: Wrong Answer

Solution code:
n = int(input())
MOD = int(1e9 + 7)

cnt = n * (n - 1) % MOD

for i in range(n - 2):
    cnt *= 10
    cnt %= MOD
print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
MOD = int(1e9 + 7)

cnt = n * (n - 1) % MOD

for i in range(n - 2):
    cnt *= 9
    cnt %= MOD

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 10**9+7

ans = pow(10,n,mod)
ans += pow(9,n,mod)*2
ans -= pow(8,n,mod)

print(ans%mod)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 10**9+7

ans = pow(10,n)
ans += pow(9,n)*2
ans -= pow(8,n)

print(ans%mod)

Submission status: Wrong Answer

Solution code:
N = int(input())

mod = 10**9+7
def p(a,n):
    ans  = 1
    for i in range (n):
        ans = ans * a % mod
    return ans

print(p(10,N)+p(8,N) - 2* p(9,N))

Submission status: Wrong Answer

Solution code:
def main():
  N=int(input())
  m=int(1e9+7)
  print(pow(10,N,m)-pow(9,N,m)-pow(9,N,m)+pow(8,N,m))
if __name__=='__main__':
  main()

Submission status: Wrong Answer

Solution code:
n=int(input())
a=(2**n)%1000000007
print(a)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n == 1:
    print(0)
elif n == 2:
    print(2)
else:
    x = (10 ** 9) + 7
    a = (10 ** n) % x
    b = (9 ** n) % x
    c = (8 ** n) % x
    y = a - b * 2 + c
    if y < 0:
        y += x
    print(y)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
a = pow(10, n, 10**9+7)
b = pow(9, n, 10**9+7)
c = pow(9, n, 10**9+7)
d = pow(8, n, 10**9+7)
print((a-b-c+d) % 10**9+7)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 10**9+7
print(pow(10, n, mod) - (pow(9, n, mod) + pow(9, n, mod)) + pow(8, n, mod))

Submission status: Wrong Answer

Solution code:
N=int(input())
MOD=10**9+7
MAX=N+1
def powermod(base,ind):
  if ind==1:
    return base
  elif ind%2==0:
    return (powermod(base,ind//2)**2)%MOD
  else:
    return ((powermod(base,ind//2)**2)*base)%MOD

print(powermod(10,N)-2*powermod(9,N)+powermod(8,N))

Submission status: Wrong Answer

Solution code:
N=int(input())
MOD=10**9+7
MAX=N+1
def powermod(base,ind):
  powls=[0 for i in range(MAX)]
  powls[0]=1
  if powls[ind]!=0:
    return powls[ind]
  elif ind%2==0:
    p=(powermod(base,ind//2)**2)%MOD
    powls[ind]=p
    return p
  else:
    p=(powermod(base,ind-1)*base)%MOD
    powls[ind]=p
    return p

print(powermod(10,N)-2*powermod(9,N)+powermod(8,N))

Submission status: Wrong Answer

Solution code:
N=int(input())
MOD=10**9+7
MAX=N+1
def powermod(base,p):
  powls=[0 for i in range(MAX)]
  powls[0]=1
  if powls[p]!=0:
    return powls[p]
  elif p%2==0:
    return (powermod(base,p//2)**2)%MOD
  else:
    return (powermod(base,p-1)*base)%MOD

print(powermod(10,N)-2*powermod(9,N)+powermod(8,N))

Submission status: Wrong Answer

Solution code:
import math


num=int(input())

if num== 1:
  	print("0")
else: 
	combination=math.factorial(num) //math.factorial(num-2)*8**(num-2)
	print(combination%(10**9+7))

Submission status: Wrong Answer

Solution code:
n=int(input())
ans = ((10**n)%(10**9+7) - (2*(9**n) - 8**n)%(10**9+7)%(10**9+7))
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
mod = 10**9+7
print(pow(10,N,mod) - 2 * pow(9,N,mod) + pow(8,N,mod))

Submission status: Wrong Answer

Solution code:
n = int(input())
MOD = 10 ** 9 + 7

ans = pow(10, n, MOD) - 2 * pow(9, n, MOD) + pow(8, n, MOD)
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())

print(10**N-2*9**N+8**N)

Submission status: Wrong Answer

Solution code:
n=int(input())
mod=10**9+7

print(pow(10,n,mod)-pow(9,n,mod)-pow(9,n,mod)+pow(8,n,mod))

Submission status: Wrong Answer

Solution code:
n = int(input())
state = 1
mod = 10**9 + 7
for _ in range(n-2):
  state *= 10
  state %= mod

ans = n*(n-1)*state
ans %= mod
print(ans)

Submission status: Wrong Answer

Solution code:
from math import comb

if __name__=="__main__":
  N=int(input())
  if N<2:
    print(0)
  else:
    print(comb(N,2)%(10**9+7))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin
input = stdin.readline

def main():
    p = 10**9+7
    n = int(input().strip())
    if 1 < n:
        print((n-1)*n)
    else:
        print(0)
    

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
p = 10**9+7
print(pow(10, n, p) - 2*pow(9, n, p) + pow(8, n, p))

Submission status: Wrong Answer

Solution code:
mod=10**9 + 7
n=int(input())
print(pow(10,n,mod)-pow(8,n,mod))

Submission status: Wrong Answer

Solution code:
N=int(input())
print((10**N-2*9*N+8**N)%(10**9+7))

Submission status: Wrong Answer

Solution code:
N=int(input())
mod=10**9+7
print(pow(10,N,mod)-pow(9,N,mod)*2+pow(8,N,mod))

Submission status: Wrong Answer

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    N = int(readline())
    K = int(1e9) + 7
    ans = pow(10, N, K) - pow(9, N, K) - pow(9, N, K) + pow(8, N, K)
    print(ans)
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
mod=10^9+7
ans = pow(10,n,mod)
ans =- pow(2*9,n,mod)
ans =+ pow(8,n,mod)
print(ans%mod)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod=10**9+7
ans = pow(10,n,mod)
ans =- pow(9,n,mod)*2
ans =+ pow(8,n,mod)
print(ans%mod)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod=10**9+7
ans = pow(10,n,mod)
ans =- pow(2*9,n,mod)
ans =+ pow(8,n,mod)
print(ans%mod)

Submission status: Wrong Answer

Solution code:
x=int(input())
y=10^x- 9^x -9^x-8^x
print(y)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 1
ans2 = 1
mod = 1000000007
for i in range(n):
	ans = (ans*10)%mod
	ans2 = (ans2*8)%mod
ans = (ans - ans2 + mod)%mod
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

mod = 10**9+7
if n == 1: print(0)
else: print(pow(10,n,mod) - pow(9,n,mod) - pow(9,n,mod) + pow(8,n,mod))

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 10**9+7

def pow(n, num):
  s = num
  for i in range(1,num):
    s = s*n%mod
  return s
print((pow(n,10) - 2*pow(n,9) + pow(n,8))%mod)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 10**9+7

def pow(n, num):
  s = num
  for i in range(1,num):
    s = s*num%mod
  return s
print((pow(n,10) - 2*pow(n,9) + pow(n,8))%mod)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 10**9+7

def pow(n, num):
  s = num
  for i in range(1,num):
    s += s*num%mod
  return s
print((pow(n,10) - 2*pow(n,9) + pow(n,8))%mod)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 10**9+7

def pow(n, num):
  s = num
  for i in range(1,num):
    s = s*num%mod
    return s
print((pow(n,10) - 2*pow(n,9) + pow(n,8))%mod)

Submission status: Wrong Answer

Solution code:
N=int(input());M=10**9+7
print(pow(10,N,M)-2*pow(9,N,M)+pow(8,N,M))

Submission status: Wrong Answer

Solution code:
n = int(input())
if n==1:
	print(0)
elif n==2:
	print(2)
else:
	com = (n-1)*(n)*((8)**(n-2))
	res = (com)
	mod = (10**9) + 7
	answer = res % mod
	print(answer)

Submission status: Wrong Answer

Solution code:
N=int(input()) #標準入力
zero_nine=N*(N-1) #N個の中からどれを0と9に選出するか？
other_numbers=10**(N-2) #0と9以外の要素の選び方は？
if other_numbers<=1:
    answer=zero_nine
else:
    answer = zero_nine*other_numbers
warukazu=10**9+7
print(int(answer%warukazu))

Submission status: Wrong Answer

Solution code:
n=int(input())
mod=10**9+7
ans=pow(10,n,mod)
ans-=pow(9,n,mod)*2
ans+=pow(8,n,mod)
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=10**n-2*9**n+8**n
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
m=1000000007
print((pow(10,n,m)-2*pow(9,n,m)+pow(8,n,m)))

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = (9**N - 2*8**N + 7**N)%(10**9+7)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
m = 10**9+7
ans = pow(10,n,m)
ans-=pow(9,n,m)*2
ans+=pow(8,n,m)
print(ans)

Submission status: Wrong Answer

Solution code:
#                               #
    # author : samars_diary #
    # 16-09-2020 │ 18:28:11 #
#                               #

import sys, os.path, math

#if(os.path.exists('input.txt')):
    #sys.stdin = open('input.txt',"r")
    #sys.stdout = open('output.txt',"w")

sys.setrecursionlimit(10 ** 5)

def mod(): return 10**9+7
def i(): return sys.stdin.readline().strip()
def ii(): return int(sys.stdin.readline())
def li(): return list(sys.stdin.readline().strip())
def mii(): return map(int, sys.stdin.readline().split())
def lii(): return list(map(int, sys.stdin.readline().strip().split()))

#print=sys.stdout.write

def solve():
    a=ii();print(pow(10,a,mod())+pow(8,a,mod())-2*pow(9,a,mod()))
for _ in range(1):
    solve()

Submission status: Wrong Answer

Solution code:
mod = 10**9+7
n = int(input())

ans = int((n*(n-1)* 10**(n-2))) %  mod
print(ans)

Submission status: Wrong Answer

Solution code:
i = int(input())
print(i, (10**i - 9**i - 9**i + 8**i) % (10**9 + 7))

Submission status: Wrong Answer

Solution code:
#ABC178C

N = int(input())

def Caculation(N):
    combination = 4 * (9**(N-2))
    ans = combination % (10**9 + 7)
    print(ans)

if N <= 1:
    print(0)
else:
    Caculation(N)

Submission status: Wrong Answer

Solution code:
N=int(input())

#Ai=0を含まない...9^N
#Ai=9を含まない...9^N
#Ai=0,Ai=9を含まない...8^N
#全てで10^N通り
#Ai=0,Ai=9の少なくとも一方が存在しない 9^N+9^N-8^N
#答は10^N-9^N-9^N+8^N

A=10**N
B=9**N
C=8**N

A=A%(10**9+7)
B=B%(10**9+7)
C=C%(10**9+7)

print(A-B*2+C)

Submission status: Wrong Answer

Solution code:
MOD = 10**9 + 7
n = int(input())
print(pow(10, n, MOD) - 2*pow(9, n, MOD) + pow(8,n,MOD))

Submission status: Wrong Answer

Solution code:
"""AtCoder Beginner Contest 178.

C
"""

import sys


def input() -> str:  # noqa: A001
    """Input."""
    return sys.stdin.readline()[:-1]


def main():
    """Run."""
    mod = 1000000007
    n = int(input())

    ans = 0

    if n <= 1:
        ans = 0
    elif n == 2:
        ans = 2
    else:
        ans = 10**n
        ans -= 8**n
        ans -= 8**n
        ans += 7**n

    print(ans % mod)


main()

Submission status: Wrong Answer

Solution code:
N = int(input())

mod = 10**9 + 7
print(pow(10, N, mod) - 2*pow(9, N, mod) + pow(8, N, mod))

Submission status: Wrong Answer

Solution code:
n=int(input())
mod=10**9+7
print(pow(10,n,mod)-(2*pow(9,n,mod)-pow(8,n,mod)) % mod)

Submission status: Wrong Answer

Solution code:
print((2**int(input())-2)%1000000007)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 1000000007

ans = pow(10,n,mod) - 2*pow(9,n,mod) + pow(8,n,mod)

print(ans)

Submission status: Wrong Answer

Solution code:
m=10**9+7
n=int(input())
a=(8**n)%m
b=(9**n)%m
c=(10**n)%m
print((2*b-c+a)%m)

Submission status: Wrong Answer

Solution code:
from functools import reduce

N = int(input())
mod = 10**9 + 7


def powmod(val, n, mod):
    vals = [val]*n
    ret = reduce(lambda x, y : x * y % mod, vals)

    return ret

    # for i in range(n):
    #     ret = ret * val % mod

    return ret


all = powmod(10, N, mod)
b = powmod(9, N, mod)
c = powmod(8, N, mod)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 1000000007
if n < 2:
    print(0)
else:
    print(pow(10, n, mod) - 2 * pow(9, n, mod) + pow(8, n, mod))

Submission status: Wrong Answer

Solution code:
N = int(input())
mod = 10**9 + 7


def powmod(val, n, mod):
    ret = 1
    for i in range(n):
        ret = ret * val % mod

    return ret


all = powmod(10, N, mod)
b = powmod(9, N, mod)
c = powmod(8, N, mod)

ans = all - (2*b - c)

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
mod = 10**9 + 7


def powmod(val, n, mod):
    ret = 1
    for i in range(n):
        ret = ret * val % mod

    return ret


all = powmod(10, N, mod)
b = powmod(9, N, mod)
c = powmod(8, N, mod)

ans = all - (2*b - c)
ans = powmod(10, N, mod) - (powmod(9, N, mod) + powmod(9, N, mod) - powmod(8, N, mod))

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
MOD = 10**9+7
ans = 10**N%MOD - 9**N%MOD*2%MOD + 8**N%MOD
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
mod = 10**9 + 7

comb = N * (N - 1) // 2
comb0and9 = comb * 2 * (10**(N-2))

ans = comb0and9 % mod
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
print((10**n - 9**n - 9**n ) + 8**n)

Submission status: Wrong Answer

Solution code:
n = int(input())
print(10**n - 2*9**n + 8**n)

Submission status: Wrong Answer

Solution code:
n=int(input())
mod=10**9+7
ans=pow(n,10,mod)
ans-=2*pow(n,9,mod)
ans+=pow(n,8,mod)
print(ans%mod)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 10**9+7
ans = pow(10, n, mod)
ans -= pow(9, n, mod)
ans += pow(8, n, mod)
print(ans % mod)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=1000000007
ans=10**n%a-9**n%a-9**n%a+8**n%a
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
MOD = 10**9 + 7
val1 = 9**N
val2 = 9**N
val3 = 8**N
ans = 10**N - val1 - val2 + val3
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 10**9 + 7

ans = pow(10,n,mod)
ans -= pow(9,n,mod)*2
ans += pow(8,n,mod)

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

print((10 ** n) % (10 ** 9 + 7) - (9 ** n) % (10 ** 9 + 7) - (9 ** n) % (10 ** 9 + 7) + (8 ** n) % (10 ** 9 + 7))

Submission status: Wrong Answer

Solution code:
# 21:17-                                                                                                                                                      
N = int(input())

kMod = 10**9+7

print(pow(10, N, kMod) - 2*pow(9, N, kMod)+pow(8, N, kMod))

Submission status: Wrong Answer

Solution code:
n=int(input())
print(10**n-2*(9**n)+8**n)

Submission status: Wrong Answer

Solution code:
NUM = 1000000007

N = int(input())

all_colab = pow(10, N)
except_0or9_colab = pow(9, N)
except_0and9_colab = pow(8, N)

print(all_colab - (2*except_0or9_colab - except_0and9_colab))

Submission status: Wrong Answer

Solution code:

NUM = 1000000007

N = int(input())

all_colab = pow(10, N)
except_0or9_colab = pow(9, N)
except_0and9_colab = pow(8, N)

print(all_colab - (2*except_0or9_colab + except_0and9_colab))

Submission status: Wrong Answer

Solution code:
N = int(input())
print(10**N-2*9**N+8**N)

Submission status: Wrong Answer

Solution code:
n=int(input())

print((10**n-(9**n+9**n-8**n)%(10**9+7)))

Submission status: Wrong Answer

Solution code:
n = int(input())

print(10**n - 9**n - 9**n + 8**n)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = int(1e9)+7
bad = pow(9, n, mod) * 2 - pow(8, n, mod)
good = pow(10, n, mod)
print(good - bad)

Submission status: Wrong Answer

Solution code:
mod = 10**9+7
N = int(input())
a,b,c = 1, 1, 1
for _ in range(N):
    a *= 10
    b *= 9
    c *= 8
    a %= mod
    b %= mod
    c %= mod
ans = a - b - b + c
if ans < 0:
    ans += mod
print(ans)

Submission status: Wrong Answer

Solution code:
mod = 10**9+7
N = int(input())
a,b,c = 1, 1, 1
for _ in range(N):
    a *= 10
    b *= 9
    c *= 8
    a %= mod
    b %= mod
    c %= mod
ans = a - 2*b +c
if ans < 0:
    ans += mod
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
mod=10**9+7
print(pow(10,n,mod)-2*pow(9,n,mod)+pow(8,n,mod))

Submission status: Wrong Answer

Solution code:
import math

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))



n = int(input())

if n == 1:
    print(0)
    exit()
else:
    k = combinations_count(n,2) * 2

k = k * 10**(n - 2) 

print( k % (10**9+7) )

Submission status: Wrong Answer

Solution code:
import math

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))



n = int(input())

if n == 1:
    print(0)
    exit()
else:
    k = combinations_count(n,2)

k = k * 10**(n - 2)

print( k % (10**9+7) )

Submission status: Wrong Answer

Solution code:
n = int(input())
nPowTen = pow(10,n,pow(10,9) + 7)
nPowNine = pow(9,n,pow(10,9) + 7)
nPowEight = pow(8,n,pow(10,9) + 7)

print(nPowTen - nPowNine - nPowNine +nPowEight)

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    mod = 10**9+7
    print((pow(10,n,mod)- pow(9,n,mod) - pow(9,n,mod) + pow(8,n,mod)%mod))

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    mod = 10**9+7
    print((pow(10,n,mod)-2 * pow(9,n,mod) + pow(8,n,mod)%mod))

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 10 ** 9 + 7
print(pow(10, n, mod) - pow(9, n, mod) - pow(9, n, mod) + pow(8, n, mod))

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 1000000007
print(pow(10, n, mod) - pow(9, n, mod) - pow(9, n, mod) + pow(8, n, mod))

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 10**9+7
a = pow(10,n,mod)
b = pow(9,n,mod)
c = pow(9,n,mod)
d = pow(8,n,mod)
print(a-b-c+d)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 1000000007
print(pow(10, n, mod) - pow(9, n, mod) * 2 + pow(8, n, mod))

Submission status: Wrong Answer

Solution code:

N = int(input())
mod = 10**9+7
if N==1:
    print(0)
else:
    print(pow(10, N, mod)-pow(9, N, mod)*2+pow(8, N, mod))

Submission status: Wrong Answer

Solution code:
N = int(input())
mod = 10**9+7
print(10**N%mod-(9**N%mod+9**N%mod-8**N%mod))

Submission status: Wrong Answer

Solution code:
N = int(input())
mod = 10**9+7
print(10**N%mod-(2*(9**N%mod)-8**N%mod))

Submission status: Wrong Answer

Solution code:
N = int(input())
mod = 10**9+7
print((10**N)%mod-(2*(9**N)%mod-(8**N)%mod))

Submission status: Wrong Answer

Solution code:
N = int(input())
mod = 10**9+7
print(10**N%mod-(2*9**N%mod-8**N%mod))

Submission status: Wrong Answer

Solution code:
N = int(input())
print(10**N-(9**N+9**N-8**N))

Submission status: Wrong Answer

Solution code:
# AtCoder Beginner Contest 178
# C - Ubiquity

N=int(input())

mod=10**9+7

print((10**N)%mod-(9**N)%mod-(9**N)%mod+(8**N)%mod)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 10**9+7
a = pow(10,n,mod)
a -= pow(9,n,mod)*2
a += pow(8,n,mod)
print(a)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 10**9-7
a = pow(10,n,mod)
a -= pow(9,n,mod)*2
a += pow(8,n,mod)
print(a)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python3
#coding: utf-8

N = int(input())

p = 10**9 + 7

ret = pow(10, N, p)
ret -= pow(9, N, p)
ret -= pow(9, N, p)
ret += pow(8, N, p)

print(ret)

Submission status: Wrong Answer

Solution code:
N = int(input())
mod = 10 ** 9 +7
x = (10**N)%mod
y = (2*(9**N))%mod
z = (8**N)%mod
print(x-y+z)

Submission status: Wrong Answer

Solution code:
N = int(input())
mod = 10 ** 9 +7
x = (10**N)%mod
y = (2*(9**N))%mod
z = 8**N%mod
print(x-y+z)

Submission status: Wrong Answer

Solution code:
N = int(input())
MOD = 7+10**9
ans = (10**N) % MOD
ans = (ans + (8**N)) % MOD
ans = (ans - (2*(9**N))%MOD)
print(ans)

Submission status: Wrong Answer

Solution code:
print(2**int(input())-2)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = (10**n)%-2*(9**n)+8**n
print(ans%(10**9+7))

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = (10**n)%-2*(9**n)+8**n
print(ans%(10**9+7))

Submission status: Wrong Answer

Solution code:
N = int(input())
mod = 10**9+7
ans = pow(10,N,mod) + pow(8,N,mod) - pow(9,N,mod) - pow(9,N,mod)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
mod = 10**9+7
ans = pow(10, N, mod)
ans -=pow(9,N,mod)*2
ans += pow(8,N, mod)

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
mod = 10**9+7
ans = pow(10, N, mod) - pow(9,N, mod)*2 + pow(8,N, mod)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
mod = 10**9+7
ans = pow(10, N, mod)
ans -= pow(9,N, mod)*2
ans += pow(8,N, mod)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 10 ** 9 + 7
print((pow(10, n, mod) - 2 * pow(9, n, mod) + pow(8, n, mod)))

Submission status: Wrong Answer

Solution code:
##C - Ubiquity
##0と9が一つずつない状況
N = int(input())
print((10**N - 2*9**N + 8**N) % 10**9+7)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
print((pow(2,n)-2)%1000000007)

Submission status: Wrong Answer

Solution code:
n = int( input() )
#print( n )

x = 1
y = 1
z = 1000000007
for i in range( n-1 ):
    x = ( x * 10 ) % z
    y = ( y * 8 ) % z

ans = x - y
print( ans )

Submission status: Wrong Answer

Solution code:
n = int(input())


def modpow(x, y):
    mod = 1000000007
    res = 1
    for i in range(y):
        res = res * x % mod
    return res


ten = modpow(10, n)
nine = modpow(9, n)
eight = modpow(8, n)

ans = ten - nine - nine + eight


print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())


def modpow(x, y):
    mod = 1000000007
    res = 1
    for i in range(y):
        res = res * x % mod
    return res


ten = modpow(10, n)
nine = modpow(9, n)
eight = modpow(8, n)

ans = ten - ((nine + nine) - eight)


print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
mod = int(1e9) + 7
print(pow(10, N, mod) - pow(9, N, mod) - pow(9, N, mod) + pow(8, N, mod))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

def main():
    n = int(input())
    mod = pow(10,9) + 7
    ans = pow(10,n,mod)
    ans -= pow(9,n,mod)*2
    ans += pow(8,n,mod)

    print(ans)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
mod = 10**9 + 7
ans = pow(10,N,mod)
ans -= pow(9,N,mod)
ans -= pow(9,N,mod)
ans += pow(8,N,mod)
print(ans)

Submission status: Wrong Answer

Solution code:
mod = 10 ** 9 + 7

N = int(input())

result = 0

ten = pow(10, N, mod)
nine = pow(9, N, mod)
eight = pow(8, N, mod)

result = ten - 2 * nine + eight

print(result)

Submission status: Wrong Answer

Solution code:
class ModInt:
	"""
	modを自動的に取ります。
	あくまで新しいインスタンスを返している点に注意
	pow()関数で逆元計算するのはpython3.8以降のみ可能らしいので注意。
	"""
	MOD = 10**9 + 7
	
	def __init__(self, x):
		self.x = x % ModInt.MOD
		
	def __str__(self):
		return str(self.x)
		
	# addition operator "+" overload
	def __add__(self, other):
		if isinstance(other, ModInt):
			return ModInt(self.x + other.x)
		else:
			return ModInt(self.x + other)
			
	# subtraction operator "-" overload
	def __sub__(self, other):
		if isinstance(other, ModInt):
			return ModInt(self.x - other.x)
		else:
			return ModInt(self.x - other)
			
	# multiplication operator "*" overload
	def __mul__(self, other):
		if isinstance(other, ModInt):
			return ModInt(self.x * other.x)
		else:
			return ModInt(self.x * other)
			
	# division operator "/" overload
	def __truediv__(self, other):
		if isinstance(other, ModInt):
			return ModInt(self.x * pow(other.x, ModInt.MOD - 2, ModInt.MOD))
		else:
			return ModInt(self.x * pow(other, ModInt.MOD-2, ModInt.MOD))
	
	# power operator "**" overload
	def __pow__(self, other):
		if isinstance(other, ModInt):
			return ModInt(pow(self.x, other.x, ModInt.MOD))
		else:
			return ModInt(pow(self.x, other, 
			ModInt.MOD))
	
	# 1 + ModInt(2) returns ModInt(3)	
	__radd__ = __add__
	
	# 3 - ModInt(2) returns ModInt(1)
	def __rsub__(self, other):
		if isinstance(other, ModInt):
			return ModInt(other.x - self.x)
		else:
			return ModInt(other - self.x)
			
	__rmul__ = __mul__
	
	def __rtruediv__(self, other):
		if isinstance(other, ModInt):
			return ModInt(other.x * pow(self.x, ModInt.MOD - 2, ModInt.MOD))
		else:
			return ModInt(other * pow(self.x, ModInt.MOD-2, ModInt.MOD))
			
	def __rpow__(self, other):
		if isinstance(other, ModInt):
			return ModInt(pow(other.x, self.x, ModInt.MOD))
		else:
			return ModInt(pow(other, self.x, ModInt.MOD))

class Combination:
	
	def __init__(self, N):
		if N > ModInt.MOD:
			raise ValueError("N can't be greater than MOD!")
		self.fact = [ModInt(1) for _ in range(N+1)]
		self.invfact = [ModInt(1) for _ in range(N+1)]
		
		for i in range(1, N+1):
			self.fact[i] = i * self.fact[i-1]

		self.invfact[N] = 1 / self.fact[N]
		for j in range(N, 0, -1):
			self.invfact[i-1] = i * self.invfact[i]
			
	def nCr(self, n, r):
		if r < 0 or r > n:
			return 0
			
		return self.fact[n] * self.invfact[r] * self.invfact[n-r]
		
N = int(input())

ans = ModInt(0)
comb = Combination(N)
for i in range(2, N+1):
	
	ans = ans + comb.nCr(N, i) * (2**i - 2) * 8**(N-i)
	
print(ans)

Submission status: Wrong Answer

Solution code:
MOD = 10**9 + 7
n = int(input())
ans = pow(10, n, MOD) - pow(9, n, MOD) * 2 + pow(8, n, MOD)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
M = 7 + 10 ** 9
A = 0


def fac_mod(a, b):
    x = 1
    for i in range(1, b+1):
        x = (x*a) % M
    return x


A = fac_mod(10, N) - fac_mod(9, N) * 2 + fac_mod(8, N) % M
if A < 0:
    A = M - A
print(A)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = 10**9+7
def mod(i,j):
    ans = 1
    for _ in range(j):
        ans = (ans*i)%a
    return(ans)

print((mod(10,n)-mod(9,n)*2+mod(8,n)%a))

Submission status: Wrong Answer

Solution code:
s=input().split()
N=int(s[0])
x=10**N-9**N-9**N+8**N
x=x%(10^9+7)
print(x)

Submission status: Wrong Answer

Solution code:
N = int(input())
MOD = 10 ** 9 + 7

answer = pow(10, N, MOD) + pow(8, N, MOD) - 2 * pow(9, N, MOD)
print(answer + MOD if answer < 0 else answer % MOD)

Submission status: Wrong Answer

Solution code:
n = int(input())
MOD = 10**9 + 7
ans = pow(10,n,MOD) - 2*pow(9,n,MOD) - pow(8,n,MOD)
print(ans%MOD)

Submission status: Wrong Answer

Solution code:
def func(x, n):
  res = 1
  for _ in range(n):
    res = res * x % MOD
  return res

n = int(input())
MOD = 10**9 + 7

ans = func(10, n) - func(9, n) - func(9, n) + func(8, n)

print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
mod=10**9+7

N=int(input())

a,b,c=1,1,1

for _ in range(N):
    a*=10
    a%=mod
    b*=9
    b%=mod
    c*=8
    c%=mod

print(a-2*b+c)

Submission status: Wrong Answer

Solution code:
N = int(input())
MOD = 1000000007

print(10**N%MOD - 9**N%MOD - 9**N%MOD + 8**N%MOD)

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 10**9 + 7
print(pow(10, n, mod) - 2*pow(9, n, mod) - pow(8, n, mod))

Submission status: Wrong Answer

Solution code:
n = int(input())
mod = 10**9 + 7
print(pow(10, n, mod) - 2*pow(9, n, mod) - pow(9, n, mod))

Submission status: Wrong Answer

Solution code:
n=int(input())
x=(10**n)%(10**9+7)
y=(9**n)%(10**9+7)
z=(8**n)%(10**9+7)
print(z-2*y+x)