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 |
|---|---|---|---|---|
#include <bits/stdc++.h>
#define ll long long int
#define ld long double
#define pi pair<int, int>
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()
#define sz(x) ((int)x.size())
#define ln(x) ((int)x.length())
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
#define end... | #include <bits/stdc++.h>
#define ll long long int
#define ld long double
#define pi pair<int, int>
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()
#define sz(x) ((int)x.size())
#define ln(x) ((int)x.length())
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
#define end... | [["+", 12, 16, 31, 23, 0, 16, 12, 16, 31, 13], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 48]] | 1 | 267 |
#include "bits/stdc++.h"
using namespace std;
#define ll long long int
const ll mod = 1000000007;
ll power(ll a, ll b) {
ll r = 1;
for (ll i = 0; i < b; i++) {
r = (r * a) % mod;
}
return r;
}
int main() {
ll n, r;
scanf("%lld", &n);
r = 0;
r += power(10, n);
r -= 2 * power(9, n);
r += power(8... | #include "bits/stdc++.h"
using namespace std;
#define ll long long int
const ll mod = 1000000007;
ll power(ll a, ll b) {
ll r = 1;
for (ll i = 0; i < b; i++) {
r = (r * a) % mod;
}
return r;
}
int main() {
ll n, r;
scanf("%lld", &n);
r = 0;
r += power(10, n);
r -= 2 * power(9, n);
r += power(8... | [["+", 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 | 136 |
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)
| mod = pow(10, 9) + 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)
| [["-", 0, 662, 12, 657, 31, 652, 3, 4, 0, 612], ["+", 0, 662, 12, 657, 31, 652, 3, 4, 0, 612]] | 5 | 91 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 1e5 + 10;
const int mod = 1e9 + 7;
ll qpow(ll a, ll b) {
ll ans = 1;
while (b) {
if (b & 1)
ans = ans * a % mod;
a = a * a % mod;
b >>= 1;
}
return ans;
}
int main() {
ios::sync_with_stdio(false);
cout.tie... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 1e5 + 10;
const int mod = 1e9 + 7;
ll qpow(ll a, ll b) {
ll ans = 1;
while (b) {
if (b & 1)
ans = ans * a % mod;
a = a * a % mod;
b >>= 1;
}
return ans;
}
int main() {
ios::sync_with_stdio(false);
cout.tie... | [["+", 0, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 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 | 187 |
#include <bits/stdc++.h>
#define int long long
using namespace std;
int n, mod = 1e9 + 7;
inline int ksm(int a, int b) {
int ans = 1;
a = a % mod;
while (b) {
if (b & 1)
ans = (ans * a) % mod;
a = (a * a) % mod, b >>= 1;
}
return ans;
}
signed main() {
cin >> n;
cout << (ksm(10, n) - 2 * ... | #include <bits/stdc++.h>
#define int long long
using namespace std;
int n, mod = 1e9 + 7;
inline int ksm(int a, int b) {
int ans = 1;
a = a % mod;
while (b) {
if (b & 1)
ans = (ans * a) % mod;
a = (a * a) % mod, b >>= 1;
}
return ans;
}
signed main() {
cin >> n;
cout << (ksm(10, n) - (2 *... | [["+", 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 | 124 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
long long mod = 1e9 + 7;
long long bigMod(lo... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
long long mod = 1e9 + 7;
long long bigMod(lo... | [["+", 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 | 221 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define ff first
#define ss second
#defin... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define ff first
#define ss second
#defin... | [["+", 0, 1, 0, 16, 12, 16, 31, 23, 0, 24], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 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], ["+", 8, 9, 0, 1, 0, 16, 12, 16, 12, 22]] | 1 | 308 |
#include <bits/stdc++.h>
using namespace std;
#define pii pair<int, int>
#define fi first
#define se second
#define pb push_back
typedef long long ll;
typedef unsigned long long ull;
const ll mod = 1e9 + 7;
ll qmi(ll a, ll b, ll mod) {
ll res = 1;
while (b) {
if (b & 1)
res = res * a % mod;
b >>= 1;
... | #include <bits/stdc++.h>
using namespace std;
#define pii pair<int, int>
#define fi first
#define se second
#define pb push_back
typedef long long ll;
typedef unsigned long long ull;
const ll mod = 1e9 + 7;
ll qmi(ll a, ll b, ll mod) {
ll res = 1;
while (b) {
if (b & 1)
res = res * a % mod;
b >>= 1;
... | [["+", 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 | 177 |
N = int(input())
m = 10**9 +7
result = pow(10,N,m) - 2*pow(9,N,m) + pow(8,N,m)
print(result) | N = int(input())
m = 10**9 +7
result = pow(10,N,m) - 2*pow(9,N,m) + pow(8,N,m)
result = result %m
print(result) | [["+", 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 | 49 |
#include <bits/stdc++.h>
#include <cmath>
#include <string>
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() {
ll N = 0;
cin >> N;
ll ans = powmod(10, N) - powmod(9,... | #include <bits/stdc++.h>
#include <cmath>
#include <string>
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() {
ll N = 0;
cin >> N;
ll ans = powmod(10, N) - powmod(9,... | [["-", 0, 43, 49, 50, 51, 16, 12, 2, 63, 22], ["+", 0, 43, 49, 50, 51, 16, 12, 2, 63, 22]] | 1 | 130 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(x) x.begin(), x.end()
const int mod = 1000000007;
int binpow(int a, int b, int mod) {
int ans = 1;
a = a % mod;
b = b % mod;
if (b == 0)
return 1;
while (b) {
if (b & 1)
ans = ((ans % mod) * (a % mod)) % mod;
a ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(x) x.begin(), x.end()
const int mod = 1000000007;
int binpow(int a, int b, int mod) {
int ans = 1;
a = a % mod;
b = b % mod;
if (b == 0)
return 1;
while (b) {
if (b & 1)
ans = ((ans % mod) * (a % mod)) % mod;
a ... | [["+", 51, 16, 31, 16, 31, 16, 12, 23, 0, 24], ["+", 31, 16, 12, 23, 0, 2, 3, 4, 0, 25], ["+", 31, 16, 31, 16, 12, 23, 0, 16, 17, 109], ["+", 31, 16, 31, 16, 12, 23, 0, 16, 12, 22]] | 1 | 224 |
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)
| 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)) % MOD
print(ans)
| [["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 31, 23, 0, 657, 12, 652, 3, 4, 0, 25], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 109], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 85 |
/// Astalavista Code........~boy_with_no_gf
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define Br cout << endl
#define int long long
#define double long double
#define all(v) v.begin(), v.end()
#define pb push_back
#define mk make_pair
#define allr(v) v.rbegin(), v.rend()
#define PT(x) cout << (x) ... | /// Astalavista Code........~boy_with_no_gf
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define Br cout << endl
#define int long long
#define double long double
#define all(v) v.begin(), v.end()
#define pb push_back
#define mk make_pair
#define allr(v) v.rbegin(), v.rend()
#define PT(x) cout << (x) ... | [["+", 49, 50, 51, 16, 31, 23, 0, 16, 17, 72], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 12, 22]] | 1 | 451 |
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); | n = int(input())
MOD = int(1e9 + 7)
a, b, c = 1, 1, 1
for i in range(n):
a *= 10;
b *= 9;
c *= 8;
a %= MOD;
b %= MOD;
c %= MOD;
print((a - 2 * b + c) % MOD); | [["-", 0, 7, 8, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 7, 8, 196, 0, 1, 0, 677, 12, 612], ["+", 31, 23, 0, 657, 31, 657, 12, 657, 31, 612], ["+", 31, 23, 0, 657, 31, 657, 12, 657, 17, 48]] | 5 | 72 |
n = int(input())
mod = 10**9+7
ans = pow(10,n)
ans += pow(9,n)*2
ans -= pow(8,n)
print(ans%mod) | n = int(input())
mod = 10**9+7
ans = pow(10,n)
ans -= pow(9,n)*2
ans += pow(8,n)
print(ans%mod)
| [["-", 36, 36, 0, 656, 0, 1, 0, 677, 17, 107], ["+", 36, 36, 0, 656, 0, 1, 0, 677, 17, 110], ["-", 36, 36, 0, 656, 0, 1, 0, 677, 17, 110], ["+", 36, 36, 0, 656, 0, 1, 0, 677, 17, 107]] | 5 | 47 |
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))
| 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))%mod)
| [["+", 0, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 0, 657, 12, 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 | 68 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define ll long long
#define ull unsigned ... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define ll long long
#define ull unsigned ... | [["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 12, 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]] | 1 | 224 |
#include <iostream>
using namespace std;
long long int modPow(long long int a, long long int b, long long int mod) {
if (b == 0)
return 1;
long long int p = modPow(a, b / 2, mod) % mod;
p = (p * p) % mod;
return (b % 2 == 0) ? p : (a * p) % mod;
}
int main() {
int N{};
const long long int mod{static_c... | #include <iostream>
using namespace std;
long long int modPow(long long int a, long long int b, long long int mod) {
if (b == 0)
return 1;
long long int p = modPow(a, b / 2, mod) % mod;
p = (p * p) % mod;
return (b % 2 == 0) ? p : (a * p) % mod;
}
int main() {
int N{};
const long long int mod{static_c... | [["+", 0, 1, 0, 16, 12, 16, 31, 23, 0, 24], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 1, 0, 16, 12, 16, 31, 23, 0, 25]] | 1 | 185 |
#include "bits/stdc++.h"
//#include"atcoder.h"
#include <iostream>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); ++i)
const ll inf = ll(1e18) + 1;
const ll mod = pow(10, 9) + 7;
ll powmod(ll x, ll y) {
ll res = 1;
for (ll i = 0; i < y; i++) {
res = res * x % mod;
}
r... | #include "bits/stdc++.h"
//#include"atcoder.h"
#include <iostream>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); ++i)
const ll inf = ll(1e18) + 1;
const ll mod = pow(10, 9) + 7;
ll powmod(ll x, ll y) {
ll res = 1;
for (ll i = 0; i < y; i++) {
res = res * x % mod;
}
r... | [["+", 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 | 160 |
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() | 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))%m)
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 | 69 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1'000'000'007;
const ld PI = acos(-1);
const ld EPS = 0.0000000001;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define repd(i, n) for (ll ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1'000'000'007;
const ld PI = acos(-1);
const ld EPS = 0.0000000001;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define repd(i, n) for (ll ... | [["+", 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 | 255 |
#include <iostream>
#include <math.h>
using namespace std;
long long c = 1e9 + 7;
long long fast_pow(long long base, long long power) {
long long result = 1;
while (power > 0) {
if (power & 1)
result = (result * base) % c;
base = (base * base) % c;
power >>= 1;
}
return result;
}
int main() {
... | #include <iostream>
#include <math.h>
using namespace std;
long long c = 1e9 + 7;
long long fast_pow(long long base, long long power) {
long long result = 1;
while (power > 0) {
if (power & 1)
result = (result * base) % c;
base = (base * base) % c;
power >>= 1;
}
return result;
}
int main() {
... | [["+", 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, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 123 |
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)
| 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)) | [["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 24], ["+", 0, 652, 3, 4, 0, 657, 12, 23, 0, 25]] | 5 | 84 |
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) | 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
y %= x
print(y) | [["+", 75, 76, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 75, 76, 8, 196, 0, 1, 0, 677, 17, 132], ["+", 75, 76, 8, 196, 0, 1, 0, 677, 12, 22]] | 5 | 85 |
#include <algorithm>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip> //cout << fixed << setprecision(15) << x << endl;
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
const... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip> //cout << fixed << setprecision(15) << x << endl;
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
const... | [["+", 12, 16, 31, 23, 0, 16, 12, 16, 31, 13], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 48]] | 1 | 187 |
n=int(input())
ans = ((10**n)%(10**9+7) - (2*(9**n) - 8**n)%(10**9+7)%(10**9+7))
print(ans) | n=int(input())
ans = ((10**n)%(10**9+7) - (2*(9**n) - 8**n)%(10**9+7))%(10**9+7)
print(ans) | [["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 25], ["-", 12, 23, 0, 657, 12, 657, 12, 23, 0, 25]] | 5 | 59 |
n = gets.to_i
mod = 10**9 + 7
ans = 10.pow(n, mod)
ans -= 9.pow(n, mod) * 2
ans += 8.pow(n, mod)
puts ans | n = gets.to_i
mod = 10**9 + 7
ans = 10.pow(n, mod)
ans -= 9.pow(n, mod) * 2
ans += 8.pow(n, mod)
puts ans % mod | [["+", 0, 493, 0, 652, 3, 4, 0, 738, 17, 109], ["+", 0, 493, 0, 652, 3, 4, 0, 738, 12, 22]] | 4 | 46 |
#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
long long pow(int x, int n);
signed main() {
int n;
long long ans;
cin >> n;
ans = pow(10, n) - pow(9, n) - pow(9, n) + pow(8, n);
cout << (ans + MOD) % MOD << endl;
return (0);
}
long long pow(int x, int n) {
long long ... | #include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
long long pow(int x, int n);
signed main() {
int n;
long long ans;
cin >> n;
ans = (pow(10, n) - pow(9, n) - pow(9, n) + pow(8, n)) % MOD;
cout << (ans + MOD) % MOD << endl;
return (0);
}
long long pow(int x, int n) {
lo... | [["+", 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 | 139 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n, ans1 = 1, ans2 = 1, ans3 = 1, ans4 = 1, ans, mod = 1e9 + 7;
cin >> n;
for (int i = 0; i < n; i++) {
ans1 *= 10;
ans2 *= 9;
ans3 *= 9;
ans4 *= 8;
ans1 %= mod;
ans2 %= mod;
ans3 %= mod;
ans4 %= mod;
}
ans = a... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n, ans1 = 1, ans2 = 1, ans3 = 1, ans4 = 1, ans, mod = 1e9 + 7;
cin >> n;
for (int i = 0; i < n; i++) {
ans1 *= 10;
ans2 *= 9;
ans3 *= 9;
ans4 *= 8;
ans1 %= mod;
ans2 %= mod;
ans3 %= mod;
ans4 %= mod;
}
ans = (... | [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22]] | 1 | 125 |
n = int(input())
MOD = 10 ** 9 + 7
ans = pow(10, n, MOD) - 2 * pow(9, n, MOD) + pow(8, n, MOD)
print(ans) | n = int(input())
MOD = 10 ** 9 + 7
ans = (pow(10, n, MOD) - 2 * pow(9, n, MOD) + pow(8, n, MOD))%MOD
print(ans) | [["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 31, 23, 0, 657, 12, 652, 3, 4, 0, 25], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 109], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 49 |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
const ll MOD = 1e9 + 7;
ll n;
ll up(ll x, ll k) {
ll res = 1;
while (k--)
res = (res * x) % MOD;
return res;
}
int main() {
ios_base::sync_w... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
const ll MOD = 1e9 + 7;
ll n;
ll up(ll x, ll k) {
ll res = 1;
while (k--)
res = (res * x) % MOD;
return res;
}
int main() {
ios_base::sync_w... | [["+", 12, 16, 31, 23, 0, 16, 12, 16, 31, 13], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 48]] | 1 | 137 |
N = gets.chomp.to_i
waru = 10 ** 9 + 7
puts 10.pow(N, waru) - 2 * (9.pow(N, waru)) + 8.pow(N, waru) | N = gets.chomp.to_i
waru = 10 ** 9 + 7
puts (10.pow(N, waru) - 2 * (9.pow(N, waru)) + 8.pow(N, waru)) % waru | [["+", 0, 652, 3, 4, 0, 738, 31, 739, 0, 24], ["+", 31, 739, 0, 738, 12, 652, 3, 4, 0, 25], ["+", 0, 493, 0, 652, 3, 4, 0, 738, 17, 109], ["+", 0, 493, 0, 652, 3, 4, 0, 738, 12, 22]] | 4 | 45 |
#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long n;
int main() {
scanf("%lld", &n);
long long sol = 1, a = 1, b = 1;
for (int i = 0; i < n; i++) {
sol *= 10;
sol %= mod;
a *= 9;
a %= mod;
b *= 8;
b %= mod;
}
printf("%lld", (sol - 2 * a + b) ... | #include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long n;
int main() {
scanf("%lld", &n);
long long sol = 1, a = 1, b = 1;
for (int i = 0; i < n; i++) {
sol *= 10;
sol %= mod;
a *= 9;
a %= mod;
b *= 8;
b %= mod;
}
printf("%lld", (sol - 2 * a + b +... | [["+", 3, 4, 0, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 31, 13], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 17, 48], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 12, 22]] | 1 | 111 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
using ll = long long int;
const ll MOD = 1000000007;
template <class T> T mpow(T a, T n, T mod) {
T result = 1;
while (n > 0) {
if (n & 1) {
result = result * a % mod;
}
a = a * a % ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
using ll = long long int;
const ll MOD = 1000000007;
template <class T> T mpow(T a, T n, T mod) {
T result = 1;
while (n > 0) {
if (n & 1) {
result = result * a % mod;
}
a = a * a % ... | [["-", 31, 23, 0, 16, 31, 16, 12, 16, 31, 13], ["+", 0, 16, 31, 16, 31, 16, 12, 16, 31, 13], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 31, 13], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 48], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 12, 22]] | 1 | 143 |
#include <bits/stdc++.h>
using namespace std;
// Template START
#define endl "\n"
#define async \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define int long long int
#define all(y) y.begin(), y.end(... | #include <bits/stdc++.h>
using namespace std;
// Template START
#define endl "\n"
#define async \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define int long long int
#define all(y) y.begin(), y.end(... | [["+", 51, 16, 31, 23, 0, 16, 12, 16, 31, 13], ["+", 51, 16, 31, 23, 0, 16, 12, 16, 17, 48]] | 1 | 264 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll MOD = 1e9 + 7;
#define nl '\n'
#define fio \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll MOD = 1e9 + 7;
#define nl '\n'
#define fio \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | [["-", 12, 23, 0, 16, 31, 16, 12, 23, 0, 25], ["+", 0, 11, 12, 23, 0, 16, 12, 23, 0, 25]] | 1 | 143 |
#include <algorithm>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
typedef long long ll;
const int maxn = 5e5 + 10;
const ll mod = 1e9 + 7;
ll fpow(ll a, ll b) {
ll ans = 1;
while (b) {
if (b & 1)
ans = (ans * a) % mod;
b /= 2;
a = (a * a) % mod;
}
return ans % mod;... | #include <algorithm>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
typedef long long ll;
const int maxn = 5e5 + 10;
const ll mod = 1e9 + 7;
ll fpow(ll a, ll b) {
ll ans = 1;
while (b) {
if (b & 1)
ans = (ans * a) % mod;
b /= 2;
a = (a * a) % mod;
}
return ans % mod;... | [["+", 0, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 12, 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]] | 1 | 137 |
N=int(input())
print((10**N-2*9*N+8**N)%(10**9+7)) | N=int(input())
print((10**N-2*9**N+8**N)%(10**9+7)) | [["-", 31, 23, 0, 657, 31, 657, 12, 657, 17, 48], ["+", 0, 657, 31, 657, 12, 657, 12, 657, 17, 578]] | 5 | 34 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#define M 1010
#define N 1000000
#define D double
#define LL long long
#pragma GCC optimize(2)
using namespace std;
LL n, sum, k = 1e9 + 7;
LL powr(LL x, LL y) {
if (y == 0)
return 1;
if (y == 1)
... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#define M 1010
#define N 1000000
#define D double
#define LL long long
#pragma GCC optimize(2)
using namespace std;
LL n, sum, k = 1e9 + 7;
LL powr(LL x, LL y) {
if (y == 0)
return 1;
if (y == 1)
... | [["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 171 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long a, b = 1, c = 1, d = 1;
cin >> a;
if (a == 1) {
cout << 0;
return 0;
}
for (int i = 1; i <= a; i++) {
b *= 10;
c *= 9;
d *= 8;
b %= 1000000007;
c %= 1000000007;
d %= 1000000007;
}
cout << (b - c - c + d) %... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long a, b = 1, c = 1, d = 1;
cin >> a;
if (a == 1) {
cout << 0;
return 0;
}
for (int i = 1; i <= a; i++) {
b *= 10;
c *= 9;
d *= 8;
b %= 1000000007;
c %= 1000000007;
d %= 1000000007;
}
cout << (b - c - c + d + ... | [["+", 12, 16, 31, 23, 0, 16, 31, 16, 17, 72], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 12, 13], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 12, 13]] | 1 | 101 |
#include <iostream>
using namespace std;
int mod = 1e9 + 7;
long long a[100010];
int main() {
int n;
long long x = 1, y = 1, z = 1;
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
x *= 10;
x %= mod;
y *= 9;
y %= mod;
z *= 8;
z %= mod;
}
long long ans = ((x - 2 * y) % mod + z) % mod;
... | #include <iostream>
using namespace std;
int mod = 1e9 + 7;
long long a[100010];
int main() {
int n;
long long x = 1, y = 1, z = 1;
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
x *= 10;
x %= mod;
y *= 9;
y %= mod;
z *= 8;
z %= mod;
}
long long ans = ((x - 2 * y) % mod + z + mod) %... | [["+", 49, 50, 51, 16, 31, 23, 0, 16, 17, 72], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 12, 22]] | 1 | 123 |
#include <cstdio>
#include <iostream>
using namespace std;
int mod = 1000000007;
int main() {
long long n;
scanf("%lld", &n);
long long ans = 1 % mod;
long long sum = 1 % mod;
long long tot = 1 % mod;
for (int i = 1; i <= n; i++) {
ans = ans * 10 % mod;
}
for (int i = 1; i <= n; i++) {
sum = sum... | #include <cstdio>
#include <iostream>
using namespace std;
int mod = 1000000007;
int main() {
long long n;
scanf("%lld", &n);
long long ans = 1 % mod;
long long sum = 1 % mod;
long long tot = 1 % mod;
for (int i = 1; i <= n; i++) {
ans = ans * 10 % mod;
}
for (int i = 1; i <= n; i++) {
sum = sum... | [["+", 0, 16, 31, 23, 0, 16, 31, 16, 17, 72], ["+", 0, 16, 31, 23, 0, 16, 31, 16, 12, 22]] | 1 | 157 |
#include <bits/stdc++.h>
#define ll long long
#define mod 1000000007
using namespace std;
ll power(ll x, ll N) {
ll res = 1;
for (ll i = 1; i <= N; i++) {
res *= x;
res %= mod;
}
return res;
}
int main() {
ll N;
cin >> N;
ll total = power(10, N);
ll noZero = power(9, N);
ll noNine = power... | #include <bits/stdc++.h>
#define ll long long
#define mod 1000000007
using namespace std;
ll power(ll x, ll N) {
ll res = 1;
for (ll i = 1; i <= N; i++) {
res *= x;
res %= mod;
}
return res;
}
int main() {
ll N;
cin >> N;
ll total = power(10, N);
ll noZero = power(9, N);
ll noNine = power... | [["+", 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 | 137 |
n = int(input())
print((10**n -2*9**n + 8**n)/1000000007) | n = int(input())
print((10**n -2*9**n +8**n) % 1000000007) | [["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 85], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109]] | 5 | 28 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7;
void solve(int T) {
int n;
cin >> n;
ll _10 = 1, _9 = 1, _8 = 1;
for (int i = 1; i <= n; i++) {
_10 = _10 * 10 % mod;
_9 = _9 * 9 % mod;
_8 = _8 * 8 % mod;
}
cout << ((_10 - 2 * _9 + mod) % mod + _8) % mo... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7;
void solve(int T) {
int n;
cin >> n;
ll _10 = 1, _9 = 1, _8 = 1;
for (int i = 1; i <= n; i++) {
_10 = _10 * 10 % mod;
_9 = _9 * 9 % mod;
_8 = _8 * 8 % mod;
}
cout << ((_10 - 2 * _9 % mod + mod) % mod + _8... | [["+", 31, 23, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 12, 22]] | 1 | 143 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define T \
int t; \
cin >> t; \
whil... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define T \
int t; \
cin >> t; \
whil... | [["+", 12, 16, 31, 23, 0, 16, 12, 16, 31, 13], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 48]] | 1 | 155 |
// Starting with the name of Allah
#include <bits/stdc++.h>
#define ll long long
#define nl endl
#define Nayon \
ios::sync_with_stdio(0); \
cin.tie(0); ... | // Starting with the name of Allah
#include <bits/stdc++.h>
#define ll long long
#define nl endl
#define Nayon \
ios::sync_with_stdio(0); \
cin.tie(0); ... | [["+", 0, 16, 31, 23, 0, 16, 31, 23, 0, 24], ["+", 12, 16, 31, 23, 0, 16, 31, 23, 0, 25], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 316 |
#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
long long repow(long long x, long long y) {
if (y == 0)
return 1;
long long res = 1;
while (y != 0) {
if (y & 1)
res = res * x % MOD;
x = x * x % MOD;
y >>= 1;
}
return res;
}
int main() {
int N;
cin >> N;
long ... | #include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
long long repow(long long x, long long y) {
if (y == 0)
return 1;
long long res = 1;
while (y != 0) {
if (y & 1)
res = res * x % MOD;
x = x * x % MOD;
y >>= 1;
}
return res;
}
int main() {
int N;
cin >> N;
... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 0, 30, 0, 43, 39, 86, 0, 96], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 12, 22]] | 1 | 148 |
#include <bits/stdc++.h>
#define ll long long int
#define db double
#define pb push_back
#define mpr make_pair
#define andl "\n"
#define f first
#define s second
#define mset(x, y) memset(x, y, sizeof(x))
#define fr(i, n) for (long long int i = 0; i < n; i++)
#define trace(it, x) for (auto it = (x).begin(); it != (x).e... | #include <bits/stdc++.h>
#define ll long long int
#define db double
#define pb push_back
#define mpr make_pair
#define andl "\n"
#define f first
#define s second
#define mset(x, y) memset(x, y, sizeof(x))
#define fr(i, n) for (long long int i = 0; i < n; i++)
#define trace(it, x) for (auto it = (x).begin(); it != (x).e... | [["+", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 17, 132], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35]] | 1 | 213 |
import java.util.Scanner;
public class Main {
static final long MOD = 1_000_000_007;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
long ans = modPow(10, n) - modPow(9, n) - modPow(9, n) + modPow(8, n);
ans = (ans + MOD) % MOD;
System.out... | import java.util.Scanner;
public class Main {
static final long MOD = 1_000_000_007;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
long ans = modPow(10, n) - modPow(9, n) - modPow(9, n) + modPow(8, n);
ans %= MOD;
ans = (ans + MOD) % MOD;... | [["+", 0, 195, 8, 196, 0, 1, 0, 11, 17, 132], ["+", 0, 195, 8, 196, 0, 1, 0, 11, 12, 22], ["+", 8, 498, 0, 195, 8, 196, 0, 1, 0, 35], ["+", 0, 195, 8, 196, 0, 1, 0, 11, 31, 22]] | 3 | 151 |
n = int(input())
MOD = 10 ** 9 + 7
print(pow(10, n, MOD) - 2 * pow(9, n, MOD) + pow(8, n, MOD)) | n = int(input())
MOD = 10 ** 9 + 7
print((pow(10, n, MOD) - 2 * 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 | 46 |
#include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define ld long double
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define pf push_front
#define ff first
#define ss second
#define max(a, b) (a > b ? a : b)
#define min(a, b) (a < b ? a : b)
/////////////////////////////////... | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define ld long double
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define pf push_front
#define ff first
#define ss second
#define max(a, b) (a > b ? a : b)
#define min(a, b) (a < b ? a : b)
/////////////////////////////////... | [["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 224 |
#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<pair<int, int>, null_type, less<pair<int, 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<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag, ... | [["+", 0, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 31, 16, 31, 23, 0, 16, 12, 22]] | 1 | 811 |
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define FAST \
ios_base::sync_with_stdio(0); ... | #pragma GCC optimize("O3")
#pragma GCC target("sse4")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define FAST \
ios_base::sync_with_stdio(0); ... | [["+", 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 | 414 |
#include <bits/stdc++.h>
using namespace std;
// DEFINE and
// TYPEDEF--------------------------------------------------------------
// For actual content check from line 85
#define FORG(i, a, n) \
for (lld i = (lld)a; a < n ? i < (lld)n : (lld)n < i; ... | #include <bits/stdc++.h>
using namespace std;
// DEFINE and
// TYPEDEF--------------------------------------------------------------
// For actual content check from line 85
#define FORG(i, a, n) \
for (lld i = (lld)a; a < n ? i < (lld)n : (lld)n < i; ... | [["+", 31, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]] | 1 | 780 |
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <ctype.h>
#include <iostream>
#include <stack>
#include <string>
#include <vector>
#define _GLIBCXX_DEBUG
using namespace std;
int main() {
int n;
long long mod = 1000000007;
cin >> n;
long long a = 1, b = 1, c = 1;
for (int i = 0; i < n; i++)... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <ctype.h>
#include <iostream>
#include <stack>
#include <string>
#include <vector>
#define _GLIBCXX_DEBUG
using namespace std;
int main() {
int n;
long long mod = 1000000007;
cin >> n;
long long a = 1, b = 1, c = 1;
for (int i = 0; i < n; i++)... | [["+", 12, 16, 31, 23, 0, 16, 12, 16, 31, 13], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 48]] | 1 | 113 |
#include <bits/stdc++.h>
using namespace std;
template <typename T> void drop(const T &x) {
cout << x << '\n';
exit(0);
}
const long long MOD = 1e9 + 7;
int64_t powmod(int a, int n) {
int64_t ans = 1;
for (int i = 0; i < n; ++i)
ans = (ans * a) % MOD;
return ans;
}
void solve() {
int n;
cin >> n;
... | #include <bits/stdc++.h>
using namespace std;
template <typename T> void drop(const T &x) {
cout << x << '\n';
exit(0);
}
const long long MOD = 1e9 + 7;
int64_t powmod(int a, int n) {
int64_t ans = 1;
for (int i = 0; i < n; ++i)
ans = (ans * a) % MOD;
return ans;
}
void solve() {
int n;
cin >> n;
... | [["+", 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 | 182 |
// I AM THE CREED
/* //I AM THE CREED
/* package codechef; // don't place package name! */
import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args... | // I AM THE CREED
/* //I AM THE CREED
/* package codechef; // don't place package name! */
import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args... | [["+", 0, 16, 31, 23, 0, 16, 12, 16, 31, 499], ["+", 0, 16, 31, 23, 0, 16, 12, 16, 17, 48]] | 3 | 220 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
const ll mod = 1000000007;
ll powmod(ll x, ll y) {
ll res = 1;
rep(i, y) res = res * x % mod;
return res;
}
int main() {
ll N;
cin >> N;
// (全事象) - (0を含まない) - (9を含まない) + (0も9も含まない)
ll ans = ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
const ll mod = 1000000007;
ll powmod(ll x, ll y) {
ll res = 1;
rep(i, y) res = res * x % mod;
return res;
}
int main() {
ll N;
cin >> N;
ll ans = powmod(10, N) - powmod(9, N) - 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 | 120 |
N = int(input())
mod = pow(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) | N = int(input())
mod = pow(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%mod) | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 62 |
#include <bits/stdc++.h>
#include <ctime>
#include <stdlib.h>
#include <unordered_map>
using namespace std;
#define ll long long int
#define mod 1000000007
#define modd 998244353
#define com(a, n) \
for (ll i = 0; i < n; i++) ... | #include <bits/stdc++.h>
#include <ctime>
#include <stdlib.h>
#include <unordered_map>
using namespace std;
#define ll long long int
#define mod 1000000007
#define modd 998244353
#define com(a, n) \
for (ll i = 0; i < n; i++) ... | [["+", 3, 4, 0, 16, 31, 16, 12, 2, 63, 22], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 25]] | 1 | 393 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vll;
#define fi first
#define print(v) \
for (ll i : v) \
cout << i << ss
#de... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vll;
#define fi first
#define print(v) \
for (ll i : v) \
cout << i << ss
#de... | [["-", 0, 11, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 12, 16, 31, 23, 0, 16, 31, 16, 17, 33], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 275 |
/* --------------------
| LOSER |
| ~NOOBOSS~ |
--------------------
*/
#include <bits/stdc++.h>
using namespace std;
#define mxx LLONG_MAX
#define mnn LLONG_MIN
#define Y() cout << "YES" << endl
#define N() cout << "NO" << endl
#define endl "\n"
#define max_3(a, b, c) max(a, max(b,... | /* --------------------
| LOSER |
| ~NOOBOSS~ |
--------------------
*/
#include <bits/stdc++.h>
using namespace std;
#define mxx LLONG_MAX
#define mnn LLONG_MIN
#define Y() cout << "YES" << endl
#define N() cout << "NO" << endl
#define endl "\n"
#define max_3(a, b, c) max(a, max(b,... | [["+", 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 | 480 |
import java.util.*;
public class Main {
static long mod = 1000000007;
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
if (n == 1) {
System.out.println(0);
return;
}
long ans = pow(10, n) - pow(9, n) - pow(9, n) + pow(8, n);
an... | import java.util.*;
public class Main {
static long mod = 1000000007;
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
if (n == 1) {
System.out.println(0);
return;
}
long ans = pow(10, n) - pow(9, n) - pow(9, n) + pow(8, n);
wh... | [["+", 8, 498, 0, 195, 8, 196, 0, 52, 0, 89], ["+", 0, 195, 8, 196, 0, 52, 15, 15, 0, 24], ["+", 8, 196, 0, 52, 15, 15, 0, 16, 31, 22], ["+", 8, 196, 0, 52, 15, 15, 0, 16, 17, 18], ["+", 8, 196, 0, 52, 15, 15, 0, 16, 12, 499], ["+", 0, 195, 8, 196, 0, 52, 15, 15, 0, 25]] | 3 | 162 |
#include <bits/stdc++.h>
using namespace std;
#define pp pair<int, int>
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rep2(i, m, n) for (int(i) = (m); (i) < (n); (i)++)
#define ll long long
#define ld long double
#define all(a) (a).begin(), (a).end()
#define mk make_pair
ll mod = 998244353;
int inf = 100... | #include <bits/stdc++.h>
using namespace std;
#define pp pair<int, int>
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rep2(i, m, n) for (int(i) = (m); (i) < (n); (i)++)
#define ll long long
#define ld long double
#define all(a) (a).begin(), (a).end()
#define mk make_pair
ll mod = 998244353;
int inf = 100... | [["+", 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 | 144 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define endl '\n'
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define F first
#define S second
#define debug1(a) cout << #a << " " << (a) << endl;
#define debug2(a, b) ... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define endl '\n'
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
#define F first
#define S second
#define debug1(a) cout << #a << " " << (a) << endl;
#define debug2(a, b) ... | [["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 35], ["+", 75, 76, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 75, 76, 0, 57, 64, 9, 0, 37, 0, 38]] | 1 | 379 |
N = int(input())
mod = 10**9+7
ans = pow(10,N,mod) - 2*pow(9,N,mod) + pow(8,N,mod)
print(ans) | N = int(input())
mod = 10**9+7
ans = pow(10,N,mod) - 2*pow(9,N,mod) + pow(8,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 | 49 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define sz(a) (int)(a.size())
#define pb push_back
#define all(c) c.begin(), c.end()
#define tr(it, a, c) for (auto it = c.begin() + a; it != c.end(); it++)
#define fr(i, a, n) for (int i = a; i < n; i++)
#define present(c, x) (c.f... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define sz(a) (int)(a.size())
#define pb push_back
#define all(c) c.begin(), c.end()
#define tr(it, a, c) for (auto it = c.begin() + a; it != c.end(); it++)
#define fr(i, a, n) for (int i = a; i < n; i++)
#define present(c, x) (c.f... | [["+", 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, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 581 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define maxn 200005
ll mod = 1e9 + 7;
int main() {
ll n;
cin >> n;
ll ans1 = 1;
ll ans2 = 1;
ll ans3 = 1;
for (int i = 0; i < n; i++) {
ans1 = ans1 * 10;
ans2 = ans2 * 9;
ans3 = ans3 * 8;
ans1 = ans1 % mod;
ans2 = an... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define maxn 200005
ll mod = 1e9 + 7;
int main() {
ll n;
cin >> n;
ll ans1 = 1;
ll ans2 = 1;
ll ans3 = 1;
for (int i = 0; i < n; i++) {
ans1 = ans1 * 10;
ans2 = ans2 * 9;
ans3 = ans3 * 8;
ans1 = ans1 % mod;
ans2 = an... | [["+", 31, 16, 31, 16, 12, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 16, 12, 16, 31, 23, 0, 25], ["+", 0, 16, 31, 16, 31, 16, 12, 16, 17, 109], ["+", 0, 16, 31, 16, 31, 16, 12, 16, 12, 22]] | 1 | 117 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, e) for (int i = (s); (i) < (int)(e); ++(i))
#define REP(i, e) FOR(i, 0, e)
#define each(it, c) \
for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it)
#define all(o) (o).begin(), (... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, e) for (int i = (s); (i) < (int)(e); ++(i))
#define REP(i, e) FOR(i, 0, e)
#define each(it, c) \
for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it)
#define all(o) (o).begin(), (... | [["+", 49, 50, 51, 16, 31, 23, 0, 16, 17, 72], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 206 |
MOD = int(1e9 + 7)
n=int(input())
ans = pow(10, n, MOD)
ans -= 2 * pow(9, n, MOD)
ans += pow(8, n, MOD)
print(ans)
| MOD = int(1e9 + 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 | 52 |
def main():
MOD = 10 ** 9 + 7
N = int(input())
ans = pow(10, N, MOD) - pow(9, N, MOD) * 2 + pow(8, N, MOD)
print(ans)
# import sys
# sys.setrecursionlimit = 10 ** 7
# input = sys.stdin.readline
# rstrip()
# (int(x) - 1 for x in input().split())
pass
if __name__ == '__main__':... | def main():
MOD = 10 ** 9 + 7
N = int(input())
ans = (pow(10, N, MOD) - pow(9, N, MOD) * 2 + pow(8, N, MOD)) % MOD
print(ans)
if __name__ == '__main__':
main()
| [["+", 0, 1, 0, 662, 12, 657, 31, 23, 0, 24], ["+", 31, 23, 0, 657, 12, 652, 3, 4, 0, 25], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 109], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 22], ["-", 0, 656, 0, 14, 8, 196, 0, 674, 0, 675]] | 5 | 78 |
#include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main() {
ll n;
cin >> n;
ll ans = 1;
ll mod = (ll)(1e9 + 7);
ll res1, res2, res3;
res1 = res2 = res3 = 1;
for (int i = 1; i <= n; i++) {
res1 = (res1 * 10) % mod;
res2 = (res2 * 9) % mod;
res3 = (res3 * 8) % mod;
}
... | #include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main() {
ll n;
cin >> n;
ll ans = 1;
ll mod = (ll)(1e9 + 7);
ll res1, res2, res3;
res1 = res2 = res3 = 1;
for (int i = 1; i <= n; i++) {
res1 = (res1 * 10) % mod;
res2 = (res2 * 9) % mod;
res3 = (res3 * 8) % mod;
}
... | [["+", 31, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 17, 109], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 31, 16, 31, 23, 0, 16, 12, 22], ["+", 31, 23, 0, 16, 31, 16, 31, 23, 0, 25]] | 1 | 126 |
#include <bits/stdc++.h>
#define ll long long
#define MOD 1000000007
using namespace std;
ll solve(ll x, ll y) {
ll prod = 1;
for (int i = 1; i <= y; i++) {
prod *= x;
prod %= MOD;
}
return prod;
}
int main() {
ll n;
cin >> n;
ll ans1 = solve(10, n) % MOD;
ll ans2 = solve(9, n) % MOD;
ll ans3... | #include <bits/stdc++.h>
#define ll long long
#define MOD 1000000007
using namespace std;
ll solve(ll x, ll y) {
ll prod = 1;
for (int i = 1; i <= y; i++) {
prod *= x;
prod %= MOD;
}
return prod;
}
int main() {
ll n;
cin >> n;
ll ans1 = solve(10, n) % MOD;
ll ans2 = solve(9, n) % MOD;
ll ans3... | [["+", 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 | 146 |
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 # 最後に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 # 最後にMODを取り忘れないように気をつけましょう
print(ans) | [["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 140], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 17, 578]] | 5 | 55 |
#include <bits/stdc++.h>
#define ll long long int
using namespace std;
const int mod = 1e9 + 7;
ll Big_Mod(ll value, ll power) {
if (power == 0)
return 1;
ll ans = Big_Mod(value, power / 2);
ans = (ans * ans) % mod;
if (power % 2)
ans = (ans * value) % mod;
return ans;
}
void solve() {
ll n, ... | #include <bits/stdc++.h>
#define ll long long int
using namespace std;
const int mod = 1e9 + 7;
ll Big_Mod(ll value, ll power) {
if (power == 0)
return 1;
ll ans = Big_Mod(value, power / 2);
ans = (ans * ans) % mod;
if (power % 2)
ans = (ans * value) % mod;
return ans;
}
void solve() {
ll n, ... | [["+", 75, 76, 0, 9, 0, 1, 0, 11, 17, 132], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22]] | 1 | 213 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll M = 1e9 + 7;
ll mod(ll a) { return ((a % M) + M) % M; }
ll pow(ll a, ll b) {
if (b == 0)
return 1ll;
if (b % 2)
return mod(a * pow(a, b - 1));
ll s = pow(a, b / 2);
return mod(s * s);
}
int main() {
ll n;
cin >> n;
ll ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll M = 1e9 + 7;
ll mod(ll a) { return ((a % M) + M) % M; }
ll pow(ll a, ll b) {
if (b == 0)
return 1ll;
if (b % 2)
return mod(a * pow(a, b - 1));
ll s = pow(a, b / 2);
return mod(s * s);
}
int main() {
ll n;
cin >> n;
ll ... | [["+", 0, 1, 0, 16, 31, 16, 12, 2, 63, 22], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["-", 31, 16, 12, 16, 31, 16, 12, 16, 31, 13], ["+", 3, 4, 0, 16, 31, 16, 12, 16, 31, 13], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 25]] | 1 | 155 |
/////////////////////////////////TEST CASES////////////////////////////////////
/*
*/
/////////////////////////////////////CODE//////////////////////////////////////
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define FORD(i, a, b) for (ll i = a; i > b; i--)
#defin... | /////////////////////////////////TEST CASES////////////////////////////////////
/*
*/
/////////////////////////////////////CODE//////////////////////////////////////
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define FORD(i, a, b) for (ll i = a; i > b; i--)
#defin... | [["+", 0, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 203 |
#include <iostream>
#define Nfor(N) for (int i = 0; i < N; i++)
using namespace std;
typedef long long ll;
const int mod = 1000000007;
int pow(int a, int b) {
int ret = 1;
Nfor(b) ret = (1LL * ret * b) % mod;
return ret;
}
int main() {
int N;
cin >> N;
ll ans = pow(10, N);
ans -= 2LL * pow(9, N);
ans... | #include <iostream>
#define Nfor(N) for (int i = 0; i < N; i++)
using namespace std;
typedef long long ll;
const int mod = 1000000007;
int pow(int a, int b) {
int ret = 1;
Nfor(b) ret = (1LL * ret * a) % mod;
return ret;
}
int main() {
int N;
cin >> N;
ll ans = pow(10, N);
ans -= 2LL * pow(9, N);
ans... | [["-", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 123 |
#include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#define mod (int)1000000007
#define int long long
using namespace std;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
int v... | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#define mod (int)1000000007
#define int long long
using namespace std;
#define FAST \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
int v... | [["+", 12, 16, 31, 23, 0, 16, 12, 16, 31, 13], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 48]] | 1 | 367 |
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Scanner;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
... | import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Scanner;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
... | [["-", 0, 1, 0, 492, 3, 4, 0, 510, 75, 499], ["+", 0, 1, 0, 492, 3, 4, 0, 510, 75, 499]] | 3 | 337 |
////=====BIsmillahir Rahmanir Rahim =====////
/* ______
_______ /\ |``\ | | /
| / \ |__/ |____ |/
| / _ _\ | \ | |\
| / \ | \ |______ | \
Dept. of CSE
Comilla University
*/
#include <bits/stdc++.h>
#incl... | ////=====BIsmillahir Rahmanir Rahim =====////
/* ______
_______ /\ |``\ | | /
| / \ |__/ |____ |/
| / _ _\ | \ | |\
| / \ | \ |______ | \
Dept. of CSE
Comilla University
*/
#include <bits/stdc++.h>
#incl... | [["+", 0, 16, 31, 23, 0, 16, 31, 23, 0, 24], ["+", 31, 23, 0, 16, 12, 2, 3, 4, 0, 25], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 17, 109], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 12, 22]] | 1 | 532 |
n=int(input())
mod=10**9+7
def pw(k,t):
return pow(k,t,mod)
ans=pw(10,n)-pw(9,n)*2+pw(8,n)
print(ans) | n=int(input())
mod=10**9+7
def pw(k,t):
return pow(k,t,mod)
ans=pw(10,n)-pw(9,n)*2+pw(8,n)
print(ans%mod) | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 109], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 22]] | 5 | 60 |
#include <algorithm>
#include <array>
#include <climits>
#include <cmath>
#include <cstdint>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
inline namespace atcoder {
template <typename T, size_t Depth> struct vector_helper {
using type = vector<typename vector_helper<T, Depth - 1>::typ... | #include <algorithm>
#include <array>
#include <climits>
#include <cmath>
#include <cstdint>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
inline namespace atcoder {
template <typename T, size_t Depth> struct vector_helper {
using type = vector<typename vector_helper<T, Depth - 1>::typ... | [["-", 0, 30, 0, 14, 8, 9, 0, 57, 0, 121], ["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89]] | 1 | 301 |
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
int main(void) {
long long int n, a = 1, b = 1, c = 1, d;
cin >> n;
for (int i = 0; i < n; i++) {
a = (a * 10) % MOD;
b = (b * 9) % MOD;
c = (c * 8) % MOD;
}
d = (a + c - b - b + MOD) % MOD;
cout << d << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
int main(void) {
long long int n, a = 1, b = 1, c = 1, d;
cin >> n;
for (int i = 0; i < n; i++) {
a = (a * 10) % MOD;
b = (b * 9) % MOD;
c = (c * 8) % MOD;
}
d = (a + c - b - b + MOD + MOD) % MOD;
cout << d << endl;
retur... | [["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 110 |
#include <bits/stdc++.h>
#include <cmath>
#include <string>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define all(v) v.begin(), v.end()
#define sz(x) ((int)(x).size())
#define fi first
#define se second
#define deb(x) cout << #x << '=' << x << endl
#define MOD 100000000... | #include <bits/stdc++.h>
#include <cmath>
#include <string>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define all(v) v.begin(), v.end()
#define sz(x) ((int)(x).size())
#define fi first
#define se second
#define deb(x) cout << #x << '=' << x << endl
#define MOD 100000000... | [["+", 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 | 215 |
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int n;
cin >> n;
long long ans = 1, sol = 0;
for (int i = 1; i <= n; i++) {
ans = (ans * 10) % 1000000007;
}
sol = (sol + ans) % 1000000007;
ans = 1;
for (int i = 1; i <= n; i++) {
ans = (ans * 9) % 1000000007;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int n;
cin >> n;
long long ans = 1, sol = 0;
for (int i = 1; i <= n; i++) {
ans = (ans * 10) % 1000000007;
}
sol = (sol + ans) % 1000000007;
ans = 2;
for (int i = 1; i <= n; i++) {
ans = (ans * 9) % 1000000007;
... | [["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["-", 12, 16, 31, 23, 0, 16, 12, 16, 31, 13], ["-", 12, 16, 31, 23, 0, 16, 12, 16, 17, 48]] | 1 | 157 |
#include <algorithm>
#include <iostream>
#include <queue>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using namespace std;
const int INF = 1001001001;
const ll mod = 1e9 + 7;
ll powmod(ll x, ll y) {
ll res = 1;
for (int i = 0; i < y; i++) {
res = res * x % mod;
}
return res;
}
i... | #include <algorithm>
#include <iostream>
#include <queue>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using namespace std;
const int INF = 1001001001;
const ll mod = 1e9 + 7;
ll powmod(ll x, ll y) {
ll res = 1;
for (int i = 0; i < y; i++) {
res = res * x % mod;
}
return res;
}
i... | [["+", 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 | 140 |
#include <iostream>
using ll = long long;
using namespace std;
int main() {
ll N;
ll mod = 1000000007;
cin >> N;
ll ten = 1;
ll eight = 1;
ll nine = 1;
for (ll i = 0; i < N; i++) {
ten *= 10;
eight *= 8;
nine *= 9;
ten %= mod;
eight %= mod;
nine %= mod;
}
ll res = ten + eight -... | #include <iostream>
using ll = long long;
using namespace std;
int main() {
ll N;
ll mod = 1000000007;
cin >> N;
ll ten = 1;
ll eight = 1;
ll nine = 1;
for (ll i = 0; i < N; i++) {
ten *= 10;
eight *= 8;
nine *= 9;
ten %= mod;
eight %= mod;
nine %= mod;
}
ll res = ten + eight -... | [["+", 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 | 121 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pii pair<int, int>
#define fi first
#define se second
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
#define pb push_back
#define faster \
ios_base::sync_with_stdio... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pii pair<int, int>
#define fi first
#define se second
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
#define pb push_back
#define faster \
ios_base::sync_with_stdio... | [["+", 31, 16, 12, 23, 0, 16, 31, 16, 17, 109], ["+", 31, 16, 12, 23, 0, 16, 31, 16, 12, 22], ["-", 12, 16, 31, 23, 0, 16, 12, 16, 17, 109], ["+", 0, 16, 12, 16, 31, 23, 0, 16, 17, 72]] | 1 | 199 |
N = int(input())
MOD = 1000000007
ans = 0
ans = pow(10, N, MOD) - 2 * pow(9, N, MOD) + pow(8, N, MOD)
print(ans) | N = int(input())
MOD = 1000000007
ans = 0
ans = pow(10, N, MOD) - 2 * pow(9, N, MOD) + 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 | 48 |
#include <iostream>
using namespace std;
constexpr long long MOD = 1000000007;
long long pow_mod(long long b, long long e) {
long long res = 1;
for (long long i = 0; i < e; i++)
res = (res * b) % MOD;
return res;
}
int main() {
long long n;
cin >> n;
long long res =
((pow_mod(10, n) - (2ll * p... | #include <iostream>
using namespace std;
constexpr long long MOD = 1000000007;
long long pow_mod(long long b, long long e) {
long long res = 1;
for (long long i = 0; i < e; i++)
res = (res * b) % MOD;
return res;
}
int main() {
long long n;
cin >> n;
long long res =
((pow_mod(10, n) - (2ll * p... | [["+", 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 | 123 |
#include <bits/stdc++.h>
using namespace std;
/******* All Required define Pre-Processors and Constants *******/
#define int long long
#define ull unsigned long long
#define ld long double
#define mem(a, b) memset(a, (b), sizeof(a))
#define rep(i, j, k) for (int i = j; i < k; ++i)
#define rrep(i, j, k) for (int i ... | #include <bits/stdc++.h>
using namespace std;
/******* All Required define Pre-Processors and Constants *******/
#define int long long
#define ull unsigned long long
#define ld long double
#define mem(a, b) memset(a, (b), sizeof(a))
#define rep(i, j, k) for (int i = j; i < k; ++i)
#define rrep(i, j, k) for (int i ... | [["+", 49, 50, 51, 16, 31, 23, 0, 16, 17, 72], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 12, 22]] | 1 | 415 |
M = 10**9 + 7
def main():
n = int(input())
a = 1
b = 1
c = 1
for i in range(n):
a *= 10
a %= M
b *= 9
b %= M
c *= 8
c %= M
print(a - b - b + c)
if __name__ == '__main__':
main()
| M = 10**9 + 7
def main():
n = int(input())
a = 1
b = 1
c = 1
for i in range(n):
a *= 10
a %= M
b *= 9
b %= M
c *= 8
c %= M
print((a - b - b + c) % M)
if __name__ == '__main__':
main()
| [["+", 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 | 75 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using pint = pair<int, int>;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
const int MOD = 1000000007;
const long long INF = 1LL << 60;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a =... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using pint = pair<int, int>;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
const int MOD = 1000000007;
const long long INF = 1LL << 60;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a =... | [["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48]] | 1 | 259 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n = sc.nextInt();
long ans = power(10, n) - power(9, n) - power(9, n) + power(8, n);
ans = (ans + 1000000007) % 1000000007;
System.out.println(ans);
}
static long powe... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n = sc.nextInt();
long ans = power(10, n) - power(9, n) - power(9, n) + power(8, n);
ans %= 1000000007;
ans = (ans + 1000000007) % 1000000007;
System.out.println(ans);
... | [["+", 0, 195, 8, 196, 0, 1, 0, 11, 17, 132], ["+", 0, 195, 8, 196, 0, 1, 0, 11, 12, 499], ["+", 8, 498, 0, 195, 8, 196, 0, 1, 0, 35], ["+", 0, 195, 8, 196, 0, 1, 0, 11, 31, 22]] | 3 | 185 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
const int M = 1000000007;
long long powmod(long long x, long long y) {
long long res = 1;
for (long long i = 0; i < y; i++) {
res *= x % M;
}
return res;
}
int main() {
int N;
cin >> N;
long long ans = powmod(10, N) - po... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
const int M = 1000000007;
long long powmod(long long x, long long y) {
long long res = 1;
for (long long i = 0; i < y; i++) {
res = res * x % M;
}
return res;
}
int main() {
int N;
cin >> N;
long long ans = powmod(10, N)... | [["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 108], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 31, 22], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48]] | 1 | 127 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1e9;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
#define PI 3.14159265358979323846264338327950L
#define MOD 1000000007
// setprecision(15)
ll ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1e9;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
#define PI 3.14159265358979323846264338327950L
#define MOD 1000000007
// setprecision(15)
ll ... | [["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22]] | 1 | 213 |
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define endl "\n"
i64 MOD = 1e9 + 7;
i64 pow(i64 x, i64 n) {
i64 r = 1;
for (i64 i = 0; i < n; i++)
r = r * x % MOD;
return r;
}
int main() {
i64 N;
cin >> N;
i64 ans = pow(10LL, N) + pow(8LL, N) - pow(9LL, N) * 2;
cout << (ans + ... | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define endl "\n"
i64 MOD = 1e9 + 7;
i64 pow(i64 x, i64 n) {
i64 r = 1;
for (i64 i = 0; i < n; i++)
r = r * x % MOD;
return r;
}
int main() {
i64 N;
cin >> N;
i64 ans = pow(10LL, N) + pow(8LL, N) - pow(9LL, N) * 2;
cout << (ans + ... | [["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 48], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 12, 13]] | 1 | 117 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007
ll powmd(ll a, ll b) {
ll ans = 1;
while (b) {
if (b & 1) {
ans = (ans * a) % mod;
}
a = (a * a) % mod;
b = b >> 1;
}
return (ans);
}
int main() {
ll n;
cin >> n;
if (n <= 2) {
cout << 0 <... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007
ll powmd(ll a, ll b) {
ll ans = 1;
while (b) {
if (b & 1) {
ans = (ans * a) % mod;
}
a = (a * a) % mod;
b = b >> 1;
}
return (ans);
}
int main() {
ll n;
cin >> n;
if (n < 2) {
cout << 0 <<... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]] | 1 | 174 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.