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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s955321477 | p02554 | u873660730 | 1600026361 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9112 | 200 | a = 1000000007
n = input()
not0 = 1
not0and9 = 1
all = 1
for i in range(n):
not0and9 = (not0and9 * 8) % a
not0 = (not0 * 9) % a
all = (all * 10) % a;
print((all + not0and9 - 2 * not9) % a) | Traceback (most recent call last):
File "/tmp/tmp4qpusy0z/tmpuolcl5aa.py", line 3, in <module>
n = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s131375306 | p02554 | u770293614 | 1600026359 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9004 | 174 | N=int(input())
if N<2:
print(0)
ellif N==2:
print(2)
else:
without=10**(N-2)
considered=(without+2)*(without+1)
considered=considered%(1000000007)
print(considered)
| File "/tmp/tmpb8_hsppa/tmp7_2erhmf.py", line 5
ellif N==2:
^
SyntaxError: invalid syntax
| |
s105787969 | p02554 | u945342410 | 1600026301 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9164 | 108 | 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/tmpjzpuwbs_/tmp8wfg35zz.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s189576840 | p02554 | u871796501 | 1600026156 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9004 | 135 | import math
n = int(input())
if n == 1:
print(0)
else if n==2:
print(2)
else:
print(10**(n-2)*(math.factorial(n))%(10**9+7)) | File "/tmp/tmp472px_r1/tmp7mm5ljnq.py", line 5
else if n==2:
^^
SyntaxError: expected ':'
| |
s784332547 | p02554 | u116763463 | 1600026150 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9000 | 577 | #include<bits/stdc++.h>
using namespace std;
#define int long long
int mod = 1000000007;
#include "debug.cpp"
int dp[1000010][4];
int32_t main(){
int n;
cin >> n;
if(n == 1){
cout << "0\n";
return 0;
}
dp[2][0] = 64;
dp[2][1] = 17;
dp[2][2] = 17;
dp[2][3] = 2;
for(int i=3; i<=n; i++){
dp[i][0] = ... | File "/tmp/tmpbar8mai5/tmpv5pk8qr7.py", line 2
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s059306032 | p02554 | u945342410 | 1600026109 | Python | Python (3.8.2) | py | Runtime Error | 32 | 9108 | 96 | n = int(input())
ans = math.factorial(10) // math.factorial(10 - (n-2))
print(ans % (10**9 + 7)) | Traceback (most recent call last):
File "/tmp/tmp4o996syh/tmpa3bxen_w.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s200673376 | p02554 | u095424182 | 1600026025 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9072 | 128 | from math import comb
if __name__=="__main__":
n=int(input())
if n==1:
print(0)
break
else:
print(comb(n,2)*2) | File "/tmp/tmp1k_pxvrb/tmp4r62eoi5.py", line 6
break
^^^^^
SyntaxError: 'break' outside loop
| |
s150883076 | p02554 | u611090896 | 1600025996 | Python | Python (3.8.2) | py | Runtime Error | 31 | 9192 | 134 | N = int(input())
mod = 10**9+7
if N == 1:
print(0)
elif N == 2:
print(2)
else:
ans = 10*8*6*(10**(3(N-3)))
print((ans*2)%mod)
| /tmp/tmp2wgm_4km/tmpfkg5zxha.py:8: SyntaxWarning: 'int' object is not callable; perhaps you missed a comma?
ans = 10*8*6*(10**(3(N-3)))
Traceback (most recent call last):
File "/tmp/tmp2wgm_4km/tmpfkg5zxha.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s693445720 | p02554 | u068944955 | 1600025990 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9124 | 233 | from tqdm import tqdm
N = int(input())
if N == 1:
print(0)
exit()
Z = 10 ** 9 + 7
a = 1
b = 1
c = 1
for n in range(N):
a *= 10
b *= 9
c *= 8
a = a % Z
b = b % Z
c = c % Z
print((a - 2 * b + c) % Z) | Traceback (most recent call last):
File "/tmp/tmpq8qyjxzh/tmpthrmgl7n.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s492658639 | p02554 | u027561659 | 1600025967 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9192 | 274 | def powmod(a, n, p):
if(n==0):
return 1
elif(n==1):
return a%p
elif(n%2==1):
return ((a%p)*(powmod(a,n//2,p)**2%p))%p
elif(n%2==0):
return powmod(a,n//2,p)**2%p
N=int(input())
if(N==1):
print(0)
else:
print(powmod(10,N-2)) | Traceback (most recent call last):
File "/tmp/tmpf54974q9/tmp_l5xtqrd.py", line 10, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s899240674 | p02554 | u885722498 | 1600025949 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 14892 | 253 | # coding: utf8
# 日本語を入力できるようにするために上記一文が必要
import math
N = int(input())
if N == 1:
print(0)
elif N == 2:
print(1)
else:
ans = math.factorial(N)*(10**(N -2))
print(ans%(10**9+7)) | Traceback (most recent call last):
File "/tmp/tmp897iq7pq/tmp9s3q_ki1.py", line 6, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s193846977 | p02554 | u611090896 | 1600025921 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9164 | 129 | N = int(input())
mod = 10**9+7
if N == 1:
print(0)
elif N == 2:
print(2)
else:
ans = 10*8*6*10**(3(N-3))*2
print(ans%mod) | /tmp/tmprf518k8_/tmp0zr_gy7a.py:8: SyntaxWarning: 'int' object is not callable; perhaps you missed a comma?
ans = 10*8*6*10**(3(N-3))*2
Traceback (most recent call last):
File "/tmp/tmprf518k8_/tmp0zr_gy7a.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s259881445 | p02554 | u614063956 | 1600025797 | Python | Python (3.8.2) | py | Runtime Error | 27 | 8936 | 3013 | use std::io::{stdin, Read, StdinLock};
use std::str::FromStr;
#[allow(dead_code)]
struct Scanner<'a> {
cin: StdinLock<'a>,
}
#[allow(dead_code)]
impl<'a> Scanner<'a> {
fn new(cin: StdinLock<'a>) -> Scanner<'a> {
Scanner { cin: cin }
}
fn read<T: FromStr>(&mut self) -> Option<T> {
let t... | File "/tmp/tmp6jfra0l8/tmphqlm47c_.py", line 5
struct Scanner<'a> {
^
SyntaxError: unterminated string literal (detected at line 5)
| |
s158607218 | p02554 | u002067779 | 1600025792 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9008 | 101 | n = int(input())
x = 10**n%(10**9+7) + 8**n%(10**9+7) - 2 * 9**n%(10**9+7)
print(x%(10**9+7)) | File "/tmp/tmp2fdsm_xq/tmp2h6emb7_.py", line 2
x = 10**n%(10**9+7) + 8**n%(10**9+7) - 2 * 9**n%(10**9+7)
^
SyntaxError: invalid character '%' (U+FF05)
| |
s846962795 | p02554 | u770293614 | 1600025789 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9156 | 113 | N=int(input())
if N<2:
print(0)
else:
without=10*(N-2)
considered=(without+2)*(without+1)
consider%=10**9+7 | Traceback (most recent call last):
File "/tmp/tmpe3pu9cz1/tmpyrb5_dgh.py", line 1, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s435265178 | p02554 | u698916859 | 1600025719 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 14832 | 225 | 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/tmpa8uk3prm/tmp8kmrctoe.py", line 7, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s939291039 | p02554 | u770293614 | 1600025668 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9084 | 109 | N=input()
if N<2:
print(0)
else:
without=10*(N-2)
considered=(without+2)*(without+1)
print(considered)
| Traceback (most recent call last):
File "/tmp/tmpoxhdgt4x/tmpb1qjhwu0.py", line 1, in <module>
N=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s762059480 | p02554 | u635252313 | 1600025653 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 14964 | 160 | import math
N = int(input())
hoge = 10**9+7
if N == 1:
print(0)
else:
a = math.factorial(N) / math.factorial(N-2)
b = 10**(N-2)
print(a*b%hoge) | Traceback (most recent call last):
File "/tmp/tmpoaijzr9o/tmpe6oc_bjo.py", line 3, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s642007729 | p02554 | u068944955 | 1600025651 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9124 | 233 | from tqdm import tqdm
N = int(input())
if N == 1:
print(0)
exit()
Z = 10 ** 9 + 7
a = 1
b = 1
c = 1
for n in range(N):
a *= 10
b *= 9
c *= 8
a = a % Z
b = b % Z
c = c % Z
print((a - 2 * b + c) % Z) | Traceback (most recent call last):
File "/tmp/tmpfyq23s2x/tmppmj1d834.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s255525630 | p02554 | u068944955 | 1600025627 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9124 | 239 | from tqdm import tqdm
N = int(input())
if N == 1:
print(0)
exit()
Z = 10 ** 9 + 7
a = 1
b = 1
c = 1
for n in tqdm(range(N)):
a *= 10
b *= 9
c *= 8
a = a % Z
b = b % Z
c = c % Z
print((a - 2 * b + c) % Z) | Traceback (most recent call last):
File "/tmp/tmpojqblfqe/tmptcqh8psm.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s252085561 | p02554 | u770293614 | 1600025583 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9036 | 130 | N=input()
if N<2:
print(0)
elif N==2:
print(2)
else:
without=10*(N-2)
considered=(without+2)*(without+1)/2
print(considered) | Traceback (most recent call last):
File "/tmp/tmp0__v07xe/tmp329b1pof.py", line 1, in <module>
N=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s075083391 | p02554 | u561294476 | 1600025544 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 14844 | 485 | import math
def permutations_count(n, r):
return math.factorial(n) // math.factorial(n - r)
N = int(input())
sum = 0
for i in range(2, N+1):
basyo = permutations_count(N, i)/2 # 9と0が入る場所。i箇所。
# zerokyuu = i*(i-1)*2(i-2) # 入る場所に0と9を入れる。
zerokyuu = 2**i - 2 # 全部0と全部9を抜く。
iti_hachi = 8**(N-i) # 残... | Traceback (most recent call last):
File "/tmp/tmp5esz6auw/tmpizr7c6b6.py", line 5, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s182094035 | p02554 | u814986259 | 1600025449 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9008 | 70 | a, b, c, d = map(int, input().split())
print(max(a*c, a*d, b*c, b*d))
| Traceback (most recent call last):
File "/tmp/tmpr5nhp4hl/tmpntrxc0r4.py", line 1, in <module>
a, b, c, d = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s156761590 | p02554 | u698916859 | 1600025421 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 15368 | 229 | import math
# 整数の入力
N = int(input())
r = 2
def combinations_count(N, r):
return math.factorial(N) // (math.factorial(N - r) * math.factorial(r))
print(math.ceil(10**(N-2) * combinations_count(N, r) / (10**9 + 7))) | Traceback (most recent call last):
File "/tmp/tmp0gz1tdbu/tmpbaxli25z.py", line 3, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s151375633 | p02554 | u916205307 | 1600025410 | Python | Python (3.8.2) | py | Runtime Error | 20 | 9040 | 157 | n = int(input())
factorial = [1, 1]
for i in range(2, n+1):
factorial.append(i*factorial[i-1])
print((10**(n-2)%(10**9+7)*factorial(n)%(10**9+7))10**9+7) | File "/tmp/tmpb45fouvy/tmpvbq55znp.py", line 7
print((10**(n-2)%(10**9+7)*factorial(n)%(10**9+7))10**9+7)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
| |
s674050574 | p02554 | u021019433 | 1600025409 | Python | Python (3.8.2) | py | Runtime Error | 27 | 8916 | 91 | M = 10**9 + 7
n = int(input())
print((pow(10, n, M) - 2 * pow(9, n, M) + pow(8, n, M) % M)
| File "/tmp/tmpv6a5q9au/tmp7u_4ewjf.py", line 3
print((pow(10, n, M) - 2 * pow(9, n, M) + pow(8, n, M) % M)
^
SyntaxError: '(' was never closed
| |
s578610881 | p02554 | u770293614 | 1600025329 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9040 | 126 | N=input()
if N<2:
print(0)
elif N==2:
print(2)
else:
without=10*(N-2)
considered=without*(without-1)/2
print(considered) | Traceback (most recent call last):
File "/tmp/tmpkxmziwsx/tmp5dcmqxp7.py", line 1, in <module>
N=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s415169118 | p02554 | u561294476 | 1600025314 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 14672 | 489 | import math
def permutations_count(n, r):
return math.factorial(n) // math.factorial(n - r)
N = int(input())
sum = 0
for i in range(2, N+1):
basyo = permutations_count(N, i)/2 # 9と0が入る場所。i箇所。
# zerokyuu = i*(i-1)*2(i-2) # 入れる場所に0と9を入れる。
zerokyuu = 2**i - 2 # 全部0と全部9を抜く。
iti_hachi = 8**(N-2) # ... | Traceback (most recent call last):
File "/tmp/tmpsddxo7sj/tmpi793u20h.py", line 5, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s691861107 | p02554 | u193172405 | 1600025313 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9016 | 114 | x = int(input())
if x < 2:
print(0)
exit(0)
if x == 2:
return 2
ans = (2*((x-2)*10)) % 1000000007
print(ans) | File "/tmp/tmp4kffq33j/tmp77uuk7qw.py", line 6
return 2
^^^^^^^^
SyntaxError: 'return' outside function
| |
s799012036 | p02554 | u273101627 | 1600025249 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9388 | 112 | import math
n=int(input())
mod=10**9+1
if n==1:
print(0)
else:
print((2*int((math.pow(8,n-2)))%mod)%mod) | Traceback (most recent call last):
File "/tmp/tmp30xfb6lx/tmp59jxhkj3.py", line 2, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s276433093 | p02554 | u154027824 | 1600025218 | Python | PyPy3 (7.3.0) | py | Runtime Error | 87 | 68628 | 1293 | /*Author--Vishwas Agrawal*/
/*Author--Vishwas Agrawal*/
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define vll vector<ll>
#defi... | File "/tmp/tmpzc9op5gz/tmptn7d7o5s.py", line 1
/*Author--Vishwas Agrawal*/
^
SyntaxError: invalid syntax
| |
s357848954 | p02554 | u766486294 | 1600025213 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2210 | 168940 | 212 | import math
def combinations_count(n, r):
return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
N = int(input())
ans = combinations_count(N, 2) * 10 ** (N-2) * 2 % (10**9 + 7)
print(ans) | Traceback (most recent call last):
File "/tmp/tmp5ferap7i/tmpgmsmy3_l.py", line 8, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s408258245 | p02554 | u698916859 | 1600025182 | Python | Python (3.8.2) | py | Runtime Error | 198 | 10580 | 205 | # 整数の入力
N = int(input())
r = 2
def combinations_count(n, r):
return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
print(10**(N-2) * combinations_count(n, r) / (10**9 + 7)) | Traceback (most recent call last):
File "/tmp/tmpbkv8ly0y/tmpjeuz9pdw.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s823558455 | p02554 | u239228953 | 1600025091 | Python | Python (3.8.2) | py | Runtime Error | 28 | 8956 | 87 | n = int(input())
x = n*(n-1)%1000000007
y = 10**(n-2)%1000000007
print((x*y)%1000000007 | File "/tmp/tmp_f47nyg7/tmpr9cq5srv.py", line 4
print((x*y)%1000000007
^
SyntaxError: '(' was never closed
| |
s068690134 | p02554 | u135454978 | 1600025070 | Python | PyPy3 (7.3.0) | py | Runtime Error | 168 | 68600 | 273 | import sys
import math
from scipy.special import comb
mod = 10 ** 9 + 7
N = int(input())
if N <= 1:
print(0)
sys.exit()
# ans = comb(N, 2, exact=True) * 2 * (8 ** (N - 2)) + (9 ** N - 8 ** N) * 2
ans = 10 ** N - 8 ** N - (9 ** N - 8 ** N) * 2
print(ans % mod)
| Traceback (most recent call last):
File "/tmp/tmpeo_8z316/tmpzmvw2vm7.py", line 7, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s438471531 | p02554 | u268750247 | 1600025040 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9000 | 1531 | #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 ll long long
#define ull unsigned long long
#define ld long double
// #define ordered_set tree<pair<ll, ll>, null_type, less<pair<ll, ll>>, rb_tre... | File "/tmp/tmptrnnzeja/tmp1wc1vk_3.py", line 28
// To compile--> g++ -std=c++0x -o output one.cpp
^
SyntaxError: invalid hexadecimal literal
| |
s819033630 | p02554 | u000037600 | 1600024927 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9144 | 58 | a=int(input())
a=(10**n+8**n-2*(9**n))//(10**9+7)
print(a) | Traceback (most recent call last):
File "/tmp/tmpftjcwhn9/tmpao51vf9y.py", line 1, in <module>
a=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s344903796 | p02554 | u698901270 | 1600024904 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 15308 | 271 | import math
def nCr(n,r):
f = math.factorial
return f(n) / f(r) / f(n-r)
n = int(input())
p = pow(10, n-1)
if n == 1:
print(0)
elif n==2:
print(2)
else:
a = (10**(n-2))%(10**9+7)
b = ((int( nCr(n, 2) * 2) % (10**9+7) ))
print((a*b)%(10**9+7)) | Traceback (most recent call last):
File "/tmp/tmpl4btalyw/tmp00w_4sad.py", line 6, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s976276328 | p02554 | u773081031 | 1600024881 | Python | Python (3.8.2) | py | Runtime Error | 199 | 10684 | 63 | n = int(input())
x = n*(n-1)*2(10**(n-2))
print(x%(10**9 + 7)) | /tmp/tmp3stp46ae/tmpkvfd8me8.py:2: SyntaxWarning: 'int' object is not callable; perhaps you missed a comma?
x = n*(n-1)*2(10**(n-2))
Traceback (most recent call last):
File "/tmp/tmp3stp46ae/tmpkvfd8me8.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s841814514 | p02554 | u561615664 | 1600024860 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2211 | 168884 | 161 | N = int(input())
mod = 10**9+7
import math
NN = math.factorial(N+7)
U = (NN*(N+8)*(N+9))/362880
A = (NN*(N+8))/40320
C = NN/5040
S = int((U-2*A+C)%mod)
print(S)
| Traceback (most recent call last):
File "/tmp/tmpkcetia5b/tmp4v4e5idp.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s417024988 | p02554 | u905029819 | 1600024763 | Python | Python (3.8.2) | py | Runtime Error | 205 | 10500 | 66 | N = int(input())
num = N*(N-1)*(10**(N-2))/ (10**9 +7)
print(num) | Traceback (most recent call last):
File "/tmp/tmp81qur2y_/tmp4700r4vq.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s422767254 | p02554 | u109133010 | 1600024723 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9008 | 1809 | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
using namespace __gnu_pbds;... | File "/tmp/tmp6h3hbw2_/tmpy9_kq514.py", line 8
using namespace __gnu_pbds;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s882370704 | p02554 | u773440446 | 1600024722 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9160 | 128 | a,b,c,d = map(int,input().split())
ans = []
for i in c,d:
ans.append(a*i)
for j in c,d:
ans.append(b*j)
print(max(ans)) | Traceback (most recent call last):
File "/tmp/tmprdw5oa5g/tmp1jexml_1.py", line 1, in <module>
a,b,c,d = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s231005638 | p02554 | u905029819 | 1600024704 | Python | Python (3.8.2) | py | Runtime Error | 201 | 10448 | 67 | N = int(input())
num = (N*(N-1)*10**(N-2)) / (10**9 +7)
print(num) | Traceback (most recent call last):
File "/tmp/tmp51esom2j/tmpdmexuz35.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s765885338 | p02554 | u611090896 | 1600024596 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9152 | 96 | N = int(input())
mod = 10** + 7
if N == 1:
print(0)
else:
ans = N*10**(n-2)
print(ans%mod) | Traceback (most recent call last):
File "/tmp/tmpuuyumrn3/tmpot374r0t.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s714292631 | p02554 | u153047519 | 1600024478 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9024 | 192 | n = int(input())
a, b, c = 1, 1, 1
for i in range(n):
a, b, c = a * 10, b * 9, c * 8
a, b, c = a % (10**9+7), b % (10**9+7), , c % (10**9+7)
print(0 if n==1 else (a - b*2 + c) % (10**9+7)) | File "/tmp/tmptfp4fd4h/tmpbya6itie.py", line 5
a, b, c = a % (10**9+7), b % (10**9+7), , c % (10**9+7)
^
SyntaxError: invalid syntax
| |
s860899599 | p02554 | u740260565 | 1600024472 | Python | PyPy3 (7.3.0) | py | Runtime Error | 122 | 68572 | 463 | n = int(input())
MOD = 1000000007
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
if(n == 1):
print(0)
elif (n == 2):
print(2)
else:
kotae = 0
a = power_fun... | Traceback (most recent call last):
File "/tmp/tmp2xf_2l5y/tmpu6emoxb8.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s375844191 | p02554 | u168416324 | 1600024450 | Python | Python (3.8.2) | py | Runtime Error | 34 | 9168 | 124 | a,b,c,d=map(int,input().split())
if a*b>0 and c*d>0 and (a<0 ^ c<0):
ans=max(a*d,b*c)
else:
ans=max(a*c,b*d)
print(ans) | Traceback (most recent call last):
File "/tmp/tmpw0djxg6r/tmp_y_knno2.py", line 1, in <module>
a,b,c,d=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s892954428 | p02554 | u740260565 | 1600024332 | Python | PyPy3 (7.3.0) | py | Runtime Error | 122 | 74604 | 333 | n = int(input())
MOD = 1000000007
if(n == 1):
print(0)
elif (n == 2):
print(2)
else:
kotae = 0
a = 1
b = 1
c = 1
for i in range(n):
a *= 10
b *= 9
c *= 8
a = a % MOD
b = b % MOD
c = c % MOD
kotae = a + c - ( 2 * b)
kotae = kotae % MOD
... | Traceback (most recent call last):
File "/tmp/tmpx8w18vgf/tmpq4coc6og.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s448711090 | p02554 | u070630744 | 1600024184 | Python | PyPy3 (7.3.0) | py | Runtime Error | 87 | 68716 | 492 | import operator
def ncr(n, r):
if n < r: return 0
r = min(r, n-r)
if r == 0: return 1
numer = functools.reduce(operator.mul, range(n, n-r, -1), 1)
denom = functools.reduce(operator.mul, range(1, r+1), 1)
return numer // denom
def solve():
n = int(input())
if n < 2:
print(0)
... | Traceback (most recent call last):
File "/tmp/tmpqrf1znv2/tmp4pktnztb.py", line 24, in <module>
solve()
File "/tmp/tmpqrf1znv2/tmp4pktnztb.py", line 12, in solve
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s261807122 | p02555 | u688587139 | 1600730408 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9176 | 203 | S = int(input())
if S < 3:
print(0)
exit()
ans = [0 for _ in range(S+1)]
ans[3] = 1
ans[4] = 1
ans[5] = 1
for i in range(6, S+1):
ans[i] = ans[i-3] + ans[i-1]
print(ans[S] % 1000000007)
| Traceback (most recent call last):
File "/tmp/tmpbpnhz16f/tmp2gq7uduo.py", line 1, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s737687517 | p02555 | u585963734 | 1600714873 | Python | Python (3.8.2) | py | Runtime Error | 32 | 9164 | 156 | S=int(input())
ans=[0]*(S+1)
MOD=10**9+7
if S<=2:
print(0)
exit(0)
ans[3]=1
for i in range(4,S+1):
ans[i]=ans[i-1]+ans[i-3]
print(ans[i]%MOD) | Traceback (most recent call last):
File "/tmp/tmp_84w5cc_/tmp1k8ixcir.py", line 1, in <module>
S=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s567433378 | p02555 | u921676506 | 1600688755 | Python | Python (3.8.2) | py | Runtime Error | 82 | 9028 | 242 | import math
S = int(input())
if(S <= 2):
print(0)
else:
n = S // 3
ans = 0
for k in range(1, n + 1):
ans = int(ans + math.factorial(S - (2 * k) - 1)/(math.factorial(k - 1) * math.factorial(S - 3 * k)))
print(ans % (10 ** 9 + 7)) | Traceback (most recent call last):
File "/tmp/tmp2ovhl0q1/tmp9uha3ytp.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s775486324 | p02555 | u921676506 | 1600688523 | Python | Python (3.8.2) | py | Runtime Error | 84 | 9200 | 240 | import math
S = int(input())
if(S <= 2):
print(0)
else:
n = S // 3
ans = 0
for k in range(1, n + 1):
ans = int(ans + math.factorial(S - 2 * k - 1)/(math.factorial(k - 1) * math.factorial(S - 3 * k)))
print(ans % (10 ** 9 + 7)) | Traceback (most recent call last):
File "/tmp/tmpiu_dikmg/tmp37s7u8ge.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s043670236 | p02555 | u921676506 | 1600688385 | Python | Python (3.8.2) | py | Runtime Error | 81 | 9140 | 238 | import math
S = int(input())
n = S // 3
if(S <= 3):
print(0)
else:
ans = 0
for k in range(1, n + 1):
ans = int(ans + math.factorial(S - 2 * k - 1)/(math.factorial(k - 1) * math.factorial(S - 3 * k)))
print(ans % (10 ** 9 + 7)) | Traceback (most recent call last):
File "/tmp/tmpem55rqhp/tmpfsa0ihd2.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s972700829 | p02555 | u921676506 | 1600688161 | Python | Python (3.8.2) | py | Runtime Error | 83 | 9120 | 201 | import math
S = int(input())
n = S // 3
ans = 0
for k in range(1, n + 1):
ans = int(ans + math.factorial(S - 2 * k - 1)/(math.factorial(k - 1) * math.factorial(S - 3 * k)))
print(ans % (10 ** 9 + 7)) | Traceback (most recent call last):
File "/tmp/tmplqv_9f0r/tmp4n30so2n.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s001448019 | p02555 | u921676506 | 1600687638 | Python | Python (3.8.2) | py | Runtime Error | 86 | 9128 | 196 | import math
S = int(input())
n = S // 3
ans = 0
for k in range(1, n - 1):
ans = ans + math.factorial(S - 2 * k - 1)/(math.factorial(k - 1) * math.factorial(S - 3 * k))
print(ans % (10 ** 9 + 7)) | Traceback (most recent call last):
File "/tmp/tmpe27wymp9/tmp6hab5gzo.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s362481141 | p02555 | u921676506 | 1600687506 | Python | Python (3.8.2) | py | Runtime Error | 83 | 9216 | 274 | import math
S = int(input())
n = S // 3
ans = 0
for k in range(1, n - 1):
ans = ans + math.factorial(S - 2 * k - 1)/(math.factorial(k - 1) * math.factorial(S - 3 * k))
ans += (S % 3 == 0) + (S % 3 == 1) * n + (S % 3 == 2) * (n + 2) * (n + 1) / 2
print(ans % (10 ** 9 + 7)) | Traceback (most recent call last):
File "/tmp/tmpq9o18hz_/tmpy4a_vuxx.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s133182713 | p02555 | u921676506 | 1600686122 | Python | Python (3.8.2) | py | Runtime Error | 83 | 9212 | 377 | import math
S = int(input())
n = S // 3
ans = 0
if(n == 0):
print(0)
else:
ans = n
for k in range(2, n):
ans = ans + math.factorial(S - 2 * k - 1)/(math.factorial(k - 1) * math.factorial(S - 3 * k))
if(S == 3 * n):
ans = ans + 1
else:
ans = ans + math.factorial(S - 2 * n - 1)/(math.factorial(n - 1) ... | Traceback (most recent call last):
File "/tmp/tmpbcvusvu2/tmpb8nrhow0.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s234965007 | p02555 | u921676506 | 1600685501 | Python | Python (3.8.2) | py | Runtime Error | 81 | 9260 | 387 | import math
S = int(input())
n = S // 3
ans = 0
if(n == 0):
print(0)
else:
ans = 1
for k in range(2, n):
ans = int(ans + math.factorial(S - 2 * k - 1)/(math.factorial(k - 1) * math.factorial(S - 3 * k)))
if(S == 3 * n):
ans = ans + 1
else:
ans = int(ans + math.factorial(S - 2 * n - 1)/(math.factoria... | Traceback (most recent call last):
File "/tmp/tmp_hdn90ua/tmpg6n20dbs.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s309554681 | p02555 | u921676506 | 1600685427 | Python | Python (3.8.2) | py | Runtime Error | 84 | 9188 | 377 | import math
S = int(input())
n = S // 3
ans = 0
if(n == 0):
print(0)
else:
ans = 1
for k in range(2, n):
ans = ans + math.factorial(S - 2 * k - 1)/(math.factorial(k - 1) * math.factorial(S - 3 * k))
if(S == 3 * n):
ans = ans + 1
else:
ans = ans + math.factorial(S - 2 * n - 1)/(math.factorial(n - 1) ... | Traceback (most recent call last):
File "/tmp/tmp8ama80kz/tmpqqiql360.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s339258223 | p02555 | u921676506 | 1600685159 | Python | Python (3.8.2) | py | Runtime Error | 80 | 9232 | 381 | import math
S = int(input())
n = S // 3
ans = 0
if(n == 0):
print(0)
else:
ans = 1
for k in range(2, n - 1):
ans = ans + math.factorial(S - 2 * k - 1)/(math.factorial(k - 1) * math.factorial(S - 3 * k))
if(S == 3 * n):
ans = ans + 1
else:
ans = ans + math.factorial(S - 2 * n - 1)/(math.factorial(n -... | Traceback (most recent call last):
File "/tmp/tmplk_95v77/tmpdu48yhaf.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s992038821 | p02555 | u921676506 | 1600685084 | Python | Python (3.8.2) | py | Runtime Error | 81 | 9204 | 371 | import math
S = int(input())
n = S // 3
ans = 0
if(n == 0):
print(0)
else:
for k in range(1, n - 1):
ans = ans + math.factorial(S - 2 * k - 1)/(math.factorial(k - 1) * math.factorial(S - 3 * k))
if(S == 3 * n):
ans = ans + 1
else:
ans = ans + math.factorial(S - 2 * n - 1)/(math.factorial(n - 1) * math... | Traceback (most recent call last):
File "/tmp/tmpl87i4wfe/tmpcrxms_am.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s772245293 | p02555 | u921676506 | 1600685025 | Python | Python (3.8.2) | py | Runtime Error | 135 | 9196 | 369 | import math
S = int(input())
n = S // 3
ans = 0
if(n == 0):
print(0)
else:
for k in range(1, n - 1):
ans = ans + math.factorial(S - 2 * k - 1)/(math.factorial(k - 1) * math.factorial(S - 3 * k))
if(S == 3 * n):
ans = ans + 1
else:
ans = ans + math.factorial(S - 2 * n - 1)/(math.factorial(n - 1) * math... | Traceback (most recent call last):
File "/tmp/tmpn5ms34n0/tmpmek91a6f.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s052121139 | p02555 | u921676506 | 1600684917 | Python | Python (3.8.2) | py | Runtime Error | 77 | 9196 | 369 | import math
S = int(input())
n = S // 3
ans = 0
if(n == 0):
print(0)
else:
for k in range(1, n - 1):
ans = ans + math.factorial(S - 2 * k - 1)/(math.factorial(k - 1) * math.factorial(S - 3 * k))
if(S == 3 * k):
ans = ans + 1
else:
ans = ans + math.factorial(S - 2 * k - 1)/(math.factorial(k - 1) * math... | Traceback (most recent call last):
File "/tmp/tmp_yo1a7b8/tmpec69sdhz.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s027798967 | p02555 | u921676506 | 1600684733 | Python | Python (3.8.2) | py | Runtime Error | 79 | 9252 | 332 | import math
S = int(input())
n = S // 3
ans = 0
for k in range(1, n - 1):
ans = ans + math.factorial(S - 2 * k - 1)/(math.factorial(k - 1) * math.factorial(S - 3 * k))
if(S == 3 * k):
ans = ans + 1
else:
ans = ans + math.factorial(S - 2 * k - 1)/(math.factorial(k - 1) * math.factorial(S - 3 * k))
print(ans % (1... | Traceback (most recent call last):
File "/tmp/tmpr3_ssdkf/tmp7h3kxvpo.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s774686206 | p02555 | u921676506 | 1600684532 | Python | Python (3.8.2) | py | Runtime Error | 81 | 9104 | 192 | import math
S = int(input())
n = S // 3
ans = 0
for k in range(1, n):
ans = ans + math.factorial(S - 2 * k - 1)/(math.factorial(k - 1) * math.factorial(S - 3 * k))
print(ans % (10 ** 9 + 7)) | Traceback (most recent call last):
File "/tmp/tmpbogx2zj1/tmp7papl4s6.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s081155085 | p02555 | u921676506 | 1600684024 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9176 | 178 | import math
S = int(input())
n = S // 3
ans = -1
for k in range(n + 1):
ans = ans + math.factorial(S - 2 * k + 1)/(math.factorial(k - 1) * math.factorial(S - k + 2))
print(ans) | Traceback (most recent call last):
File "/tmp/tmp950czig5/tmpfz6upm60.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s241007813 | p02555 | u921676506 | 1600683755 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9132 | 163 | from itertools import combinations
S = int(input())
n = S // 3
ans = -1
for k in range(n + 1):
ans = ans + itertools.combinations(S -2 * k + 1, k - 1)
print(ans) | Traceback (most recent call last):
File "/tmp/tmpajtvirh9/tmpok5rfjxi.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s584576604 | p02555 | u921676506 | 1600683603 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9084 | 166 | from itertools import combinations
S = int(input())
n = S // 3
ans = -1
for k in range(n + 1):
ans = ans + combinations.combinations(S -2 * k + 1, k - 1)
print(ans) | Traceback (most recent call last):
File "/tmp/tmpw0vpp5xd/tmpmfd3ckhw.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s890777955 | p02555 | u921676506 | 1600683389 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9124 | 153 | from itertools import combinations
S = int(input())
n = S // 3
ans = -1
for k in range(n + 1):
ans = ans + combinations(S -2 * k + 1, k - 1)
print(ans) | Traceback (most recent call last):
File "/tmp/tmp10z2_hiq/tmpisixueyg.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s378423928 | p02555 | u921676506 | 1600683171 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9164 | 182 | import math
S = int(input())
n = S // 3
ans = -1
for k in range(n + 1):
ans = ans + math.fractorial(S -2 * k + 1) / (math.fractorial(k - 1) * math.fractorial(S - k + 2))
print(ans) | Traceback (most recent call last):
File "/tmp/tmpnbdeb66j/tmppa8q9q22.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s667043481 | p02555 | u921676506 | 1600683070 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9148 | 167 | import math
S = int(input())
n = S // 3
ans = -1
for k in range(n + 1):
ans = ans + fractorial(S -2 * k + 1) / (fractorial(k - 1) * fractorial(S - k + 2))
print(ans) | Traceback (most recent call last):
File "/tmp/tmps7i1599v/tmpdbwp7l63.py", line 2, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s584118238 | p02555 | u921676506 | 1600682951 | Python | Python (3.8.2) | py | Runtime Error | 23 | 8940 | 167 | inport math
S = int(input())
n = S // 3
ans = -1
for k in range(n + 1):
ans = ans + fractorial(S -2 * k + 1) / (fractorial(k - 1) * fractorial(S - k + 2))
print(ans) | File "/tmp/tmp_5blqd1m/tmplciwppyo.py", line 1
inport math
^^^^
SyntaxError: invalid syntax
| |
s335029184 | p02555 | u447679353 | 1600626040 | Python | Python (3.8.2) | py | Runtime Error | 184 | 42424 | 148 | import scipy.special.comb
S = int(input)
ans = 0
for i in range(3, S+1, 3):
ans += scipy.special.comb(S-2*(i//3)-1, i//3-1, exact=True)
print(ans) | Traceback (most recent call last):
File "/tmp/tmplw46tdvi/tmpv4e84j3f.py", line 1, in <module>
import scipy.special.comb
ModuleNotFoundError: No module named 'scipy.special.comb'
| |
s819438306 | p02555 | u425950110 | 1600608743 | Python | Python (3.8.2) | py | Runtime Error | 607 | 9188 | 433 | import sys
amount = int(input())
if amount < 3:
print(0)
sys.exit()
coins = [x for x in range(3,amount+1)]
lst = [amount+1 for x in range(amount+1)]
lst[0] = 1
lst[1] = 0
lst[2] = 0
lst[3] = 1
lst[4] = 1
lst[5] = 1
for i in range(6,amount+1):
counter = 0
for coin in coins:
change = i - co... | Traceback (most recent call last):
File "/tmp/tmpd8tybeur/tmp0a4_2dku.py", line 2, in <module>
amount = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s436996194 | p02555 | u425950110 | 1600608377 | Python | Python (3.8.2) | py | Runtime Error | 554 | 9312 | 381 |
amount = int(input())
coins = [x for x in range(3,amount+1)]
lst = [amount+1 for x in range(amount+1)]
lst[0] = 1
lst[1] = 0
lst[2] = 0
lst[3] = 1
lst[4] = 1
lst[5] = 1
for i in range(6,amount+1):
counter = 0
for coin in coins:
change = i - coin
if change >= 0:
counter += lst[... | Traceback (most recent call last):
File "/tmp/tmp2i5glju1/tmpf1nn71_q.py", line 2, in <module>
amount = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s965947818 | p02555 | u206133536 | 1600603658 | Python | PyPy3 (7.3.0) | py | Runtime Error | 105 | 74732 | 208 | MOD = 10**9 + 7
dp = {0: 1}
S = int(input())
for s in range(3, S+1):
for term in range(3, s+1):
if s - term < 0:
break
else:
dp[s] = dp.get(s-term, 0) + dp.get(s, 0) % MOD
print(dp[S]) | Traceback (most recent call last):
File "/tmp/tmppcdq5jca/tmpflb1raay.py", line 4, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s290666434 | p02555 | u728050879 | 1600540034 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9216 | 154 | s = int(input())
a = [-1]*(s+1)
mod = 10**9 + 7
a[0] = 1
a[1] = 0
a[2] = 0
a[3] = 1
for i in range (4,s+1):
a[i] = (a[i-1]+a[i-3])%mod
print(a[s])
| Traceback (most recent call last):
File "/tmp/tmpqsm7wlpc/tmpqon92bag.py", line 1, in <module>
s = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s972575131 | p02555 | u728050879 | 1600539896 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9164 | 132 | s = int(input())
a = [-1]*(s+1)
a[0] = 1
a[1] = 0
a[2] = 0
a[3] = 1
for i in range (4,s+1):
a[i] = a[i-1]+a[i-3]
print(a[s])
| Traceback (most recent call last):
File "/tmp/tmp8uwmk92d/tmpxeqfgj1s.py", line 1, in <module>
s = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s277473954 | p02555 | u936988827 | 1600536363 | Python | Python (3.8.2) | py | Runtime Error | 27 | 8972 | 67 | n=int(input())
mod = 10**9+7
dp = [0]*(s+1)
dp[0] = 1
print(dp[]) | File "/tmp/tmpya0celm9/tmpb7otjf8x.py", line 7
print(dp[])
^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
| |
s072311477 | p02555 | u588235520 | 1600531837 | Python | Python (3.8.2) | py | Runtime Error | 84 | 9188 | 344 | import math
def main():
s = int(input())
quo = int(s/3)
count = 0
for i in range(1, quo+1):
a = math.factorial((s-3*i)+(i-1))
b = math.factorial(s-3*i)
c = math.factorial(i-1)
add = int(a/(b*c))
count += add
return count % (10**9+7)
if __name__ == "__mai... | Traceback (most recent call last):
File "/tmp/tmputcdbofb/tmpqzdghm76.py", line 20, in <module>
print(main())
^^^^^^
File "/tmp/tmputcdbofb/tmpqzdghm76.py", line 5, in main
s = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s929746620 | p02555 | u588235520 | 1600529947 | Python | PyPy3 (7.3.0) | py | Runtime Error | 171 | 73220 | 364 | import math
def main():
s = int(input())
quo = int(s/3)
count = 0
for i in range(1, quo+1):
a = int(math.factorial((s-3*i)+(i-1)))
b = int(math.factorial(s-3*i))
c = int(math.factorial(i-1))
add = int(a/(b*c))
count += add
return int(count % (10**9+7))
i... | Traceback (most recent call last):
File "/tmp/tmpieyywpf1/tmp8x90lkbd.py", line 20, in <module>
print(main())
^^^^^^
File "/tmp/tmpieyywpf1/tmp8x90lkbd.py", line 5, in main
s = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s035771861 | p02555 | u918601425 | 1600520148 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9292 | 194 | N=int(input())
MOD=10**9+7
DP1=[0 for _ in range(N+2)]
DP2=[0 for _ in range(N+2)]
DP1[3]=1
DP2[3]=1
for i in range(4,N+1):
DP1[i]=(DP2[i-3]+1)%MOD
DP2[i]=(DP1[i]+DP2[i-1])%MOD
print(DP1[N]) | Traceback (most recent call last):
File "/tmp/tmpmpfb71tw/tmpkx4xs7ni.py", line 1, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s305546265 | p02555 | u350491208 | 1600513210 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9196 | 349 | import math
mod = 10 ** 9 + 7
def C(n, r):
return int(math.factorial(n) / math.factorial(n - r) / math.factorial(r))
def F(s):
if s < 3:
return 0
elif s < 6:
return 1
else:
ans = 1
for i in range(6, s+1, 3):
ans += C(s-i+1, s-i)
return ans
s = i... | Traceback (most recent call last):
File "/tmp/tmpzds416jl/tmpt2g7s343.py", line 22, in <module>
s = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s056377584 | p02555 | u474162944 | 1600512574 | Python | PyPy3 (7.3.0) | py | Runtime Error | 124 | 74744 | 568 | import numpy as np
S = int(input())
l = S//3
#r = s%3
#print ('l=' + str(l))
Cp = 1
Ci = 1
count = 0
#for k in range(i):
# Cp = Cp*(r+i-k)
# Ci = Ci*(k+1)
#c = Cp//Ci
for i in range(l):
r = S - 3*(i+1)
#c=(r+i)!/r!/i!
#for k in range(i):
# Cp = Cp*(r+i-k)
# Ci = Ci*(k+... | Traceback (most recent call last):
File "/tmp/tmp0yphn0_i/tmp5f3p8elp.py", line 3, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s368446524 | p02555 | u474162944 | 1600512394 | Python | Python (3.8.2) | py | Runtime Error | 110 | 27112 | 562 | import numpy as np
S = int(input())
l = S//3
r = s%3
#print ('l=' + str(l))
Cp = 1
Ci = 1
count = 0
#for k in range(i):
# Cp = Cp*(r+i-k)
# Ci = Ci*(k+1)
#c = Cp//Ci
for i in range(l):
r = S - 3*(i+1)
#c=(r+i)!/r!/i!
#for k in range(i):
# Cp = Cp*(r+i-k)
# Ci = Ci*(k+1... | Traceback (most recent call last):
File "/tmp/tmp710q36bd/tmpsolen8nd.py", line 3, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s018818194 | p02555 | u350491208 | 1600499662 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 9288 | 165 | def F(n):
if n < 3:
return 0
elif n < 6:
return 1
else:
return F(n - 1) + F(n - 3)
s = int(input())
print(F(s) % (10 ** 9 + 7)) | Traceback (most recent call last):
File "/tmp/tmpd1q34qat/tmp1v38z19n.py", line 10, in <module>
s = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s015536124 | p02555 | u350491208 | 1600499391 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 9580 | 197 | def F(n):
if n <1:
return 1
elif n < 3:
return 0
elif n < 6:
return 1
else:
return F(n - 1) + F(n - 3)
s = int(input())
print(F(s) % (10 ** 9 + 7)) | Traceback (most recent call last):
File "/tmp/tmp7rzd3bej/tmpw_2i6zln.py", line 12, in <module>
s = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s136115350 | p02555 | u350491208 | 1600498929 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 9456 | 185 | def F(n):
if n < 3:
return 0
elif n < 6:
return 1
else:
return F(n - 2) + F(n - 3) + F(n - 4)
s = int(input())
print(F(s) % (10 ** 9 + 7))
| Traceback (most recent call last):
File "/tmp/tmp4dpkiprt/tmpt_f8b_zb.py", line 10, in <module>
s = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s900024849 | p02555 | u622838398 | 1600498329 | Python | Python (3.8.2) | py | Runtime Error | 21 | 8980 | 33 | import math
return math.ceil(S/2) | File "/tmp/tmp6cs64zck/tmpndvkdt9v.py", line 2
return math.ceil(S/2)
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: 'return' outside function
| |
s858957121 | p02555 | u889405092 | 1600466725 | Python | Python (3.8.2) | py | Runtime Error | 28 | 8936 | 167 | S=int(input())
import math
n=S//3
sum1=0
for i in range(1,n+1)
sum1=sum1+math.factorial(S-3i)/((math.factorial(i-1))*(math.factorial(S-4i+1)))
print(sum1%(10**9+7))
| File "/tmp/tmp0wvr0e5m/tmpier19b0_.py", line 6
sum1=sum1+math.factorial(S-3i)/((math.factorial(i-1))*(math.factorial(S-4i+1)))
^
SyntaxError: invalid decimal literal
| |
s920149635 | p02555 | u889405092 | 1600466702 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9016 | 172 | S=int(input())
import math
n=math.S//3
sum1=0
for i in range(1,n+1)
sum1=sum1+math.factorial(S-3i)/((math.factorial(i-1))*(math.factorial(S-4i+1)))
print(sum1%(10**9+7))
| File "/tmp/tmp8gs0sr4l/tmpx15wtk1e.py", line 6
sum1=sum1+math.factorial(S-3i)/((math.factorial(i-1))*(math.factorial(S-4i+1)))
^
SyntaxError: invalid decimal literal
| |
s777509357 | p02555 | u889405092 | 1600466601 | Python | Python (3.8.2) | py | Runtime Error | 28 | 8956 | 170 | S=int(input())
import math
n=math.S//3
sum1=0
for i in range(1,n+1)
sum1=sum1+math.factorial(S-3i)/(math.factorial(i-1))*(math.factorial(S-4i+1))
print(sum1%(10**9+7))
| File "/tmp/tmp12t3wpo0/tmp1ia7i56j.py", line 6
sum1=sum1+math.factorial(S-3i)/(math.factorial(i-1))*(math.factorial(S-4i+1))
^
SyntaxError: invalid decimal literal
| |
s022722758 | p02555 | u889405092 | 1600466577 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9012 | 160 | S=int(input())
import math
n=math.S//3
sum1=0
for i in range(1,n+1)
sum1=sum1+math.factorial(S-3i)/(math.factorial(i-1))*(math.factorial(S-4i+1))
print(sum1)
| File "/tmp/tmpbucx5714/tmpi3rzk6xw.py", line 6
sum1=sum1+math.factorial(S-3i)/(math.factorial(i-1))*(math.factorial(S-4i+1))
^
SyntaxError: invalid decimal literal
| |
s410511606 | p02555 | u109879985 | 1600458677 | Python | PyPy3 (7.3.0) | py | Runtime Error | 108 | 75308 | 3768 | import cmath
import math
P=math.pi
p=10**9+7
class Polynomial:
def __init__(self,L):
self.poly=L
self.mod=p
def __str__(self):
return str(self.poly)
def __add__(self,other):
L=self.poly
M=other.poly
p=self.mod
if(p!=other.mod):
return "Check your inputs"
else:
l=len(L)
m=len(M)
if(l==m... | Traceback (most recent call last):
File "/tmp/tmpfal38mhi/tmprhdoicaa.py", line 231, in <module>
s=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s045987948 | p02555 | u109879985 | 1600458584 | Python | PyPy3 (7.3.0) | py | Runtime Error | 103 | 75276 | 3761 | import cmath
import math
P=math.pi
p=10**9+7
class Polynomial:
def __init__(self,L):
self.poly=L
self.mod=p
def __str__(self):
return str(self.poly)
def __add__(self,other):
L=self.poly
M=other.poly
p=self.mod
if(p!=other.mod):
return "Check your inputs"
else:
l=len(L)
m=len(M)
if(l==m... | Traceback (most recent call last):
File "/tmp/tmpzr2_527a/tmp3qwkoszb.py", line 231, in <module>
s=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s208126046 | p02555 | u837340160 | 1600442429 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 9680 | 205 | S = int(input())
def seq(n):
if n == 0:
return 1
elif n == 1 or n == 2:
return 0
else:
return seq(n-1) + seq(n-3)
ans = seq(S)
mod = 10 ** 9 + 7
ans %= mod
print(ans)
| Traceback (most recent call last):
File "/tmp/tmptosucfb3/tmp_6g5fgd3.py", line 1, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s915735617 | p02555 | u717792745 | 1600424762 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9144 | 137 | n=int(input())
dp=[0]*(n+1)
dp[0]=1
dp[1]=0
dp[3]=0
s=0
for i in range(3,n+1):
s+=dp[i-3]
s=s%1000000007
dp[i]=s
print(dp[n]) | Traceback (most recent call last):
File "/tmp/tmpp5030web/tmptllfibgv.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s029832729 | p02555 | u717792745 | 1600424741 | Python | Python (3.8.2) | py | Runtime Error | 32 | 9160 | 137 | n=int(input())
dp=[0]*(n+1)
dp[0]=1
dp[1]=0
dp[3]=0
s=0
for i in range(3,n+1):
s+=dp[i-3]
s=s%1000000009
dp[i]=s
print(dp[n]) | Traceback (most recent call last):
File "/tmp/tmpvzxdnz9d/tmph6_jgrm4.py", line 1, 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.