buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
n=(int)(input())
if n<2:
print(0)
else:
ans=(9**n)-2*(8**n)+(7**n)
print(ans%(10**9+7)) | n=(int)(input())
if n<2:
print(0)
else:
ans=(10**n)-2*(9**n)+(8**n)
print(ans%(10**9+7))
| [["-", 12, 657, 31, 657, 31, 23, 0, 657, 31, 612], ["+", 12, 657, 31, 657, 31, 23, 0, 657, 31, 612], ["-", 31, 657, 12, 657, 12, 23, 0, 657, 31, 612], ["+", 31, 657, 12, 657, 12, 23, 0, 657, 31, 612], ["-", 0, 662, 12, 657, 12, 23, 0, 657, 31, 612], ["+", 0, 662, 12, 657, 12, 23, 0, 657, 31, 612]] | 5 | 54 |
N=int(input())
M=10**9+7
ans=1
m=1
for i in range(N):ans=(ans*10)%M
for i in range(N):m=(m*9)%M
ans-=(m*2)%M
m=1
for i in range(N):m=(m*8)%M
print(ans+m) | N=int(input())
M=10**9+7
ans=1
m=1
for i in range(N):ans=(ans*10)%M
for i in range(N):m=(m*9)%M
ans-=(m*2)%M
m=1
for i in range(N):m=(m*8)%M
print((ans+m)%M) | [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 25], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 90 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
const ll mod = 1000000007;
ll n;
cin >> n;
if (n == 1) {
cout << 0 << endl;
return 0;
}
if (n == 2) {
cout << 2 << endl;
return 0;
}
ll tmp10 = 1;
ll tmp9 = 1;
ll tmp8 = 1;
ll m = n;
while (m--) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
const ll mod = 1000000007;
ll n;
cin >> n;
if (n == 1) {
cout << 0 << endl;
return 0;
}
if (n == 2) {
cout << 2 << endl;
return 0;
}
ll tmp10 = 1;
ll tmp9 = 1;
ll tmp8 = 1;
ll m = n;
while (m--) {
... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 132], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22]] | 1 | 140 |
// Author: howso
#include <algorithm>
#include <assert.h>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <ti... | // Author: howso
#include <algorithm>
#include <assert.h>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <ti... | [["+", 31, 23, 0, 16, 31, 16, 12, 23, 0, 24], ["+", 31, 16, 12, 23, 0, 16, 31, 23, 0, 24], ["+", 31, 16, 12, 23, 0, 16, 31, 23, 0, 25], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 17, 109], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 12, 22], ["+", 31, 23, 0, 16, 31, 16, 12, 23, 0, 25]] | 1 | 681 |
N = int(input())
MOD = 10 ** 9 + 7
if N == 1:
print(0)
exit()
a = pow(10, N, MOD)
b = pow(9, N, MOD)
c = pow(8, N, MOD)
ans = a - (2 * b) + c
if ans < 0:
ans += MOD
print(ans) | N = int(input())
MOD = 10 ** 9 + 7
if N == 1:
print(0)
exit()
a = pow(10, N, MOD)
b = pow(9, N, MOD)
c = pow(8, N, MOD)
ans = (a - (2 * b) + c) % MOD
if ans < 0:
ans += MOD
print(ans) | [["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 109], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 80 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
ll powmod(ll x, ll y) {
ll res = 1;
for (ll i = 0; i < y; i++) {
res = (res * x) % mod;
}
return res;
}
int main() {
int n;
cin >> n;
ll ans = powmod(10, n) - 2 * powmod(9, n) + powmod(8, n);
ans = (ans + ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
ll powmod(ll x, ll y) {
ll res = 1;
for (ll i = 0; i < y; i++) {
res = (res * x) % mod;
}
return res;
}
int main() {
int n;
cin >> n;
ll ans = powmod(10, n) - 2 * powmod(9, n) + powmod(8, n);
ans = ans % m... | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32]] | 1 | 120 |
#include <iostream>
using namespace std;
const int MOD = 1e9 + 7;
int pow(int x, int n) {
long long ret = 1;
for (int i = 0; i < n; ++i) {
ret = (ret * n) % MOD;
}
return ret;
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int N;
cin >> N;
long long ret = pow(10, N);... | #include <iostream>
using namespace std;
const int MOD = 1e9 + 7;
int pow(int x, int n) {
long long ret = 1;
for (int i = 0; i < n; ++i) {
ret = (ret * x) % MOD;
}
return ret;
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int N;
cin >> N;
long long ret = pow(10, N);... | [["-", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 162 |
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
n = int(input())
mod = 10**9+7
print(pow(10,n,mod)-2*pow(9,n,mod)+pow(8,n,mod))
if __name__=='__main__':
main() | import sys
def input(): return sys.stdin.readline().rstrip()
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() | [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 31, 23, 0, 657, 12, 652, 3, 4, 0, 25], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 80 |
def main():
n = int(input())
mod = 10 ** 9 + 7 #素数
def modpow(x, n, mod):
res = 1
while n:
if n % 2:
res *= x % mod
res %= res
x *= x % mod
n >>= 1
return res
# 全パターン:10 ** n
all_p = modpow(10, n, mod)... | def main():
n = int(input())
mod = 10 ** 9 + 7 #素数
def modpow(x, n, mod):
res = 1
while n:
if n % 2:
res *= x % mod
res %= mod
x *= x % mod
n >>= 1
return res
# 全パターン:10 ** n
all_p = modpow(10, n, mod)... | [["-", 0, 57, 64, 196, 0, 1, 0, 677, 12, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 12, 22]] | 5 | 132 |
def main():
n = int(input())
mod = 10 ** 9 + 7 #素数
def modpow(x, n, mod):
res = 1
while n:
if n % 2:
res *= x % mod
x *= x % mod
n >>= 1
return res % mod
# 全パターン:10 ** n
all_p = modpow(10, n, mod)
# 0を含まないパタンーン:9 *... | def main():
n = int(input())
mod = 10 ** 9 + 7 #素数
def modpow(x, n, mod):
res = 1
while n:
if n % 2:
res *= x % mod
x *= x % mod
n >>= 1
return res
# 全パターン:10 ** n
all_p = modpow(10, n, mod)
# 0を含まないパタンーン:9 ** n
... | [["-", 0, 14, 8, 196, 0, 37, 0, 657, 17, 109], ["-", 0, 14, 8, 196, 0, 37, 0, 657, 12, 22], ["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 109], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 127 |
def main():
n = int(input())
mod = 10 ** 9 + 7 #素数
def modpow(x, n, mod):
res = 1
while n:
if n % 2:
res *= x % mod
res %= mod
x *= x % mod
n >>= 1
return res
# 全パターン:10 ** n
all_p = modpow(10, n, mod)
... | def main():
n = int(input())
mod = 10 ** 9 + 7 #素数
def modpow(x, n, mod):
res = 1
while n:
if n % 2:
res *= x % mod
res %= mod
x *= x % mod
n >>= 1
return res
# 全パターン:10 ** n
all_p = modpow(10, n, mod)
... | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 128 |
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
const i64 mod = 1e9 + 7;
int main() {
i64 n, ans = 0, a = 1, b = 1, c = 1;
cin >> n;
if (n == 1) {
cout << 0 << endl;
return 0;
}
for (i64 i = 0; i < n; i++) {
a *= 10;
b *= 9;
c *= 8;
a %= mod;
b %= mod;
c ... | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
const i64 mod = 1e9 + 7;
int main() {
i64 n, ans = 0, a = 1, b = 1, c = 1;
cin >> n;
if (n == 1) {
cout << 0 << endl;
return 0;
}
for (i64 i = 0; i < n; i++) {
a *= 10;
b *= 9;
c *= 8;
a %= mod;
b %= mod;
c ... | [["-", 0, 30, 0, 14, 8, 9, 0, 57, 0, 121], ["-", 0, 14, 8, 9, 0, 57, 15, 339, 0, 24], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 57, 15, 339, 0, 25]] | 1 | 165 |
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
const i64 mod = 1e9 + 7;
int main() {
i64 n, ans = 0, a = 1, b = 1, c = 1;
cin >> n;
if (n == 1) {
cout << 2 << endl;
return 0;
}
for (i64 i = 0; i < n; i++) {
a *= 10;
b *= 9;
c *= 8;
a %= mod;
b %= mod;
c ... | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
const i64 mod = 1e9 + 7;
int main() {
i64 n, ans = 0, a = 1, b = 1, c = 1;
cin >> n;
if (n == 1) {
cout << 0 << endl;
return 0;
}
for (i64 i = 0; i < n; i++) {
a *= 10;
b *= 9;
c *= 8;
a %= mod;
b %= mod;
c ... | [["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13]] | 1 | 146 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
using namespace std;
using ll = long long;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
re... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
using namespace std;
using ll = long long;
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
re... | [["-", 0, 30, 0, 14, 8, 9, 0, 57, 0, 121], ["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89]] | 1 | 441 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
#define sz(v) (int)v.size()
#define all(v) v.begin(), v.end()
void dbg_out() { cerr << "\b\b]\n"; }
template <typename Head, typename... Tail> void dbg_out(Head H, Tail... T) {
cerr << H << ", ";
dbg_out(T...);
}
#define watch(...)... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
#define sz(v) (int)v.size()
#define all(v) v.begin(), v.end()
void dbg_out() { cerr << "\b\b]\n"; }
template <typename Head, typename... Tail> void dbg_out(Head H, Tail... T) {
cerr << H << ", ";
dbg_out(T...);
}
#define watch(...)... | [["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 12, 22]] | 1 | 498 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const int MOD = 1e9 + 7;
int power(int n, int k) {
int res = 1;
while (k) {
if (k % 2)
res = (res * 1LL * n) % MOD;
n = (n * 1LL * n) % MOD;
k /= 2;
}
return res;
}
int main() {
int n;
cin >> n... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const int MOD = 1e9 + 7;
int power(int n, int k) {
int res = 1;
while (k) {
if (k % 2)
res = (res * 1LL * n) % MOD;
n = (n * 1LL * n) % MOD;
k /= 2;
}
return res;
}
int main() {
int n;
cin >> n... | [["+", 31, 23, 0, 16, 31, 16, 12, 23, 0, 24], ["+", 31, 16, 12, 23, 0, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 12, 2, 3, 4, 0, 25], ["+", 31, 16, 12, 23, 0, 16, 31, 23, 0, 25], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 17, 109], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 12, 22]] | 1 | 150 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int64_t ans;
int64_t a = 1;
int64_t b = 1;
int64_t c = 1;
for (int i = 0; i < N; i++) {
a = a * 10 % 1000000007;
b = b * 9 % 1000000007;
c = c * 8 % 1000000007;
}
ans = (a - (((b + b) % 1000000007) - c) % 100000... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int64_t ans;
int64_t a = 1;
int64_t b = 1;
int64_t c = 1;
for (int i = 0; i < N; i++) {
a = a * 10 % 1000000007;
b = b * 9 % 1000000007;
c = c * 8 % 1000000007;
}
ans =
(a + 1000000007 - (((b + b) % 100000... | [["+", 12, 16, 31, 23, 0, 16, 31, 16, 17, 72], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 12, 13]] | 1 | 107 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const ll MOD = 1e9 + 7;
void solve() {
ll N;
cin >> N;
// total number of sequences = 10^N
// total number of sequences without 0 = 9^N;
// total number of sequences without 9 = 9^N;
// total number of sequences witho... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const ll MOD = 1e9 + 7;
void solve() {
ll N;
cin >> N;
// total number of sequences = 10^N
// total number of sequences without 0 = 9^N;
// total number of sequences without 9 = 9^N;
// total number of sequences witho... | [["+", 31, 23, 0, 16, 31, 16, 31, 16, 17, 72], ["+", 31, 23, 0, 16, 31, 16, 31, 16, 12, 22]] | 1 | 149 |
# 21:17-
N = int(input())
kMod = 10**9+7
print(pow(10, N, kMod) - 2*pow(9, N, kMod)+pow(8, N, kMod))
| # 21:17-
N = int(input())
kMod = 10**9+7
print((pow(10, N, kMod) - 2*pow(9, N, kMod)+pow(8, N, kMod) + kMod) % kMod) | [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 0, 657, 31, 657, 12, 652, 3, 4, 0, 22], ["+", 0, 657, 31, 657, 12, 652, 3, 4, 0, 25], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 47 |
#include <iostream>
using namespace std;
long long N; //输入序列长度
int const maxn = 1e9 + 7; //求模的数
int main() {
long long a1 = 1, a2 = 1, a3 = 1, sum;
cin >> N;
for (int i = 1; i <= N; i++) {
a1 = (a1 * 10) % maxn;
a2 = (a2 * 9) % maxn;
a3 = (a3 * 8) % maxn;
}
sum = (a1 - ((2 * a2) % max... | #include <iostream>
using namespace std;
long long N; //输入序列长度
int const maxn = 1e9 + 7; //求模的数
int main() {
long long a1 = 1, a2 = 1, a3 = 1, sum;
cin >> N;
for (int i = 1; i <= N; i++) {
a1 = (a1 * 10) % maxn;
a2 = (a2 * 9) % maxn;
a3 = (a3 * 8) % maxn;
}
sum = ((a1 - ((2 * a2) % ma... | [["+", 31, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 31, 16, 31, 23, 0, 25], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 17, 109], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 12, 22], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 121 |
// noob
#include <bits/stdc++.h>
using namespace std;
#define fori(x) for (int i = 0; i < x; i++)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define ll long long int
#define ld long double
#define ull unsigned long long int
#define pi acos(-1)
#define test() ... | // noob
#include <bits/stdc++.h>
using namespace std;
#define fori(x) for (int i = 0; i < x; i++)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define ll long long int
#define ld long double
#define ull unsigned long long int
#define pi acos(-1)
#define test() ... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 0, 14, 8, 9, 0, 37, 0, 16, 17, 109], ["-", 0, 14, 8, 9, 0, 37, 0, 16, 12, 22]] | 1 | 218 |
// God's Grace
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utilit... | // God's Grace
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utilit... | [["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 48], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 12, 22]] | 1 | 1,100 |
#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
long long n, x = 1, y = 1, z = 1;
cin >> n;
for (int i = 0; i < n; i++) {
z = (z * 8) % mod;
y = (y * 9) % mod;
x = (x * 10) % mod;
}
y = (y * 2) % mod;
co... | #include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
long long n, x = 1, y = 1, z = 1;
cin >> n;
for (int i = 0; i < n; i++) {
z = (z * 8) % mod;
y = (y * 9) % mod;
x = (x * 10) % mod;
}
y = (y * 2) % mod;
co... | [["+", 0, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 117 |
#include <iostream>
using namespace std;
const int mod = 1e9 + 7;
typedef long long ll;
ll ppow(ll b, ll a) {
ll ans = 1;
ll base = b;
while (a) {
if (a % 2 == 1) {
ans = ans * base;
ans = ans % mod;
}
base = base * base;
base = base % mod;
a = a / 2;
}
return ans % mod;
}
int ... | #include <iostream>
using namespace std;
const int mod = 1e9 + 7;
typedef long long ll;
ll ppow(ll b, ll a) {
ll ans = 1;
ll base = b;
while (a) {
if (a % 2 == 1) {
ans = ans * base;
ans = ans % mod;
}
base = base * base;
base = base % mod;
a = a / 2;
}
return ans % mod;
}
int ... | [["+", 12, 16, 31, 23, 0, 16, 12, 16, 31, 13], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 48]] | 1 | 144 |
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)
| 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) % mod)
| [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 25], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 53 |
/////////////////////////////////////////
/// Please Give Me AC!!!!! ///
/////////////////////////////////////////
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define forin(in) \
for (int i = 0; ... | /////////////////////////////////////////
/// Please Give Me AC!!!!! ///
/////////////////////////////////////////
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define forin(in) \
for (int i = 0; ... | [["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 17, 109], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 12, 22], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25]] | 1 | 160 |
#include <iostream>
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
ll powmod(ll x, ll y) {
ll result = 1;
for (ll i = 0; i < y; i++) {
result = result * x % mod;
}
return result;
}
int main(void) {
ll N, A;
cin >> N;
A = powmod(9, N);
ll ans = (powmod(10, N) - A - A + powmo... | #include <iostream>
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
ll powmod(ll x, ll y) {
ll result = 1;
for (ll i = 0; i < y; i++) {
result = result * x % mod;
}
return result;
}
int main(void) {
ll N, A;
cin >> N;
A = powmod(9, N);
ll ans = (powmod(10, N) - A - A + powmo... | [["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]] | 1 | 116 |
mod = 10**9+7
N = int(input())
ans = (pow(a,N,mod) - 2*pow(b, N, mod) + pow(c, N, mod))%mod
if ans < 0:
ans += mod
print(ans)
| mod = 10**9+7
N = int(input())
ans = (pow(10,N,mod) - 2*pow(9, N, mod) + pow(8, N, mod))%mod
if ans < 0:
ans += mod
print(ans)
| [["-", 0, 657, 31, 657, 31, 652, 3, 4, 0, 22], ["+", 0, 657, 31, 657, 31, 652, 3, 4, 0, 612], ["-", 31, 657, 12, 657, 12, 652, 3, 4, 0, 22], ["+", 31, 657, 12, 657, 12, 652, 3, 4, 0, 612], ["-", 31, 23, 0, 657, 12, 652, 3, 4, 0, 22], ["+", 31, 23, 0, 657, 12, 652, 3, 4, 0, 612]] | 5 | 61 |
#include <bits/stdc++.h>
#include <math.h>
using namespace std;
typedef long long tolong;
const tolong mo = 1000000007;
tolong modd(tolong i, tolong N) {
tolong ans = 1;
for (tolong j = 0; j < N; j++) {
ans = ans * i % mo;
}
return ans;
}
int main() {
tolong N;
tolong Ans;
cin >> N;
Ans = modd(10,... | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
typedef long long tolong;
const tolong mo = 1000000007;
tolong modd(tolong i, tolong N) {
tolong ans = 1;
for (tolong j = 0; j < N; j++) {
ans = ans * i % mo;
}
return ans;
}
int main() {
tolong N;
tolong Ans;
cin >> N;
Ans = modd(10,... | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32]] | 1 | 124 |
#include <bits/stdc++.h>
using namespace std;
#define nl '\n'
#define fast \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
... | #include <bits/stdc++.h>
using namespace std;
#define nl '\n'
#define fast \
ios::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0);
... | [["+", 31, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 12, 22], ["+", 51, 16, 31, 23, 0, 16, 31, 23, 0, 25], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 9, 0, 43, 49, 50, 51, 16, 17, 109], ["+", 0, 9, 0, 43, 49, 50, 51, 16, 12, 22]] | 1 | 208 |
//#include <tourist>
#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
// using namespace atcoder;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<ll, ll> p;
const int INF = 1e9;
const ll LINF = ll(1e18);
const int MOD = 1000000007;
const int dx[4] = {0... | //#include <tourist>
#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
// using namespace atcoder;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<ll, ll> p;
const int INF = 1e9;
const ll LINF = ll(1e18);
const int MOD = 1000000007;
const int dx[4] = {0... | [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 12, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22]] | 1 | 438 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define mod 1e9 + 7
#define INF 1 << 30
#define MAX (1 << 20)
#define NINF (-(1 << 30))
#define triplet pair<pair<int, int>, int>
ll power(ll base, ll p, ll pr) {
ll ans = 1;
if (base == 1)
return 1;
if (base... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define mod 1e9 + 7
#define INF 1 << 30
#define MAX (1 << 20)
#define NINF (-(1 << 30))
#define triplet pair<pair<int, int>, int>
ll power(ll base, ll p, ll pr) {
ll ans = 1;
if (base == 1)
return 1;
if (base... | [["-", 0, 9, 0, 43, 49, 50, 51, 23, 0, 24], ["+", 0, 43, 49, 50, 51, 16, 12, 23, 0, 24], ["+", 0, 16, 31, 23, 0, 2, 3, 4, 0, 25], ["+", 51, 16, 12, 23, 0, 16, 12, 23, 0, 24]] | 1 | 217 |
#include <bits/stdc++.h>
using namespace std;
/*#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;*/
#define ordered_set \
tree<int, null_type, less<int>, rb_tree_tag, \
... | #include <bits/stdc++.h>
using namespace std;
/*#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;*/
#define ordered_set \
tree<int, null_type, less<int>, rb_tree_tag, \
... | [["+", 0, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 12, 16, 12, 2, 3, 4, 0, 25], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 22], ["+", 31, 23, 0, 16, 31, 16, 31, 16, 17, 109], ["+", 31, 23, 0, 16, 31, 16, 31, 16, 12, 22]] | 1 | 836 |
/* / \ */
/* /*****\ */
/* Jai Shree Mataji / \ |\| |_| $ |-| K */
#include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstring>
#include <... | /* / \ */
/* /*****\ */
/* Jai Shree Mataji / \ |\| |_| $ |-| K */
#include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstring>
#include <... | [["-", 75, 76, 0, 57, 64, 1, 0, 16, 12, 13], ["+", 75, 76, 0, 57, 64, 1, 0, 16, 12, 13]] | 1 | 548 |
def main():
N = input()
print((10 ** N - 9 ** N - 9 ** N + 8 ** N)%(10**9 + 7))
main() | def main():
N = int(input())
print((10**N - 9**N - 9**N + 8**N)%(10**9 + 7))
main()
| [["+", 8, 196, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 41 |
#include <iostream>
#include <vector>
using namespace std;
long long pow(long long x, long long a) {
long long ans = 1;
for (int i = 0; i < a; i++) {
ans *= x;
ans %= 1000000007;
}
return ans;
}
int main() {
long long N;
cin >> N;
long long sum = 0;
long long non9, non0, non0_9;
non9 = pow(9,... | #include <iostream>
#include <vector>
using namespace std;
long long pow(long long x, long long a) {
long long ans = 1;
for (int i = 0; i < a; i++) {
ans *= x;
ans %= 1000000007;
}
return ans;
}
int main() {
long long N;
cin >> N;
long long sum = 0;
long long non9, non0, non0_9;
non9 = pow(9,... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 132], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22]] | 1 | 139 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7;
ll mp(ll a, ll b) {
ll res = 1;
while (b) {
if (b & 1) {
res = (res * a) % mod;
}
a = (a * a) % mod;
b >>= 1;
}
return res;
}
int main() {
ll n;
cin >> n;
ll f = (mp(10, n) - 2 * mp(9, n) + mp... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7;
ll mp(ll a, ll b) {
ll res = 1;
while (b) {
if (b & 1) {
res = (res * a) % mod;
}
a = (a * a) % mod;
b >>= 1;
}
return res;
}
int main() {
ll n;
cin >> n;
ll f = (mp(10, n) - (2 * mp(9, n)) % ... | [["+", 31, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 12, 2, 3, 4, 0, 25], ["+", 0, 16, 31, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 16, 31, 16, 31, 16, 12, 16, 12, 22]] | 1 | 132 |
#include <algorithm>
#include <iostream>
using namespace std;
const int MD = 1000000007;
int power(int n, int k) {
if (k == 0)
return 1;
int p = power(n, k >> 1);
p = (long long)p * p % MD;
if (k & 1)
p = (long long)p * n % MD;
return p;
}
int main() {
int n;
cin >> n;
cout << (power(10, n) ... | #include <algorithm>
#include <iostream>
using namespace std;
const int MD = 1000000007;
int power(int n, int k) {
if (k == 0)
return 1;
int p = power(n, k >> 1);
p = (long long)p * p % MD;
if (k & 1)
p = (long long)p * n % MD;
return p;
}
int main() {
int n;
cin >> n;
cout << ((power(10, n)... | [["+", 31, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 12, 2, 3, 4, 0, 25], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 17, 109], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 12, 22]] | 1 | 135 |
n = int(input())
mod = 10 ** 9 + 7
print(pow(10, n, mod) - pow(9, n, mod) - pow(9, n, mod) + pow(8, n, mod)) | 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) | [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 31, 23, 0, 657, 12, 652, 3, 4, 0, 25], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 53 |
#include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
const long long MOD = 1e9 + 7;
long long fp(long long base, long long n) {
long long ret = 1;
for (long long i = 0; i < n; i++) {
ret = ret * b... | #include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
const long long MOD = 1e9 + 7;
long long fp(long long base, long long n) {
long long ret = 1;
for (long long i = 0; i < n; i++) {
ret = ret * b... | [["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 25], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 107]] | 1 | 141 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
long long mod = 1000000007;
long long a = 1, b = 1, c = 1;
for (int i = 0; i < n; i++) {
a *= 10;
b *= 9;
c *= 8;
a %= mod;
b %= mod;
c %= mod;
}
long long ans = a - b - b + c;
ans = (ans + mod) % mod;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
long long mod = 1000000007;
long long a = 1, b = 1, c = 1;
for (int i = 0; i < n; i++) {
a *= 10;
b *= 9;
c *= 8;
a %= mod;
b %= mod;
c %= mod;
}
long long ans = (a - b - b + c) % mod;
ans = (ans + mod) ... | [["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 109], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]] | 1 | 107 |
/*
author : nit1n
created : 14/09/2020 22:55:08
*/
#include <bits/stdc++.h>
#define int long long
using namespace std;
int mod = 1e9 + 7;
int power(int a, int b) {
int ans = 1;
while (b) {
if (b & 1) {
ans *= a;
ans %= mod;
}
a *= a;
a %= mod;
b >>= 1;
}
return ans;
}
signed m... | /*
author : nit1n
created : 14/09/2020 22:55:08
*/
#include <bits/stdc++.h>
#define int long long
using namespace std;
int mod = 1e9 + 7;
int power(int a, int b) {
int ans = 1;
while (b) {
if (b & 1) {
ans *= a;
ans %= mod;
}
a *= a;
a %= mod;
b >>= 1;
}
return ans;
}
signed m... | [["+", 0, 16, 31, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 16, 31, 16, 31, 16, 12, 16, 12, 22]] | 1 | 133 |
#include <bits/stdc++.h>
using namespace std;
// a^n mod を計算する
long long modpow(long long a, long long n, long long mod) {
long long res = 1;
while (n > 0) {
if (n & 1)
res = res * a % mod;
a = a * a % mod;
n >>= 1;
}
return res;
}
int main() {
int n;
cin >> n;
int mod = 1e9 + 7;
lo... | #include <bits/stdc++.h>
using namespace std;
// a^n mod を計算する
long long modpow(long long a, long long n, long long mod) {
long long res = 1;
while (n > 0) {
if (n & 1)
res = res * a % mod;
a = a * a % mod;
n >>= 1;
}
return res;
}
int main() {
int n;
cin >> n;
int mod = 1e9 + 7;
lo... | [["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]] | 1 | 162 |
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) | 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)%mod) | [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 25], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 65 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;
ll qpow(ll x, ll k) {
ll res = 1;
while (k) {
if (k & 1)
res = res * x % mod;
x = x % mod;
k /= 2;
}
return res;
}
int main() {
ll n;
cin >> n;
ll ans = qpow(10, n) - 2 * qpow(9, n) + qpow(8, n... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;
ll qpow(ll x, ll k) {
ll res = 1;
while (k) {
if (k & 1)
res = res * x % mod;
x = x * x % mod;
k /= 2;
}
return res;
}
int main() {
ll n;
cin >> n;
ll ans = qpow(10, n) - 2 * qpow(9, n) + qpow(... | [["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 12, 22]] | 1 | 128 |
#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e6;
const int MOD = 1e9 + 7;
long int expmod(long int n, long int p) {
if (p == 0) {
return 1;
} else if (p % 2 == 0) {
long int t = expmod(n, p / 2);
return (t * t) % MOD;
} else {
return (n * expmod(n, p - 1)) % MOD;
}
}
int mai... | #include <bits/stdc++.h>
using namespace std;
const int MAX = 1e6;
const int MOD = 1e9 + 7;
long int expmod(long int n, long int p) {
if (p == 0) {
return 1;
} else if (p % 2 == 0) {
long int t = expmod(n, p / 2);
return (t * t) % MOD;
} else {
return (n * expmod(n, p - 1)) % MOD;
}
}
int mai... | [["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 151 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, n) for (int i = n; i >= 0; i--)
#define reps(i, a, b) for (int i = a; i < b; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
ll mod = 1e9 + 7;
ll f(ll a) {
a %= mod;
if (a < 0)
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, n) for (int i = n; i >= 0; i--)
#define reps(i, a, b) for (int i = a; i < b; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
ll mod = 1e9 + 7;
ll f(ll a) {
a %= mod;
if (a < 0)
... | [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25]] | 1 | 207 |
n = int(input())
mod = 1000000007
print(pow(10, n, mod) - pow(9, n, mod) * 2 + pow(8, n, mod)) | n = int(input())
mod = 1000000007
print((pow(10, n, mod) - pow(9, n, mod) * 2 + pow(8, n, mod)) % mod) | [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 31, 23, 0, 657, 12, 652, 3, 4, 0, 25], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 42 |
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)) |
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))%mod) | [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 31, 23, 0, 657, 12, 652, 3, 4, 0, 25], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 57 |
#include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define int long long
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define vi vector<int>
#define mii map<int, int>
#define pqb priority_queue<int>
#define pqs priority_queue<int, vi, greater<int>>
#define setbits(... | #include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define int long long
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define vi vector<int>
#define mii map<int, int>
#define pqb priority_queue<int>
#define pqs priority_queue<int, vi, greater<int>>
#define setbits(... | [["-", 0, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 17, 109], ["-", 51, 16, 31, 23, 0, 16, 12, 16, 17, 109], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 17, 72]] | 1 | 252 |
/*
Created on 14-09-20 12:20
@author: roastedcoder
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int mod = 1e9 + 7;
const int INF = INT_MAX;
#define endl "\n"
#define pb push_back
#define roastedcoder ... |
/*
Created on 14-09-20 12:20
@author: roastedcoder
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int mod = 1e9 + 7;
const int INF = INT_MAX;
#define endl "\n"
#define pb push_back
#define roastedcoder ... | [["-", 0, 16, 31, 16, 12, 23, 0, 16, 17, 109], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]] | 1 | 181 |
N = int(input())
mod = 10 ** 9 + 7
e = pow(8, N, mod)
f = pow(9, N, mod)
g = pow(10, N, mod)
# 全体 - (0を含まない + 9を含まない) + 0と9どちらも含まない
ans = g - 2 * f + e
print(ans) | N = int(input())
mod = 10 ** 9 + 7
e = pow(8, N, mod)
f = pow(9, N, mod)
g = pow(10, N, mod)
# 全体 - (0を含まない + 9を含まない) + 0と9どちらも含まない
ans = (g - 2 * f + e) % mod
print(ans) | [["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 109], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 59 |
#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++)
#define repr(i, a, b) for (int i = a; i < b; i++)
#define each(i, mp) for (auto &i : mp)
const int INF = 1001001001;
const ll MOD = 1000000007;
int main() {
int n;
ci... | #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++)
#define repr(i, a, b) for (int i = a; i < b; i++)
#define each(i, mp) for (auto &i : mp)
const int INF = 1001001001;
const ll MOD = 1000000007;
int main() {
int n;
ci... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 222 |
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(0);
#define all(x) x.begin(), x.end()
#define pb push_back
#define pf push_front... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define fastio \
ios_base::sync_with_stdio(false); \
cin.tie(0);
#define all(x) x.begin(), x.end()
#define pb push_back
#define pf push_front... | [["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25]] | 1 | 244 |
N = int(input())
mod = 10 ** 9 +7
x = (10**N)%mod
y = (2*(9**N))%mod
z = (8**N)%mod
print(x-y+z)
| N = int(input())
mod = 10 ** 9 +7
x = (10**N)%mod
y = (2*(9**N))%mod
z = (8**N)%mod
print((x-y+z)%mod)
| [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 25], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 54 |
#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)
const int M = 1e9 + 7;
ll mul(ll a, ll b) { return (a * b) % M; }
ll mod_pow(ll a, ll b) {
ll r = 1;
while (b) {
if (b & 1)
r = mul(r, a);
b >>= 1;
a ... | #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)
const int M = 1e9 + 7;
ll mul(ll a, ll b) { return (a * b) % M; }
ll mod_pow(ll a, ll b) {
ll r = 1;
while (b) {
if (b & 1)
r = mul(r, a);
b >>= 1;
a ... | [["+", 12, 16, 31, 23, 0, 16, 31, 16, 17, 109], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 12, 22]] | 1 | 192 |
#include <iostream>
int main() {
int N = 0;
scanf("%d", &N);
long long abc = 1;
for (int a = 0; a < N; a++) {
abc = abc * 10;
abc = abc % 1000000007;
}
long long def = 1;
for (int a = 0; a < N; a++) {
def = def * 8;
def = def % 1000000007;
}
long long ghi = 1;
for (int a = 0; a < N; ... | #include <iostream>
int main() {
int N = 0;
scanf("%d", &N);
long long abc = 1;
for (int a = 0; a < N; a++) {
abc = abc * 10;
abc = abc % 1000000007;
}
long long def = 1;
for (int a = 0; a < N; a++) {
def = def * 8;
def = def % 1000000007;
}
long long ghi = 1;
for (int a = 0; a < N; ... | [["+", 12, 16, 31, 23, 0, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 23, 0, 16, 31, 23, 0, 25], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 211 |
#include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <utility>
#include <vector>
#define INF 1000000000000000009;
#define WARU 1000000007;
using namespace std;
int gcd(int a, int b)... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <utility>
#include <vector>
#define INF 1000000000000000009;
#define WARU 1000000007;
using namespace std;
int gcd(int a, int b)... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 132], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22]] | 1 | 251 |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;
public class Main {
final static long MOD = 1000000007;
public static void main(String[] args) {
FastScanner fs = new FastScanner();
PrintWriter out = new PrintWrit... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;
public class Main {
final static long MOD = 1000000007;
public static void main(String[] args) {
FastScanner fs = new FastScanner();
PrintWriter out = new PrintWrit... | [["-", 0, 492, 3, 4, 0, 510, 15, 16, 17, 47], ["+", 0, 492, 3, 4, 0, 510, 15, 16, 17, 20]] | 3 | 903 |
// In the Name of Allah Most Gracious, Most Merciful//
/*If you want something you've never had, you have to do something you never
* did.*/
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define M 100007
#define INF 1e9
#d... | // In the Name of Allah Most Gracious, Most Merciful//
/*If you want something you've never had, you have to do something you never
* did.*/
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define M 100007
#define INF 1e9
#d... | [["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 12, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 109], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]] | 1 | 294 |
n = int(input())
ans = (10**n)%-2*(9**n)+8**n
print(ans%(10**9+7)) | n = int(input())
ans = (10**n)-2*(9**n)+8**n
print(ans%(10**9+7))
| [["-", 0, 662, 12, 657, 31, 657, 31, 657, 17, 109]] | 5 | 40 |
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) | 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%mod) | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 56 |
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define black_tree \
tree<ll, null_type, less_equal<ll>, rb_tree_tag, \
tree_order_statist... | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define black_tree \
tree<ll, null_type, less_equal<ll>, rb_tree_tag, \
tree_order_statist... | [["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["-", 12, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 33], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 1, 0, 16, 12, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 17, 109]] | 1 | 222 |
n = int(input())
if n == 1:
print(0)
if n == 2:
print(2)
else:
print((10**n-(2*9**n-8**n))%(10**9+7)) | n = int(input())
if n == 1:
print(0)
exit()
if n == 2:
print(2)
exit()
else:
print((10**n-(2*9**n-8**n))%(10**9+7)) | [["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 56 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
long mod = 1000000007;
long total = 1;
long without_0 = 1;
long wo_0and9 = 1;
for (int i = 0; i < N; i++) {
total = total * 10 % m... |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
long mod = 1000000007;
long total = 1;
long without_0 = 1;
long wo_0and9 = 1;
for (int i = 0; i < N; i++) {
total = total * 10 % m... | [["+", 49, 200, 51, 16, 31, 23, 0, 16, 17, 72], ["+", 49, 200, 51, 16, 31, 23, 0, 16, 12, 22]] | 3 | 130 |
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#include <map>
typedef long long ll;
#define REP(i, n) for (ll i = 0; i < n; i++)
#define REPR(i, n) for (ll i = n; i >= 0; i--)
#define FOR(i, m, n) for (ll i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using Graph = vector<vec... | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#include <map>
typedef long long ll;
#define REP(i, n) for (ll i = 0; i < n; i++)
#define REPR(i, n) for (ll i = n; i >= 0; i--)
#define FOR(i, m, n) for (ll i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using Graph = vector<vec... | [["+", 31, 23, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 12, 22]] | 1 | 490 |
#include <bits/stdc++.h>
#define newl "\n"
using namespace std;
using lli = long long int;
using vvint = vector<vector<int>>;
const int mod = 1e9 + 7;
const int N = 2e5 + 1;
void solve() {
lli n;
cin >> n;
lli ten = 1, nine = 1, eight = 1;
for (int i = n; i >= 1; --i) {
ten = ten * 10 % mod;
nine = ni... | #include <bits/stdc++.h>
#define newl "\n"
using namespace std;
using lli = long long int;
using vvint = vector<vector<int>>;
const int mod = 1e9 + 7;
const int N = 2e5 + 1;
void solve() {
lli n;
cin >> n;
lli ten = 1, nine = 1, eight = 1;
for (int i = n; i >= 1; --i) {
ten = ten * 10 % mod;
nine = ni... | [["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]] | 1 | 222 |
#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
long long getPower(long long base, long long power) {
if (power == 0) {
return 1;
}
long long x = getPower(base, power / 2);
x = (x * x) % MOD;
if (power % 2) {
return (base * x) % MOD;
} else {
return (x) % MOD;
}... | #include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
long long getPower(long long base, long long power) {
if (power == 0) {
return 1;
}
long long x = getPower(base, power / 2);
x = (x * x) % MOD;
if (power % 2) {
return (base * x) % MOD;
} else {
return (x) % MOD;
}... | [["+", 0, 37, 0, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 37, 0, 16, 31, 23, 0, 16, 12, 22]] | 1 | 177 |
#include <bits/stdc++.h>
#define EB emplace_back
#define int long long
#define F first
#define S second
#define N 500005
#define all(x) x.begin(), x.end()
#define endl '\n'
#define IOS \
ios::sync_with_stdio(0); ... | #include <bits/stdc++.h>
#define EB emplace_back
#define int long long
#define F first
#define S second
#define N 500005
#define all(x) x.begin(), x.end()
#define endl '\n'
#define IOS \
ios::sync_with_stdio(0); ... | [["+", 31, 23, 0, 16, 31, 16, 31, 16, 17, 109], ["+", 31, 23, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 12, 22]] | 1 | 195 |
##C - Ubiquity
##0と9が一つずつない状況
N = int(input())
print((10**N - 2*9**N + 8**N) % 10**9+7) | ##C - Ubiquity
##0と9が一つずつない状況
N = int(input())
print((10**N - 2*9**N + 8**N) % (10**9+7)) | [["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 24], ["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 25]] | 5 | 34 |
n = gets.chomp.to_i
MOD = 10 ** 9 + 7
puts (10 ** n - 9 ** n + 8 ** n) % MOD | n = gets.chomp.to_i
MOD = 10 ** 9 + 7
puts (10 ** n - 9 ** n - 9 ** n + 8 ** n) % MOD | [["+", 0, 738, 31, 739, 0, 738, 31, 738, 17, 33], ["+", 31, 739, 0, 738, 31, 738, 12, 738, 31, 612], ["+", 31, 739, 0, 738, 31, 738, 12, 738, 17, 578], ["+", 31, 739, 0, 738, 31, 738, 12, 738, 12, 22]] | 4 | 30 |
#include <algorithm>
#include <climits>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <vector>
#define mod 1000000007
using namespace std;
#define ll long long int
#define mod 1000000007
ll power(ll a, ll n) {
ll res = 1;
... |
#include <algorithm>
#include <climits>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <vector>
#define mod 1000000007
using namespace std;
#define ll long long int
#define mod 1000000007
ll power(ll a, ll n) {
ll res = 1;
... | [["+", 0, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 31, 16, 31, 23, 0, 16, 12, 22], ["-", 12, 16, 31, 23, 0, 16, 12, 23, 0, 24], ["-", 31, 23, 0, 16, 12, 23, 0, 16, 17, 109], ["-", 31, 23, 0, 16, 12, 23, 0, 16, 12, 22], ["-", 12, 16, 31, 23, 0, 16, 12, 23, 0, 25]] | 1 | 191 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pi 3.14159265358979323846
#define pdd pair<double, double>
bool comp(int a, int b) { return a > b; }
long long bigpow(long long a, long long b, long long m) {
a %= m;
long long res = 1;
while (b > 0) {
if (b & 1)
res = res * a % ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pi 3.14159265358979323846
#define pdd pair<double, double>
bool comp(int a, int b) { return a > b; }
long long bigpow(long long a, long long b, long long m) {
a %= m;
long long res = 1;
while (b > 0) {
if (b & 1)
res = res * a % ... | [["+", 0, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 12, 16, 31, 2, 3, 4, 0, 22], ["+", 31, 16, 12, 16, 31, 2, 3, 4, 0, 25], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 12, 22], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 72]] | 1 | 186 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n;
cin >> n;
ll aa = 1, pp = 1, qq = 1, ww = 1;
for (int i = 0; i < n; i++) {
aa *= 10;
pp *= 9;
qq *= 9;
ww *= 8;
aa %= 1000000007;
pp %= 1000000007;
qq %= 1000000007;
ww %= 1000000007;
}
cou... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n;
cin >> n;
ll aa = 1, pp = 1, qq = 1, ww = 1;
for (int i = 0; i < n; i++) {
aa *= 10;
pp *= 9;
qq *= 9;
ww *= 8;
aa %= 1000000007;
pp %= 1000000007;
qq %= 1000000007;
ww %= 1000000007;
}
cou... | [["+", 12, 16, 31, 23, 0, 16, 31, 16, 17, 109], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 12, 13]] | 1 | 107 |
// #pragma GCC optimize ("O3")
// #pragma GCC target ("sse4")
#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const int NINF = -1 * INF;
const long long LLINF = 1ll << 60;
const long long LLNINF = -1 * LLINF;
template <class Ch, class Tr, class Container>
basic_ostream<Ch, Tr> &operator<<(basic... | // #pragma GCC optimize ("O3")
// #pragma GCC target ("sse4")
#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const int NINF = -1 * INF;
const long long LLINF = 1ll << 60;
const long long LLNINF = -1 * LLINF;
template <class Ch, class Tr, class Container>
basic_ostream<Ch, Tr> &operator<<(basic... | [["+", 0, 2, 3, 4, 0, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 12, 2, 3, 4, 0, 25], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 109], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 22]] | 1 | 531 |
def main():
MOD = int(1e9 + 7)
n = int(input())
print((pow(10,n,MOD) - 2*pow(9 , n , MOD)%MOD + pow(8 , n , MOD) + MOD)%MOD)
if __namme__ == "__main__":
main() | def main():
MOD = int(1e9 + 7)
n = int(input())
print((pow(10,n,MOD) - 2*pow(9 , n , MOD)%MOD + pow(8 , n , MOD) + MOD)%MOD)
if __name__ == "__main__":
main() | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 0, 22]] | 5 | 70 |
#include <bits/stdc++.h>
#define r(i, a, b) for (register int i = a; i <= b; i++)
#define ll long long
#define ull unsigned long long
using namespace std;
const ll mod = 1e9 + 7;
ll qpow(ll a, ll b) {
ll res = 1;
while (b) {
if (b & 1)
res = res * a % mod;
a = a * a % mod;
b >>= 1;
}
return re... | #include <bits/stdc++.h>
#define r(i, a, b) for (register int i = a; i <= b; i++)
#define ll long long
#define ull unsigned long long
using namespace std;
const ll mod = 1e9 + 7;
ll qpow(ll a, ll b) {
ll res = 1;
while (b) {
if (b & 1)
res = res * a % mod;
a = a * a % mod;
b >>= 1;
}
return re... | [["-", 0, 14, 8, 9, 0, 37, 0, 16, 17, 109], ["-", 0, 14, 8, 9, 0, 37, 0, 16, 12, 22], ["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 12, 2, 3, 4, 0, 25]] | 1 | 148 |
#include <bits/stdc++.h>
#define rr(i, b) for (int i = 0; i < int(b); i++)
#define vi(n, a) \
vector<int> a(n); \
rr(i, n) cin >> a[i]
#define pvec(a) ... | #include <bits/stdc++.h>
#define rr(i, b) for (int i = 0; i < int(b); i++)
#define vi(n, a) \
vector<int> a(n); \
rr(i, n) cin >> a[i]
#define pvec(a) ... | [["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 25], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 12, 22]] | 1 | 175 |
#include <bits/stdc++.h>
using namespace std;
#define ms(x, y) memset(x, y, sizeof(x))
#define lowbit(x) ((x) & (-x))
#define sqr(x) ((x) * (x))
typedef long long LL;
typedef pair<int, int> pii;
typedef pair<LL, LL> pll;
const LL MOD = 1e9 + 7;
LL qpow(LL a, LL b) {
LL ret = 1;
while (b) {
if (b & 1)
(r... | #include <bits/stdc++.h>
using namespace std;
#define ms(x, y) memset(x, y, sizeof(x))
#define lowbit(x) ((x) & (-x))
#define sqr(x) ((x) * (x))
typedef long long LL;
typedef pair<int, int> pii;
typedef pair<LL, LL> pll;
const LL MOD = 1e9 + 7;
LL qpow(LL a, LL b) {
LL ret = 1;
while (b) {
if (b & 1)
(r... | [["+", 31, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 12, 2, 3, 4, 0, 25]] | 1 | 225 |
#include <algorithm>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7;
/*ll qcheng(ll x,ll y)
{
ll res=0;
while(y)
{
if(y&1) res=(res+x)%mod;
y/=2;
x=x*2%mod;
}
return res%mod;... | #include <algorithm>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7;
/*ll qcheng(ll x,ll y)
{
ll res=0;
while(y)
{
if(y&1) res=(res+x)%mod;
y/=2;
x=x*2%mod;
}
return res%mod;... | [["+", 31, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 31, 16, 31, 23, 0, 25], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 17, 109], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 12, 22], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 143 |
/*
* @Author: Kabid
* @Date: {{create_time}}
* @Last Modified by: Kabid
* @Last Modified time: 2020-09-20 20:56:55
*/
#include <bits/stdc++.h>
#include <cstdlib>
using namespace std;
#define ll long long
#define in(x) scanf("%d", &x);
#define out(x) printf("%d", x);
#define ins(x) scanf("%s", x);
#define outs(... | /*
* @Author: Kabid
* @Date: {{create_time}}
* @Last Modified by: Kabid
* @Last Modified time: 2020-09-20 20:58:29
*/
#include <bits/stdc++.h>
#include <cstdlib>
using namespace std;
#define ll long long
#define in(x) scanf("%d", &x);
#define out(x) printf("%d", x);
#define ins(x) scanf("%s", x);
#define outs(... | [["+", 31, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 31, 16, 31, 23, 0, 25], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 17, 109], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 12, 22]] | 1 | 382 |
n = int(input())
mod = 10**9+7
print(pow(10,n,mod)-pow(9,n,mod)*2%mod+pow(8,n,mod)) | n = int(input())
mod = 10**9+7
print((pow(10,n,mod)-pow(9,n,mod)*2%mod+pow(8,n,mod))%mod) | [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 31, 23, 0, 657, 12, 652, 3, 4, 0, 25], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 48 |
n = int(input())
MOD = 10**9 + 7
ans = pow(10, n, MOD)-pow(9, n, MOD) - pow(9, n, MOD) + pow(8, n, MOD)
#負の処理
ans (ans+MOD)%MOD
print(ans) | n = int(input())
MOD = 10**9 + 7
ans = pow(10, n, MOD)-pow(9, n, MOD) - pow(9, n, MOD) + pow(8, n, MOD)
#負の処理
ans = (ans+MOD)%MOD
print(ans) | [["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32]] | 5 | 65 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define REP(i, x) for (int i = 0; i < (int)(x); i++)
#define REPS(i, x) for (int i = 1; i <= (int)(x); i++)
#define RREP(i, x) for (int i = ((int)(x)-1); i >= 0; i--)
#define RREPS(i, x) fo... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define REP(i, x) for (int i = 0; i < (int)(x); i++)
#define REPS(i, x) for (int i = 1; i <= (int)(x); i++)
#define RREP(i, x) for (int i = ((int)(x)-1); i >= 0; i--)
#define RREPS(i, x) fo... | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32]] | 1 | 232 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <complex>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#incl... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <complex>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#incl... | [["+", 0, 16, 31, 16, 31, 16, 31, 16, 17, 48], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 13]] | 1 | 301 |
#include <bits/stdc++.h>
using namespace std;
#define print cout <<
#define printl(s) cout << s << endl;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
const ll modseed = pow(10, 9) + 7;
template <typename T> vector<T> getValues(int num) {
vector<T> values(num);
for (int i = 0; i < num; i+... | #include <bits/stdc++.h>
using namespace std;
#define print cout <<
#define printl(s) cout << s << endl;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
const ll modseed = pow(10, 9) + 7;
template <typename T> vector<T> getValues(int num) {
vector<T> values(num);
for (int i = 0; i < num; i+... | [["-", 0, 14, 8, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 110], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 17, 110], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 107]] | 1 | 203 |
n=int(input())
print((10**n-9**n*2+8**n)%(1e9+7)) | n=int(input())
print((10**n-9**n*2+8**n)%(10**9+7)) | [["-", 3, 4, 0, 657, 12, 23, 0, 657, 31, 531], ["+", 0, 657, 12, 23, 0, 657, 31, 657, 31, 612], ["+", 0, 657, 12, 23, 0, 657, 31, 657, 17, 578], ["+", 0, 657, 12, 23, 0, 657, 31, 657, 12, 612]] | 5 | 32 |
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
// vector<vector<ll>> data(3, vector<ll>(4));
// vector<ll> data(N);
// str s = to_string(i);
// int i = c - '0'
// sort(data.begin(), data.end());
// reverse(data.begin(), data.end());
//... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
// vector<vector<ll>> data(3, vector<ll>(4));
// vector<ll> data(N);
// str s = to_string(i);
// int i = c - '0'
// sort(data.begin(), data.end());
// reverse(data.begin(), data.end());
//... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 179 |
/*
* @Author: Nazrul Islam
* @Date: 2020-09-20 20:15:13
* @Last Modified by: Nazrul Islam
* @Last Modified time: 2020-09-20 20:43:38
*/
#include <bits/stdc++.h>
using namespace std;
#define IO \
ios_base::sync_with_stdio(false); ... | /*
* @Author: Nazrul Islam
* @Date: 2020-09-20 20:15:13
* @Last Modified by: Nazrul Islam
* @Last Modified time: 2020-09-20 21:06:57
*/
#include <bits/stdc++.h>
using namespace std;
#define IO \
ios_base::sync_with_stdio(false); ... | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32]] | 1 | 245 |
#include <iostream>
#include <set>
#include <vector>
#define take_input freopen("input.txt", "r", stdin)
#define ll long long int
#define pb push_back
#define fastIO \
ios_base::sync_with_stdio(false); \
cin.t... | #include <iostream>
#include <set>
#include <vector>
#define take_input freopen("input.txt", "r", stdin)
#define ll long long int
#define pb push_back
#define fastIO \
ios_base::sync_with_stdio(false); \
cin.t... | [["-", 0, 14, 8, 9, 0, 37, 0, 16, 17, 109], ["-", 0, 14, 8, 9, 0, 37, 0, 16, 12, 22], ["+", 51, 16, 31, 23, 0, 16, 12, 16, 31, 13], ["+", 51, 16, 31, 23, 0, 16, 12, 16, 17, 48]] | 1 | 196 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
long long a, b, c;
a = 1;
b = 1;
c = 1;
for (long long i = 0; i < n; i++) {
a = (a * 10) % 1000000007;
}
for (long long i = 0; i < n; i++) {
b = (b * 9) % 1000000007;
}
for (long long i = 0; i < n; i++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
long long a, b, c;
a = 1;
b = 1;
c = 1;
for (long long i = 0; i < n; i++) {
a = (a * 10) % 1000000007;
}
for (long long i = 0; i < n; i++) {
b = (b * 9) % 1000000007;
}
for (long long i = 0; i < n; i++) {
... | [["-", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 72]] | 1 | 165 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
ll powmod(ll x, ll n) {
ll ret = 1;
for (ll i = 0; i < n; i++) {
ret = ret * x % MOD;
}
return ret;
}
int main(void) {
ll n, ans;
cin >> n;
ans = powmod(10, n);
ans -= powmod(9, n);
ans -= powmod(9, n... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
ll powmod(ll x, ll n) {
ll ret = 1;
for (ll i = 0; i < n; i++) {
ret = ret * x % MOD;
}
return ret;
}
int main(void) {
ll n, ans;
cin >> n;
ans = powmod(10, n);
ans -= powmod(9, n);
ans -= powmod(9, n... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 132], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22]] | 1 | 128 |
n = int(input())
mod = 7+10**9
a = 10**n % mod
b = 9**n % mod
c = 8**n % mod
print(a - 2*b + c) | n = int(input())
mod = 7+10**9
a = 10**n % mod
b = 9**n % mod
c = 8**n % mod
print((a - 2*b + c)%mod) | [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 25], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 46 |
mod=10**9
n=int(input())
print((pow(10,n,mod)-(2*pow(9,n,mod)-pow(8,n,mod)))%mod) | mod=10**9+7
n=int(input())
print((pow(10,n,mod)-2*pow(9,n,mod)+pow(8,n,mod))%mod)
| [["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 612], ["-", 0, 657, 31, 23, 0, 657, 12, 23, 0, 24], ["-", 31, 23, 0, 657, 12, 23, 0, 657, 17, 33], ["+", 3, 4, 0, 657, 31, 23, 0, 657, 17, 72], ["-", 12, 23, 0, 657, 12, 652, 3, 4, 0, 25]] | 5 | 50 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(), a.end()
#define rrng(a) a.rbegin(), a.rend()
#define maxs(x, y) (x = ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(), a.end()
#define rrng(a) a.rbegin(), a.rend()
#define maxs(x, y) (x = ... | [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 23, 0, 16, 12, 23, 0, 25], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22]] | 1 | 236 |
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) | MOD=10**9+7
N=int(input())
ans=pow(10,N,MOD)
ans-=2*pow(9,N,MOD)
ans+=pow(8,N,MOD)
ans%=MOD
print(ans) | [["+", 36, 36, 0, 656, 0, 1, 0, 677, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 677, 17, 132], ["+", 36, 36, 0, 656, 0, 1, 0, 677, 12, 22]] | 5 | 51 |
#include <cstdio>
#include <queue>
#include <set>
#include <stack>
int main() {
int al = 1000000007;
long long int n, x, y, z, ans;
x = y = z = 1;
scanf("%lld", &n);
for (int i = 0; i < n; i++) {
x = x * 10;
y = y * 9;
z = z * 8;
x = (x + al) % al;
y = (y + al) % al;
z = (z + al) % al;... | #include <cstdio>
#include <queue>
#include <set>
#include <stack>
int main() {
int al = 1000000007;
long long int n, x, y, z, ans;
x = y = z = 1;
scanf("%lld", &n);
for (int i = 0; i < n; i++) {
x = x * 10;
y = y * 9;
z = z * 8;
x = (x + al) % al;
y = (y + al) % al;
z = (z + al) % al;... | [["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 143 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using st = string;
using P = pair<int, int>;
#define mrep(i, m, n) for (int i = m; i < n; i++)
#define rep(i, n) mrep(i, 0, n)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
const int mod = 1e9 + 7;
ll powmod(ll x, ll y) {
ll a... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using st = string;
using P = pair<int, int>;
#define mrep(i, m, n) for (int i = m; i < n; i++)
#define rep(i, n) mrep(i, 0, n)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
const int mod = 1e9 + 7;
ll powmod(ll x, ll y) {
ll a... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 132], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 172 |
N=int(input())
tt=10**9+7
r=0
r-=(9**N)%tt
r-=(9**N)%tt
r+=(8**N)%tt
r+=(10**N)%tt
print(r) | N=int(input())
tt=10**9+7
r=0
r-=(9**N)%tt
r-=(9**N)%tt
r+=(8**N)%tt
r+=(10**N)%tt
r=r%tt
print(r) | [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 109], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 58 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
int mpow(int a, int b) {
int res = 1;
while (b) {
if (b & 1)
res = (long long)res * a % MOD;
a = (long long)a * a % MOD;
b >>= 1;
}
return res;
}
int main() {
int n;
cin >> n;
cout << (mpow(10,... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
int mpow(int a, int b) {
int res = 1;
while (b) {
if (b & 1)
res = (long long)res * a % MOD;
a = (long long)a * a % MOD;
b >>= 1;
}
return res;
}
int main() {
int n;
cin >> n;
cout << ((ll)mpow... | [["+", 0, 16, 31, 16, 31, 16, 31, 74, 0, 24], ["+", 31, 16, 31, 16, 31, 74, 39, 77, 39, 78], ["+", 0, 16, 31, 16, 31, 16, 31, 74, 0, 25], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 31, 13], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 48]] | 1 | 127 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.