s_id string | p_id string | u_id string | date string | language string | original_language string | filename_ext string | status string | cpu_time string | memory string | code_size string | code string | error string | stdout string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s650789126 | p02554 | u417365712 | 1600080047 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9020 | 75 | n = int(input())
print(pow(10, n, mod) - 2*pow(9, n, mod) - pow(9, n, mod)) | Traceback (most recent call last):
File "/tmp/tmp1q25uhqs/tmpe9uyy4j8.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s771627587 | p02554 | u329319441 | 1600068828 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9144 | 224 | N = int(input())
MOD = 10 ** 9 + 7
if N == 1:
print(0)
exit()
a = 1
b = 1
c = 1
for i in range(N):
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) | Traceback (most recent call last):
File "/tmp/tmpbreyksq8/tmpcibuxh4x.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s248999346 | p02554 | u243312682 | 1600061251 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9076 | 694 | 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)... | Traceback (most recent call last):
File "/tmp/tmpry4q69k8/tmpz2ru89lv.py", line 28, in <module>
main()
File "/tmp/tmpry4q69k8/tmpz2ru89lv.py", line 2, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s213791717 | p02554 | u595893956 | 1600057445 | Python | Python (3.8.2) | py | Runtime Error | 128 | 9068 | 250 | def bekijou(a,x):
MOD = 1000000009
ret = 1
for _ in range(x):
ret *= a
ret %= MOD
n=int(input())
ret = 0
sum = bekijou(9,n)
MOD = 1000000009
ret = (2 * sum) % MOD
ret += MOD - bekijou(8,n)
ret = bekijou(10,n) + MOD - ret
print(ret) | Traceback (most recent call last):
File "/tmp/tmpvzyuvh8u/tmpa9i07ebb.py", line 8, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s585265915 | p02554 | u624830211 | 1600044270 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9048 | 194 | import math
import sys
a=1000000007
def modd(x, y):
z=1
for i in range(y):
z=z*x%a
return z
j=int(sys.argv[1])
ans=modd(10, j)-modd(9, j)-modd(9, j)+modd(8, j)
print(ans%a) | Traceback (most recent call last):
File "/tmp/tmp7e8wlqbj/tmpwkehrzvt.py", line 11, in <module>
j=int(sys.argv[1])
~~~~~~~~^^^
IndexError: list index out of range
| |
s710795256 | p02554 | u624830211 | 1600044250 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9016 | 184 | import math
a=1000000007
def modd(x, y):
z=1
for i in range(y):
z=z*x%a
return z
j=int(sys.argv[1])
ans=modd(10, j)-modd(9, j)-modd(9, j)+modd(8, j)
print(ans%a)
| Traceback (most recent call last):
File "/tmp/tmp_o855o9m/tmp7w7koyrl.py", line 10, in <module>
j=int(sys.argv[1])
^^^
NameError: name 'sys' is not defined
| |
s219727768 | p02554 | u719790500 | 1600043021 | Python | Python (3.8.2) | py | Runtime Error | 20 | 8936 | 489 | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <ctype.h>
#include <cstdlib>
#include <cmath>
#include <stack>
#define _GLIBCXX_DEBUG
using namespace std;
int main()
{
int n;
cin >> n;
long long a = 1, b = 1, c = 1;
for (int i = 0; i < n; i++)
{
a *= 10... | File "/tmp/tmpjzaqrlwe/tmpnl644qb3.py", line 10
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s733703575 | p02554 | u370986618 | 1600041637 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8980 | 4363 | #include <bits/stdc++.h>
using namespace std;
#define pb(a) push_back((a))
#define mp(a, b) make_pair((a), (b))
#define REP(a, b) for (ll i = (a); i < (b); i++)
#define REP2(a, b) for (ll j = (a); j < (b); j++)
#define REPE(a, b, c, d) \
REP(a, b) \
for (ll j = (c); j < (d); j++)
#define REPV(a, b, ... | File "/tmp/tmpuc5cncx3/tmpj5ud8kku.py", line 2
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s315556157 | p02554 | u370986618 | 1600041520 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8648 | 4361 | #include <bits/stdc++.h>
using namespace std;
#define pb(a) push_back((a))
#define mp(a, b) make_pair((a), (b))
#define REP(a, b) for (ll i = (a); i < (b); i++)
#define REP2(a, b) for (ll j = (a); j < (b); j++)
#define REPE(a, b, c, d) \
REP(a, b) \
for (ll j = (c); j < (d); j++)
#define REPV(a, b, ... | File "/tmp/tmphvx5x8vx/tmp6vkbi144.py", line 2
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s043220515 | p02554 | u370986618 | 1600041273 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8820 | 4360 | #include <bits/stdc++.h>
using namespace std;
#define pb(a) push_back((a))
#define mp(a, b) make_pair((a), (b))
#define REP(a, b) for (ll i = (a); i < (b); i++)
#define REP2(a, b) for (ll j = (a); j < (b); j++)
#define REPE(a, b, c, d) \
REP(a, b) \
for (ll j = (c); j < (d); j++)
#define REPV(a, b, ... | File "/tmp/tmp1guvg761/tmpbk2cdw74.py", line 2
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s705226919 | p02554 | u505564549 | 1600040701 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9204 | 293 | import sys
input = sys.stdin.readline
mod = int(1e9)+7
def solve():
n=int(input())
if n<3:
print(0)
return
dp=[0]*2001
dp[3]=dp[4]=dp[5]=1
for i in range(6,n+1):
dp[i]=(dp[i-1]+dp[i-3])%mod
print(dp[n])
if __name__=="__main__":
solve()
| Traceback (most recent call last):
File "/tmp/tmpix_4aeai/tmpxhd118i4.py", line 17, in <module>
solve()
File "/tmp/tmpix_4aeai/tmpxhd118i4.py", line 6, in solve
n=int(input())
^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s656171727 | p02554 | u167993508 | 1600040425 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9012 | 258 | def binexp(b):
res = 1
while b>0:
if b&1:
res *= a
res%=mod
a *= a
a%=mod
b>>=1
return res
mod = 1000000007
n = int(input())
if n==1:
print(0)
elif n==2:
print(1)
else:
count = 1
n -= 2
ans = binexp(n)
print(ans) | Traceback (most recent call last):
File "/tmp/tmp7qhviwyo/tmptred8lqt.py", line 12, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s593975991 | p02554 | u467507627 | 1600036545 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8928 | 398 | #include <bits/stdc++.h>
#include <stdio.h>
#include <string.h>
#define rep(i,n) for (int i=0; i<n; i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
ll n;
ll MOD = 1000000007;
int main(){
cin>>n;
if(n<2) cout<<"0"<<endl;
else{
ll ans = n * (n-1) % MOD;
for(int i=0; i<n-2; i++){... | File "/tmp/tmpl6pgca8j/tmpq0a7l42w.py", line 5
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s215943745 | p02554 | u163354164 | 1600035259 | Python | Python (3.8.2) | py | Runtime Error | 581 | 11184 | 61 | n =int(input())
Sum=(10**n)-(9**n)-(9**n)+(8**n)
Print( Sum)
| Traceback (most recent call last):
File "/tmp/tmpsp2syhfo/tmpwhnqsk9q.py", line 1, in <module>
n =int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s969150408 | p02554 | u163354164 | 1600035140 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9144 | 52 | n =int(input())
Print((10**n)-(9**n)-(9**n)+(8**n))
| Traceback (most recent call last):
File "/tmp/tmpv1rswp05/tmpbgjt20wd.py", line 1, in <module>
n =int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s358030942 | p02554 | u163354164 | 1600035076 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9012 | 43 | N =int(input())
Print(10**n-9**n-9**n+8**n) | Traceback (most recent call last):
File "/tmp/tmp_z71820x/tmp7umtqb6c.py", line 1, in <module>
N =int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s592406671 | p02554 | u944396627 | 1600034013 | Python | PyPy3 (7.3.0) | py | Runtime Error | 89 | 74820 | 454 | import sys
sys.setrecursionlimit(250000)
from scipy.special import comb
# a = comb(n, r)
def main():
# a,b,c,d = map(int, input().split())
n = int(input())
# temp = (10 ** 9 + 7)
# sum = 0
# if n >= 2:
# for i in range(2, n+1):
# a = int(comb(i, 2)) * 2
# a = (a * ... | Traceback (most recent call last):
File "/tmp/tmp801zx6bu/tmpivrtg6jn.py", line 23, in <module>
main()
File "/tmp/tmp801zx6bu/tmpivrtg6jn.py", line 9, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s908360733 | p02554 | u944396627 | 1600033858 | Python | PyPy3 (7.3.0) | py | Runtime Error | 105 | 74752 | 468 | import sys
sys.setrecursionlimit(250000)
from scipy.special import comb
# a = comb(n, r)
def main():
# a,b,c,d = map(int, input().split())
n = int(input())
sum = 10**n - 9**n*2 + 8**n
# temp = (10 ** 9 + 7)
# sum = 0
# if n >= 2:
# for i in range(2, n+1):
# a = int(comb(i,... | Traceback (most recent call last):
File "/tmp/tmpt2uhqbc6/tmp93q3xkk9.py", line 24, in <module>
main()
File "/tmp/tmpt2uhqbc6/tmp93q3xkk9.py", line 9, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s474462233 | p02554 | u380491044 | 1600033637 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9004 | 255 | #include<bits/stdc++.h>
using namespace std;
const int64_t mod=1000000007;
int main(){
int64_t n,a=1,b=1,c=1;
cin >> n;
for(int i=0;i<n;i++){
a*=10;a%=mod;
b*=9;b%=mod;
c*=8;c%=mod;
}
cout << (mod+a-b-b+c)%mod << endl;
return 0;
} | File "/tmp/tmp3hs6teu5/tmpuo_z35au.py", line 2
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s466346768 | p02554 | u944396627 | 1600033626 | Python | PyPy3 (7.3.0) | py | Runtime Error | 109 | 68684 | 1627 | import sys
sys.setrecursionlimit(250000)
from scipy.special import comb
# a = comb(n, r)
def main():
# a,b,c,d = map(int, input().split())
n = int(input())
sum = 10**n - 9**n*2 + 8**n
# temp = (10 ** 9 + 7)
# sum = 0
# if n >= 2:
# for i in range(2, n+1):
# a = int(comb(i,... | Traceback (most recent call last):
File "/tmp/tmppu0_5mqw/tmpgrnbv8fi.py", line 59, in <module>
main()
File "/tmp/tmppu0_5mqw/tmpgrnbv8fi.py", line 9, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s877679853 | p02554 | u789622053 | 1600033475 | Python | PyPy2 (7.3.0) | py | Runtime Error | 1767 | 865844 | 342 | from sys import setrecursionlimit
setrecursionlimit(1<<30)
def f(i,b1,b2):
if i==n:
return b1 and b2
if z[i][b1][b2]==-1:
z[i][b1][b2]=sum(f(i+1,b1 or j==0,b2 or j==9) for j in xrange(10))%(pow(10,9)+7)
return z[i][b1][b2]
n=input()
z=[[[-1 for _1 in xrange(2)] for _2 in xrange(2)] for _3 in xrange(n+1)]
... | File "/tmp/tmp7z4p39ei/tmpp4a0p4ew.py", line 11
print f(0,False,False)
^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s832719811 | p02554 | u550289743 | 1600032695 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8948 | 111 | N = input()
satisfied_pattern = 10**N - (2*(9**N) - 8**N)
output = satisfied_pattern % (10**9+7)
print(output)
| Traceback (most recent call last):
File "/tmp/tmpsul5g8od/tmpxzchrr17.py", line 1, in <module>
N = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s468328201 | p02554 | u601218364 | 1600032290 | Python | PyPy3 (7.3.0) | py | Runtime Error | 125 | 68668 | 68 | N=int(input())
ans=10**n-2*(9**n)+8**n
ans=ans%1000000007
print(ans) | Traceback (most recent call last):
File "/tmp/tmpsdtklas6/tmpunanwl_3.py", line 1, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s365762855 | p02554 | u941407962 | 1600032162 | Python | PyPy3 (7.3.0) | py | Runtime Error | 92 | 68780 | 82 | a, b, c, d = list(map(int, input().split()))
R=max([b*d, a*d, a*c, b*c])
print(R)
| Traceback (most recent call last):
File "/tmp/tmp1n290emj/tmp1geiz6pf.py", line 1, in <module>
a, b, c, d = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s658667383 | p02554 | u436519884 | 1600031850 | Python | PyPy3 (7.3.0) | py | Runtime Error | 94 | 68748 | 121 | n=int(input())
mod=10**9+7
exlcusion=2*pow(9,n,mod)-pow(8,n,mod)
total=pow(10,n,mod)
ans=total-exclusion%mod
print(total) | Traceback (most recent call last):
File "/tmp/tmpdeczbhot/tmpcnqu11r6.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s381562688 | p02554 | u013617325 | 1600031623 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9016 | 711 | #!/usr/bin/env python3
import sys
MOD = 1000000007 # type: int
def solve(N: int):
return print((10**N - 2*9**N + 8**N))
# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)
def main():
def ite... | File "/tmp/tmp88ryog8u/tmpg2w0rcrv.py", line 22
~
... | |
s117957704 | p02554 | u686036872 | 1600031571 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9060 | 102 | N = int(input())
a=pow(10,n,10**9+7)
b=pow(9,n,10**9+7)
c=pow(8,n,10**9+7)
print((a-2*b+c)%(10**9+7)) | Traceback (most recent call last):
File "/tmp/tmps2cen1la/tmpobz4qn7f.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s953602551 | p02554 | u928758473 | 1600030981 | Python | Python (3.8.2) | py | Runtime Error | 393 | 11500 | 484 | import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt, factorial
from copy import deepcopy
... | /tmp/tmpl6sh4eo4/tmp54zl1zvg.py:14: SyntaxWarning: 'int' object is not callable; perhaps you missed a comma?
ans = (10**n) - 2(9**n) + (8**n)
Traceback (most recent call last):
File "/tmp/tmpl6sh4eo4/tmp54zl1zvg.py", line 19, in <module>
main()
File "/tmp/tmpl6sh4eo4/tmp54zl1zvg.py", line 12, in main
n =... | |
s881051675 | p02554 | u762533651 | 1600030776 | Python | PyPy3 (7.3.0) | py | Runtime Error | 127 | 68540 | 124 | n = int(input())
mod = 10 ** 9 + 7
re = (10 ** n) - (2 * (9 ** n)) - (8 ** n)
if n = 1:
print(0)
else:
print(re)
| File "/tmp/tmp0eoscfqw/tmphm96n4a5.py", line 7
if n = 1:
^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s006683005 | p02554 | u868281230 | 1600030675 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9096 | 134 | n = input()
mod = 10**9 + 7
ans = (pow(10, n, mod) - ((2 * pow(9, n, mod)) % mod - pow(8, n, mod) + mod) % mod + mod) % mod
print(ans) | Traceback (most recent call last):
File "/tmp/tmpxt8s7mug/tmpjcgziydr.py", line 1, in <module>
n = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s113677031 | p02554 | u984960045 | 1600030513 | Python | PyPy3 (7.3.0) | py | Runtime Error | 105 | 68524 | 80 | n=int(input())
mod=10**9+7
print((pow(10,n,mod)-2*pow(9,n,mod)+pow(8,n,mod)%mod) | File "/tmp/tmpptlxc659/tmp7ut3hp0e.py", line 3
print((pow(10,n,mod)-2*pow(9,n,mod)+pow(8,n,mod)%mod)
^
SyntaxError: '(' was never closed
| |
s052521443 | p02554 | u698916859 | 1600030154 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 11052 | 88 | # 整数の入力
N = int(input())
print((10 ** N - 2* 9 **N + 8 ** N)) % (10 ** 9 + 7) | Traceback (most recent call last):
File "/tmp/tmpmrdtb8ey/tmp3d1u0o77.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s702768381 | p02554 | u561294476 | 1600030060 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8944 | 65 | N = int(input())
print((10**N -9**N -9**N +8**N)% (10**9+7))
| File "/tmp/tmpfet9by68/tmpzzgxvfjp.py", line 1
N = int(input())
IndentationError: unexpected indent
| |
s818375789 | p02554 | u452512115 | 1600029645 | Python | Python (3.8.2) | py | Runtime Error | 32 | 9628 | 1302 | import math
import itertools
def fact(n):
if (n <= 1):
return 1
return n * fact(n - 1)
def nPr(n, r):
return math.floor(fact(n) /
fact(n - r))
from math import *
# Function to find the nCr
def printNcR(n, r):
# p holds the value of n*(n-1)... | Traceback (most recent call last):
File "/tmp/tmpdw7hk3ny/tmp2q4z4gfq.py", line 56, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s421146796 | p02554 | u086644516 | 1600029597 | Python | Python (3.8.2) | py | Runtime Error | 27 | 8880 | 334 | N = int(input())
MOD = 1000000000 + 7
def power_func(a,n,p):
bi = str(format(n,"b"))#2進表現に
res = 1
for i in range(len(bi)):
res = (res*res) %p
if bi[i] == "1":
res = (res*a) %p
return res
print(str((power_func(10, N, MOD) - 2 * power_func(9, N, MOD) + power_func(8, N, MOD) % ... | File "/tmp/tmp_plwtoft/tmpsi5tq0o7.py", line 11
print(str((power_func(10, N, MOD) - 2 * power_func(9, N, MOD) + power_func(8, N, MOD) % MOD))
^
SyntaxError: '(' was never closed
| |
s006579941 | p02554 | u959682393 | 1600029597 | Python | Python (3.8.2) | py | Runtime Error | 58 | 25116 | 320 | N = int(input())
cnt = N*(N-1)
less = 8 ** (N-2)
d = 10**9 + 7
ans = cnt * less
x=N-2
for i in range(x+1):
for j in range(x+1):
if i == 0 and j ==0: continue
if i + j <= x:
l = [0]*(1+i) +[9]*(1+j) +[-1]*(x-i-j)
ans += len(set(list(itertools.permutations(l, N))))
print(ans%d) | Traceback (most recent call last):
File "/tmp/tmp4mtbx5f8/tmpz58yt27i.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s600048093 | p02554 | u452512115 | 1600029595 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9656 | 1301 | import math
import itertools
def fact(n):
if (n <= 1):
return 1
return n * fact(n - 1)
def nPr(n, r):
return math.floor(fact(n) /
fact(n - r))
from math import *
# Function to find the nCr
def printNcR(n, r):
# p holds the value of n*(n-1)... | Traceback (most recent call last):
File "/tmp/tmpx1i3p76u/tmpx9b6op5o.py", line 56, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s255591205 | p02554 | u811629303 | 1600029590 | Python | Python (3.8.2) | py | Runtime Error | 1173 | 128096 | 1168 | #
# 178C
#
import math
import sys
MOD = 10**9+7
num = input()
n = int(num)
def cmb(n, r, p):
if (r < 0) or (n < r):
return 0
r = min(r, n - r)
return fact[n] * factinv[r] * factinv[n-r] % p
p = 10 ** 9 + 7
N = 10 ** 6 # N は必要分だけ用意する
fact = [1, 1] # fact[n] = (n! mod p)
factinv = [1, 1] # facti... | Traceback (most recent call last):
File "/tmp/tmpypf2w46s/tmpzp10qr0h.py", line 8, in <module>
num = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s394860219 | p02554 | u273339216 | 1600029572 | Python | Python (3.8.2) | py | Runtime Error | 228 | 42892 | 411 | from scipy.special import perm
n = int(input())
def re_factorial(n):
if n < 2:
return 1
return n * re_factorial(n-1)
mas = n-2 # 0と9は必ず使う
#print(perm(n, 2))
if mas == 0:
print(2)
elif n == 0:
print(1)
else:
#res = (permutations_count(n, 2) * 10^mas)%(10^9 + 7)
res = (re_factorial(n)%1000000007 *... | Traceback (most recent call last):
File "/tmp/tmpbho6b3s8/tmptd8335x5.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s283954933 | p02554 | u468431843 | 1600029568 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 15032 | 243 | import math
def permutations_count(n, r):
return (math.factorial(n) // math.factorial(n - r)) % mod
N = int(input())
mod = 10**9 + 7
ans = ((permutations_count(N, 2) * (8 ** (N - 2))) + permutations_count(N, 2)) % mod
print(ans % mod) | Traceback (most recent call last):
File "/tmp/tmp3c6jlubj/tmpbakfghpo.py", line 6, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s929610451 | p02554 | u208394180 | 1600029558 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9624 | 145 | def P(x):
if x == 0:
return 1
return x * P(x - 1)
N = int(input())
if N == 1:
print(0)
else:
print(P(N) * 9**(N-2)) | Traceback (most recent call last):
File "/tmp/tmpqubertym/tmpw0c_d9qe.py", line 6, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s779232164 | p02554 | u238504302 | 1600029550 | Python | Python (3.8.2) | py | Runtime Error | 513 | 42432 | 174 | from scipy.special import comb as c
N = int(input())
if N == 1: print(0)
else:
ans = 0
for i in range(1, N):
ans += c(i+1, N-1, exact=True)
print(ans % (10 ** 9 + 7)) | Traceback (most recent call last):
File "/tmp/tmp0bkj7rqv/tmp9z60_fyu.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s201110826 | p02554 | u634131849 | 1600029547 | Python | Python (3.8.2) | py | Runtime Error | 414 | 9144 | 129 | MOD = 1000000007
n = int(input())
a = 1
b=1
c=1
for i in range(n):
a=a*10%MOD
b=b*9%MOD
c=c*8%MOD
print (a-2*b+c)%MOD | Traceback (most recent call last):
File "/tmp/tmpk7yw3vjt/tmpxzfcs9ju.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s448835957 | p02554 | u698916859 | 1600029524 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 14888 | 219 | import math
def combinations_count(N, r):
return math.factorial(N) // (math.factorial(N - r) * math.factorial(r))
# 整数の入力
N = int(input())
r = 2
print(combinations_count(N, r) * 10**(N-r) % (10**9 +7)) | Traceback (most recent call last):
File "/tmp/tmpyz_xmpj4/tmppqekbthe.py", line 6, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s153179745 | p02554 | u514343483 | 1600029524 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9208 | 319 | N=int(input())
if N==1:
print(0)
elif N==2:
a=8
print(a)
elif N==3:
b=28
print(a+b)
elif N==4:
c=56
print(a+b+c)
elif N==5:
d=70
print(a+b+c+d)
elif N==6:
print(a+b+c+d+c)
elif N==7:
print(a+b+c+d+c+b)
elif N==8:
print(a+b+c+d+c+b+a)
elif N==9:
print(a+b+c+d+c+b+a+1) | Traceback (most recent call last):
File "/tmp/tmpysal4xp9/tmp2elazdcj.py", line 1, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s008020500 | p02554 | u460745860 | 1600029521 | Python | Python (3.8.2) | py | Runtime Error | 35 | 9664 | 314 |
def cal(N):
for n in range(3,N+1):
left = N - n
right = n
if left < 6:
return 1
else:
return 1 + cal(left)
if right < 6:
return 1
else:
return 1 + cal(right)
S = int(input())
if S < 3:
print(0)
exit()
else:
ans = cal(S)
print((1+ans)%dekai())
| Traceback (most recent call last):
File "/tmp/tmp784g5q85/tmpa97fbqzm.py", line 17, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s770076906 | p02554 | u551437236 | 1600029519 | Python | Python (3.8.2) | py | Runtime Error | 892 | 176100 | 538 | import sys
sys.setrecursionlimit(100000)
N = int(input())
p = 10**9+7
ans = 0
nCr = {}
def cmb(n, r, p):
if r == 0 or r == n: return 1
if r == 1: return n%p
if (n,r) in nCr: return nCr[(n,r)]%p
nCr[(n,r)] = (cmb(n-1,r, p) + cmb(n-1,r-1, p))%p
return nCr[(n,r)]
sl = [1]
egtl = [1]
for i in range(N... | Traceback (most recent call last):
File "/tmp/tmp6u1gzlp0/tmp3nts5k82.py", line 3, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s496422232 | p02554 | u208394180 | 1600029513 | Python | Python (3.8.2) | py | Runtime Error | 31 | 9644 | 180 | # coding: utf-8
# Your code here!
def P(x):
if x == 0:
return 1
return x * P(x - 1)
N = int(input())
if N == 1:
print(0)
else:
print(P(N) * 9**(N-2)) | Traceback (most recent call last):
File "/tmp/tmpyy091m7r/tmp_lw1_6qp.py", line 9, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s866589846 | p02554 | u273339216 | 1600029509 | Python | Python (3.8.2) | py | Runtime Error | 224 | 42608 | 378 | from scipy.special import perm
n = int(input())
def re_factorial(n):
if n < 2:
return 1
return n * re_factorial(n-1)
mas = n-2 # 0と9は必ず使う
#print(perm(n, 2))
if mas == 0:
print(2)
elif n == 0:
print(1)
else:
#res = (permutations_count(n, 2) * 10^mas)%(10^9 + 7)
res = (re_factorial(n) * int(perm(n... | Traceback (most recent call last):
File "/tmp/tmphdtxilxk/tmpex8fm2h5.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s944938981 | p02554 | u498677593 | 1600029500 | Python | PyPy3 (7.3.0) | py | Runtime Error | 334 | 85732 | 220 | def func(a):
if (a==1):
return 0
else:
return func(a-1)+a
N=int(input())
S=10**9+7
if N==1:
z=0
elif N==2:
z=2
else:
z=((10**(N-2) *N*2) - (10**(N-3) * ((6+func(N-2))))) %S
print(z)
| Traceback (most recent call last):
File "/tmp/tmpkjo4ye1k/tmp873vpydv.py", line 6, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s387889099 | p02554 | u827261928 | 1600029469 | Python | PyPy3 (7.3.0) | py | Runtime Error | 240 | 75888 | 73 | mod =10**9 + 7
N=int(input())
a=10**N
b=a*((8/10)**N)
print(int(a-b)/mod) | Traceback (most recent call last):
File "/tmp/tmpsbab9d9l/tmpsdw1biwz.py", line 2, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s460279140 | p02554 | u698916859 | 1600029444 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 14832 | 193 | import math
def combinations_count(N, r):
return math.factorial(N) // (math.factorial(N - r) * math.factorial(r))
# 整数の入力
N = int(input())
r = 2
print(combinations_count(N, r)) | Traceback (most recent call last):
File "/tmp/tmpmv5daj3q/tmpybm24i6y.py", line 6, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s146019700 | p02554 | u055127677 | 1600029436 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9620 | 195 | n=int(input())
def solve(n):
if n==1:
return 1
return n*solve(n-1)
mod = 10 ** 9 + 7
if n==1:
print(0)
elif n==2:
print(2)
else:
x=(10*(n-2)*solve(n))%mod
print(x) | Traceback (most recent call last):
File "/tmp/tmpvw472mrw/tmpxe9w1mz_.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s209021686 | p02554 | u424661377 | 1600029417 | Python | Python (3.8.2) | py | Runtime Error | 2225 | 619368 | 241 | import sys
sys.setrecursionlimit(1000000)
def factorial(n):
if n <= 0:
return 1
if n == 1:
return n
return n * factorial(n-1)
s = int(input())
ans = (s * (s - 1)) * factorial(s - 2)
ans %= 1000000007
print(ans)
| Traceback (most recent call last):
File "/tmp/tmpz_zv2lrc/tmpn3nladun.py", line 11, in <module>
s = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s043507155 | p02554 | u966542724 | 1600029392 | Python | Python (3.8.2) | py | Runtime Error | 46 | 10660 | 312 | from operator import mul
from functools import reduce
def cmb(n,r):
r = min(n-r,r)
if r == 0: return 1
over = reduce(mul, range(n, n - r, -1))
under = reduce(mul, range(1,r + 1))
return over // under
n = int(input())
a = cmb(n,2)*2
b = (8**(n-2))
d = (2**n) -2
print((a*b+d)%1000000007) | Traceback (most recent call last):
File "/tmp/tmpvmjmiq5f/tmpa8xf6_7w.py", line 11, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s644292581 | p02554 | u698916859 | 1600029369 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9100 | 205 | def combinations_count(N, r):
return math.factorial(N) // (math.factorial(N - r) * math.factorial(r))
# 整数の入力
N = int(input())
r = 2
print(combinations_count(N, r) * 10**(N-r) % (10**9 +7)) | Traceback (most recent call last):
File "/tmp/tmp5htnk_4k/tmpkdrxi_bo.py", line 5, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s413118301 | p02554 | u348538363 | 1600029357 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9088 | 205 | S = input()
L = int(S)
D = L-2
A = int(D)
G = L-1
Z = int(G)
B = L-3
V = int(B)
if L==0:
print(0)
elif L==1:
print(0)
elif L==2:
print(2)
elif L>=3:
print((10*A*Z+8*U+10*B)%(10**9+7))
| Traceback (most recent call last):
File "/tmp/tmpi_4ekwno/tmpcg11o3gg.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s664187487 | p02554 | u246448955 | 1600029355 | Python | PyPy3 (7.3.0) | py | Runtime Error | 109 | 68616 | 93 | import math
N = int(input())
if N>2:
print((math.factrial(N)*10)%(10**9+7))
else:
print(N) | Traceback (most recent call last):
File "/tmp/tmp40_in27t/tmp_go2w0ol.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s702177154 | p02554 | u404842368 | 1600029292 | Python | Python (3.8.2) | py | Runtime Error | 295 | 28284 | 219 | import numpy as np
N = int(input())
MOD = 1000000007
if N==1 or N==0:
ans=0
elif N==2:
ans =2
else:
ans = ( ( N*(N-1) ) %MOD ) * ( ( 10**(N-2) - (N-2)*(N-3)/2 )%MOD)
ans = ans % MOD
print(ans)
| Traceback (most recent call last):
File "/tmp/tmpfkbmwgmc/tmplj5gmhdk.py", line 3, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s574325935 | p02554 | u807692288 | 1600029282 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9800 | 725 | # -*- coding: utf-8 -*-
import math
result = 0
def meso(x):
#print("x = ",x)
y = 0
kurikaeshi = (math.floor(x / 2) - 3) + 1
#print("loop=" ,kurikaeshi)
for i in range(kurikaeshi):
icode = i + 3
#print("icode=", icode)
if icode >= 6 or x - icode >= 6:
#print("... | Traceback (most recent call last):
File "/tmp/tmpkbdlny5p/tmp1mqyplp9.py", line 38, in <module>
user1 = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s146400538 | p02554 | u246448955 | 1600029275 | Python | PyPy3 (7.3.0) | py | Runtime Error | 154 | 74740 | 62 | import math
N = int(input())
print(math.factrial(N)%(10**9+7)) | Traceback (most recent call last):
File "/tmp/tmpddwqv7bz/tmp7gn2mo8d.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s208366607 | p02554 | u561294476 | 1600029254 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 14908 | 800 | import math
def combinations_count(n, r):
return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
N = int(input())
all = 0
for i in range(2, N//2+1):
basyo = combinations_count(N, i) # iとN-iの時、値が同じ
zero_iti = 2 ** (3 * N - 2 * i - 1) # i=iの時
zero_iti2 = 2 ** (N + 2 * i - 1) # i... | Traceback (most recent call last):
File "/tmp/tmp4vro9bed/tmp5cf99lbm.py", line 4, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s199128004 | p02554 | u273339216 | 1600029230 | Python | Python (3.8.2) | py | Runtime Error | 216 | 42784 | 377 | from scipy.special import perm
n = int(input())
def re_factorial(n):
if n < 2:
return 1
return n * re_factorial(n-1)
mas = n-2 # 0と9は必ず使う
#print(perm(n, 2))
if mas == 0:
print(2)
elif n == 0:
print(1)
else:
#res = (permutations_count(n, 2) * 10^mas)%(10^9 + 7)
res = (re_factorial(n) * int(perm(n... | Traceback (most recent call last):
File "/tmp/tmpsqp_vk_1/tmpf_6ukt_5.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s889507490 | p02554 | u539248699 | 1600029157 | Python | Python (3.8.2) | py | Runtime Error | 31 | 9060 | 308 | n = int(input())
num = 0
x = n#0,9が置かれる場所
y = 0#0,9の選び方
z = 8 * (n - 1)#それ以外の選び方
for i in range(2,n + 1):#0,9の個数
x * (n - i + 1) // i
y = (y + 2) * 2 - 2
z = z // 8
num += ((x % (10 ** 9 + 7)) * ((y * z) % (10 ** 9 + 7))
print(num % (10 ** 9 + 7)) | File "/tmp/tmpa6i2g8ev/tmpt4gmfl1b.py", line 10
num += ((x % (10 ** 9 + 7)) * ((y * z) % (10 ** 9 + 7))
^
SyntaxError: '(' was never closed
| |
s061646349 | p02554 | u135265051 | 1600029050 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 14904 | 511 | import math
# import statistics
import itertools
a=int(input())
#b,c=int(input()),int(input())
# c=[]
# for i in a:
# c.append(int(i))
# e1,e2,e3,e4 = map(int,input().split())
#f = list(map(int,input().split()))
# g = [input() for _ in range(a)]
def permutations_count(n):
return math.factorial(n)
ya=a-2
con = p... | Traceback (most recent call last):
File "/tmp/tmpzgfehswo/tmpesem7qd1.py", line 4, in <module>
a=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s407354315 | p02554 | u690626617 | 1600028996 | Python | Python (3.8.2) | py | Runtime Error | 210 | 10404 | 126 | N = int(input())
if N == 2:
ans = 2
elif N ==1:
ans = 0
else:
ans = 10**(N-2)
ans = int(ans%(10e9+7))
print(ans) | Traceback (most recent call last):
File "/tmp/tmpmrj47et8/tmpce5h4907.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s883745922 | p02554 | u698916859 | 1600028963 | Python | Python (3.8.2) | py | Runtime Error | 201 | 10520 | 86 | # 整数の入力
N = int(input())
print((10 ** (N-2) * N * (N-1) / 2) % (10**9 + 7)) | Traceback (most recent call last):
File "/tmp/tmpgw01qua9/tmpbnsu60d0.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s792297253 | p02554 | u516050812 | 1600028949 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 49600 | 203 | inp = int(input())
if inp == 1:
print(0)
else:
all = 10 ** inp
none = 8 ** inp
a = sum([i * 8 for i in range(1,inp-1)]) + 1
frag = 2 * 9 ** (inp-1) * inp - a * 2
print(all - none - frag)
| Traceback (most recent call last):
File "/tmp/tmps9gof6rh/tmpc01q9dcu.py", line 1, in <module>
inp = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s583424013 | p02554 | u324918230 | 1600028891 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2210 | 169272 | 813 | from math import factorial
N = int(input())
if N == 1:
ans = 0
else:
# N == 3
# [[0|9], [0|9], [1-8]] = (3! * 8^1 * (2^2 - 2)) / 2! * 1!
# [[0|9], [0|9], [0|9]] = (3! * 8^0 * (2^3 - 2)) / 3! * 0!
# N == 4
# [[0|9], [0|9], [1-8], [1-8]] = (4! * 8^2 * (2^2 - 2)) / 2! * 2!
# [[0|9], [0|9], [0|... | Traceback (most recent call last):
File "/tmp/tmp5d7yhun2/tmpc0xzob3c.py", line 3, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s171763982 | p02554 | u424661377 | 1600028802 | Python | Python (3.8.2) | py | Runtime Error | 32 | 9684 | 163 | def factorial(n):
if n == 1:
return n
return n * factorial(n-1)
s = int(input())
ans = (s * (s - 1)) * factorial(s-2)
ans %= 1000000007
print(ans) | Traceback (most recent call last):
File "/tmp/tmphfyd3q8v/tmpqjxz57qa.py", line 6, in <module>
s = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s319556640 | p02554 | u424661377 | 1600028792 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9020 | 159 | def factorial(n):
if n == 1:
return n
return n * kaijo(n-1)
s = int(input())
ans = (s * (s - 1)) * factorial(s-2)
ans %= 1000000007
print(ans) | Traceback (most recent call last):
File "/tmp/tmp7dgjwd_y/tmpintwkd3d.py", line 6, in <module>
s = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s200910845 | p02554 | u498531348 | 1600028785 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2211 | 168660 | 966 | import math
from math import factorial
# a = comb(n, r)
N = int(input())
a = factorial(N) / factorial(N-2) / factorial(N - (N-2))
B = 0
def power_func(a,n,p):
bi = str(format(n,"b"))#2進表現に
res = 1
for i in range(len(bi)):
res = (res*res) %p
if bi[i] == "1":
res = (res*a... | Traceback (most recent call last):
File "/tmp/tmpdcidx_le/tmppnw_yxq3.py", line 7, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s566697629 | p02554 | u453529685 | 1600028744 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 15000 | 163 | N = int(input())
import math
def comb(n, r):
return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
print((comb(N,2)*2*(9**(N-2)))%(10**9+7))
| Traceback (most recent call last):
File "/tmp/tmpk83xs54q/tmptiepn3v6.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s993465333 | p02554 | u453529685 | 1600028645 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 15040 | 160 | N = int(input())
import math
def comb(n, r):
return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
print((comb(N,2)*2*9**(N-2))%(10**9+7)) | Traceback (most recent call last):
File "/tmp/tmpf7gt3fwn/tmpv6dghxot.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s612509046 | p02554 | u811202694 | 1600028605 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9024 | 4539 | // Template: https://github.com/maitaken/atcoder-template
package main
import (
"bufio"
"fmt"
"math"
"os"
"strconv"
"strings"
)
const (
BUFSIZE = 10000000
MOD = 1000000007
INT_INF = math.MaxInt32
)
var rdr *bufio.Reader
func main() {
rdr = bufio.NewReaderSize(os.Stdin, BUFSIZE)
solve()
}
func solve(... | File "/tmp/tmpd7906hhl/tmp7lrmvrze.py", line 1
// Template: https://github.com/maitaken/atcoder-template
^^
SyntaxError: invalid syntax
| |
s105391807 | p02554 | u498677593 | 1600028495 | Python | PyPy3 (7.3.0) | py | Runtime Error | 302 | 85800 | 216 | def func(a):
if (a==0):
return 6
else:
return func(a-1)+2
N=int(input())
S=10**9+7
if N==1:
z=0
elif N==2:
z=2
else:
z=((10**(N-2) *N*2) - (10**(N-3) * (func(N-3)))) %S
print(z)
| Traceback (most recent call last):
File "/tmp/tmphl75p8_o/tmp2k31d597.py", line 6, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s862020763 | p02554 | u941645670 | 1600028367 | Python | Python (3.8.2) | py | Runtime Error | 206 | 10384 | 130 |
n = int(input())
n_all = 10**(n) % mod
bad_0 = 9**(n)%mod
bad_9 = 9**(n)%mod
bad_18 = 8**(n)%mod
print(n_all-bad_0-bad_9+bad_18) | Traceback (most recent call last):
File "/tmp/tmpo4i07cff/tmp2dr6rjel.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s214258072 | p02554 | u288335507 | 1600028227 | Python | PyPy3 (7.3.0) | py | Runtime Error | 114 | 68628 | 222 | n = int(input())
def p(m, n):
k = 1
for i in range(n):
k = (k * m) % (10**9 + 7)
return k
x = p(10, n) - 2*p(9, n) + p(8, n)
while x < 0:
x += 10 ** 9 + 7
elif x == 10 ** 9 + 7:
x = 0
print(x) | File "/tmp/tmp_bo79_29/tmpk11b42ad.py", line 12
elif x == 10 ** 9 + 7:
^^^^
SyntaxError: invalid syntax
| |
s007556740 | p02554 | u175720502 | 1600028147 | Python | Python (3.8.2) | py | Runtime Error | 593 | 619460 | 245 | import sys
sys.setrecursionlimit(1000000)
def pow_r(x, n):
if n == 0:
return 1 # exit case
else:
return x * pow_r(x, n - 1) % 1000000007
n=int(input())
m = n * (n-1) % 1000000007
m = m * pow_r(8,n-2) % 1000000007
print(m) | Traceback (most recent call last):
File "/tmp/tmpti0574sx/tmp22qvu__w.py", line 8, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s257736398 | p02554 | u806988802 | 1600028014 | Python | Python (3.8.2) | py | Runtime Error | 932 | 11880 | 170 | n = int(input())
n_zero = 10**n - 9**n #19
n_nine = 10**n - 9**n #19
n_non_zn = 8**n #64
a = (10**n - n_zero - n_nine - n_zn)
if a < 0:
a = -a
print(a % (10**9+7))
| Traceback (most recent call last):
File "/tmp/tmpc7d4r6en/tmpzzuackgq.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s524793757 | p02554 | u455809703 | 1600027875 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2339 | 3530232 | 419 | def make_comb_dp(n):
dp = [[0] * (n + 1) for i in range(n + 1)]
for i in range(n + 1):
dp[i][0] = 1
dp[i][i] = 1
for i in range(2, n + 1):
for j in range(1, i):
dp[i][j] = dp[i - 1][j - 1] + dp[i - 1][j]
return dp
N = int(input())
a = 0
for n, i in enumerate(make_co... | Traceback (most recent call last):
File "/tmp/tmpmj2dflvz/tmpg50cq5j5.py", line 11, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s372274337 | p02554 | u052244548 | 1600027803 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 15820 | 463 | import itertools
import functools
import math
from collections import Counter
from itertools import combinations
import re
import sys
N=int(input())
if N <= 1:
print('0')
elif N == 2:
print('2')
else:
ans1 = 2**N - 2
ans2 = 0
for i in range(N-2):
ans2 = math.factorial(N) / ( math.factoria... | Traceback (most recent call last):
File "/tmp/tmpsv3b6v5d/tmpa_lpyscb.py", line 9, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s664192488 | p02554 | u551437236 | 1600027736 | Python | Python (3.8.2) | py | Runtime Error | 310 | 97300 | 462 | import sys
sys.setrecursionlimit(100000)
N = int(input())
p = 10**9+7
ans = 0
comb = 1
s = 1
i = 0
j = N
nCr = {}
def cmb(n, r, p):
if r == 0 or r == n: return 1
if r == 1: return n%p
if (n,r) in nCr: return nCr[(n,r)]%p
nCr[(n,r)] = (cmb(n-1,r, p) + cmb(n-1,r-1, p))%p
return nCr[(n,r)]
while j>=2:... | Traceback (most recent call last):
File "/tmp/tmp4wr3bbeh/tmpwp2y7_fa.py", line 3, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s308441516 | p02554 | u707960254 | 1600027665 | Python | PyPy3 (7.3.0) | py | Runtime Error | 131 | 74704 | 131 | N = int(input())
mod = int(1e9 +7)
ans = pow(10, N, mod=mod)
ans -= 2*pow(9, N, mod=mod)
ans += pow(8, N, mod=mod)
print(ans%mod) | Traceback (most recent call last):
File "/tmp/tmp8dqy3pd6/tmpu8h85_dq.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s366410445 | p02554 | u087118202 | 1600027566 | Python | PyPy3 (7.3.0) | py | Runtime Error | 87 | 74548 | 211 | n=int(input())
def cc(n, r):
return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
if n<2:
print(0)
elif n==2:
print(2)
else:
cc_=cc(n,2)
ans=cc_ * 9 * 2
print(ans%(10**9+7))
| Traceback (most recent call last):
File "/tmp/tmp0cooliv6/tmpp3o7ba_u.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s920706544 | p02554 | u694536861 | 1600027547 | Python | Python (3.8.2) | py | Runtime Error | 209 | 10940 | 403 | import math
from operator import mul
from functools import reduce
def cmb(n,r):
r = min(n-r,r)
if r == 0: return 1
over = reduce(mul, range(n, n - r, -1))
under = reduce(mul, range(1,r + 1))
return over // under
N = int(input())
answer = 0
rest = 10 ** 9 + 7
if N == 1:
answer = 0
else:
ans... | Traceback (most recent call last):
File "/tmp/tmpcvoohdru/tmpl8sfy008.py", line 12, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s885746234 | p02554 | u087118202 | 1600027528 | Python | PyPy3 (7.3.0) | py | Runtime Error | 95 | 68700 | 211 | n=int(input())
def cc(n, r):
return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
if n<2:
print(0)
elif n==2:
print(2)
else:
cc_=cc(n,2)
ans=cc_ * 9 * 2
print(ans%(10**9+7))
| Traceback (most recent call last):
File "/tmp/tmp5poqrfbk/tmp1nm9hb5e.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s821911898 | p02554 | u650219658 | 1600027506 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 15160 | 300 | import math
result = 0
n = int(input())
for zeros in range(1,n+1):
for nines in range(1,n+1):
if zeros + nines > n:
break
else:
result = result + (8**(n-zeros-nines) * (math.factorial(n) / (math.factorial(zeros) * math.factorial(nines))))
print(result % (10**9 + 7) )
| Traceback (most recent call last):
File "/tmp/tmp4rlh03nf/tmphnetc2_g.py", line 6, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s792155477 | p02554 | u786325650 | 1600027151 | Python | Python (3.8.2) | py | Runtime Error | 390 | 10496 | 159 | N = int(input())
if N<(10**6):
a=(10**N)%(10**9+7)
b=(9**N)%(10**9+7)
c=(8**N)%(10**9+7)
print((a+c-2*b)%(10**9+7))
else:
print((a+c-2*b)%(10**9+7))
| Traceback (most recent call last):
File "/tmp/tmpzredh_gw/tmp_3x2rvvk.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s785019651 | p02554 | u731461064 | 1600027121 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9220 | 333 | a,b,c,d = map(int, input().split())
if a >= 0 and c >= 0:
print(b*d)
elif b <= 0 and d <= 0:
print(a*c)
elif a < 0 and c < 0:
if b<=0 or d<=0:
print(a*c)
elif abs(a)>=abs(b) and abs(c)>=abs(d):
print(a*c)
else:
print(b*d)
elif (b<0 and c>=0):
print(b*c)
elif (a>=0 and d<0):
print(a*d)
else:... | Traceback (most recent call last):
File "/tmp/tmp41hop4dw/tmpje090awo.py", line 1, in <module>
a,b,c,d = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s476020085 | p02554 | u770293614 | 1600026863 | Python | Python (3.8.2) | py | Runtime Error | 200 | 10592 | 162 | N=int(input())
if N<2:
print(0)
elif N==2:
print(2)
else:
without=10**(N-2)
each=N*(N-1)/2
final=without*each
considered=final%(1000000007)
print(final) | Traceback (most recent call last):
File "/tmp/tmp2khflt78/tmpz51upvg7.py", line 1, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s506512814 | p02554 | u770293614 | 1600026824 | Python | Python (3.8.2) | py | Runtime Error | 207 | 10456 | 162 | N=int(input())
if N<2:
print(0)
elif N==2:
print(2)
else:
without=10**(N-2)
each=N*(N-1)/2
final=without*each
considered=final%(1000000007)
print(final) | Traceback (most recent call last):
File "/tmp/tmpk9eoaf66/tmphbi71622.py", line 1, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s524869072 | p02554 | u219305322 | 1600026823 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9040 | 143 | n = input()
MOD = 1000000007
a1 = ((n%MOD)*((n-1)*MOD))%MOD
a2 = 1
for i in range(n-2):
a2 = ((a2%MOD)*10)%MOD
print(((a1%MOD)*(a2%MOD))%MOD) | Traceback (most recent call last):
File "/tmp/tmpexbqqa3j/tmpdmp3rvso.py", line 1, in <module>
n = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s155724799 | p02554 | u240234332 | 1600026777 | Python | Python (3.8.2) | py | Runtime Error | 222 | 10564 | 94 | N = int(input())
x = 10**N - 8**N - (2/7) * ((8/7) * (8**N-1) - N)
y = 10**9 + 7
print(x % y) | Traceback (most recent call last):
File "/tmp/tmpo8yzvhef/tmp0xtnj9z0.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s914041106 | p02554 | u698916859 | 1600026768 | Python | Python (3.8.2) | py | Runtime Error | 207 | 10472 | 85 | # 整数の入力
N = int(input())
print( (10**(N-2) * N * (N-1) -7) / (10**9 + 7)) | Traceback (most recent call last):
File "/tmp/tmpfu3e_jv6/tmptggtxagg.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s562878740 | p02554 | u220545090 | 1600026710 | Python | Python (3.8.2) | py | Runtime Error | 27 | 8868 | 121 | n = int(input())
if n == 0 or n == 1:
print(0)
elif n == 2:
print(2):
else:
print((n * (n - 1) / 2) * 10 * (n - 2)) | File "/tmp/tmp527vpmgd/tmp2mxet2pd.py", line 5
print(2):
^
SyntaxError: invalid syntax
| |
s650515099 | p02554 | u359067113 | 1600026688 | Python | PyPy3 (7.3.0) | py | Runtime Error | 118 | 68704 | 96 | n=int(input())
for i in range(1,n + 1):
fac = fac*i
c=10**(n-2)
print((fac*c)%1000000007) | Traceback (most recent call last):
File "/tmp/tmpr6bea4yl/tmpmmxe766g.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s849878679 | p02554 | u476674874 | 1600026539 | Python | Python (3.8.2) | py | Runtime Error | 2226 | 619240 | 754 | import sys
import math
sys.setrecursionlimit(10**6)
MOD = 10**9 + 7
def mod_pow(x, mod):
xx = [1, x]
def _pow(y, x=x):
nonlocal xx
if y == 0:
return 1
while len(xx) <= math.log(y, 2)+1:
v = xx[-1] * xx[-1]
v %= mod
xx.append(v)
i =... | Traceback (most recent call last):
File "/tmp/tmp_p56wspw/tmph96o77jy.py", line 40, in <module>
main()
File "/tmp/tmp_p56wspw/tmph96o77jy.py", line 35, in main
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s417021263 | p02554 | u059940903 | 1600026503 | Python | PyPy3 (7.3.0) | py | Runtime Error | 370 | 85760 | 113 | N = int(input())
if N <= 1:
print(0)
else:
res = (10**N - 8**N - 2 * (9**N - 8**N)) % mod
print(int(res)) | Traceback (most recent call last):
File "/tmp/tmppb6qvqrj/tmpari7hsl9.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s023481420 | p02554 | u945342410 | 1600026495 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9148 | 107 | import math
n = int(input())
ans = math.factorial(10) / math.factorial(10 - (n-2))
print(ans % (10**9 + 7)) | Traceback (most recent call last):
File "/tmp/tmpjq_xcaj6/tmpucobqvd1.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.