s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s739630404 | p03795 | u873904588 | 1488457026 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 81 | N,M = map(int,input().split())
num_c = N*2 + M
num_Scc = num_c//4
print(num_Scc)
|
s397982759 | p03795 | u873904588 | 1488455827 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 83 | a = int(input())
b,c=map(int,input().split())
s=input()
print(str(a+b+c) + " " + s) |
s357505617 | p03795 | u692632484 | 1488145177 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 50 | N=int(input())
ans=N*800-(N-N%15)*200/15
print ans |
s659233432 | p03795 | u692632484 | 1488145103 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 37 | N=input()
print N*800-(N-N%15)*200/15 |
s119066982 | p03795 | u677421794 | 1488093190 | Python | Python (2.7.6) | py | Runtime Error | 11 | 2696 | 769 | # -*- coding: utf-8 -*-
N = input()
S = raw_input()
Ans = ''
StartString = ['SS','SW','WS','WW']
CheckFlag = 0
for i in range(4):
Ans += StartString[i]
for j in range(N-1):
if(Ans[j+1]=='S' and S[j+1]=='o'):
Ans += Ans[j]
elif(Ans[j+1]=='S' and S[j+1]=='x'):
if(Ans[j]=='... |
s544885834 | p03795 | u870040448 | 1487977329 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 99 | N, M = map(int, raw_input().split())
if M - 2*N < 0:
print N
else:
print N + int((M - 2*N)/4)
|
s565547798 | p03795 | u762603420 | 1487898147 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3192 | 2620 | # -*- coding: utf-8 -*-
def check(s, ans):
if len(s) != len(ans):
return False;
for i in range(0, len(s)):
pre = i - 1
next = i + 1
if i == 0:
pre = len(s) - 1
if i == len(s) - 1:
next = 0
if ans[i] == "S":
if s... |
s815128702 | p03795 | u590905793 | 1487824419 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 22 | n = int(row())
print n |
s421177819 | p03795 | u805887876 | 1487790541 | Python | Python (2.7.6) | py | Runtime Error | 11 | 2568 | 58 | n = raw_input()
x = n * 800
y = (n / 15) * 200
print x-y |
s238895623 | p03795 | u805887876 | 1487790493 | Python | Python (2.7.6) | py | Runtime Error | 11 | 2568 | 58 | n = raw_input()
x = n * 800
y = (n % 15) * 200
print x-y |
s320757289 | p03795 | u048472001 | 1487656484 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 106 | n, m = map(int, input() .split())
if n >= m//2:
ans = m//2
else:
ans = n + (m - 2 * n) // 4
print(ans) |
s228996754 | p03795 | u622011073 | 1487488113 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 53 | n,m=map(int,input().split());print((min(2*n,m)+m)//4) |
s726685494 | p03795 | u614459338 | 1487475513 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3576 | 4939 | N = int(input())
s = input()
def lier_check(aa):
lier = 1
if aa==0:
mae=N-1
else:
mae=aa-1
if aa == N-1:
ato = 0
else:
ato = aa+1
if ans[aa] == 'S' and s[aa] == 'o':
if ans[mae] != ans[ato]:
lier = -1
if ans[aa] == 'S' and s[aa] == 'x... |
s552997312 | p03795 | u150117535 | 1487475498 | Python | PyPy3 (2.4.0) | py | Runtime Error | 193 | 40500 | 988 | import sys
N = int(input())
ipt = list(input())
stR = ["S" for i in range(N)]
def sheep(stg):
return stg
def wolf(stg):
if stg == "S":
return "W"
else:
return "S"
def modN (i):
return i%N
def check ( num1,num2 ):
for i in range(N+2):
if stR[modN(i+1)] == "S" and ipt[mo... |
s753100655 | p03795 | u878372089 | 1487474448 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 401 | N = int(input())
s = str(input())
ss = s
if N%2 == 1:
s += s[0]
if s[:len(s)/2]*2 != s:
print(-1)
else:
ans = ''
Flag = 0
for c in ss:
if Flag == 0:
ans += 'S'
if c == 'x':
Flag = 1
else:
if c == 'x':
ans += 'S'
... |
s394774054 | p03795 | u583826716 | 1487474316 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 1447 | SHEEP = True
WOLF = False
def print_tree(tree):
print(''.join(['S' if e else 'W' for e in tree]))
def calc_next_animal(tree, cur_pos):
if answer[cur_pos]:
if tree[cur_pos] == SHEEP:
return tree[cur_pos - 1]
else:
return not tree[cur_pos - 1]
else:
if tree[... |
s724923085 | p03795 | u996252264 | 1487474244 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 1061 | N = int(input())
t = list(input())
Ans = ['n' for _ in t]
def judge(prevSW, SW, ox):
if SW == 'S':
if ox == 'o':
return prevSW
else:
if prevSW == 'S':
return 'W'
else: return 'S'
elif SW == 'W':
if ox == 'x':
return prevSW
... |
s707054870 | p03795 | u811388439 | 1487472227 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 85 | def sunuke_f(n) :
x = n * 800
y = (n // 15) * 200
return(x-y)
sunuke_f(N) |
s837102365 | p03795 | u177756077 | 1487472078 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2572 | 15 | 800*N-15%N*200
|
s474051978 | p03795 | u104888971 | 1487471460 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 51 | = int(input())
print(N * 800 - ((N // 15) * 200)) |
s452674679 | p03795 | u104888971 | 1487471201 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 62 | N = input()
print(N / 15)
print(N * 800 - ((N / 15) * 200))
|
s178654048 | p03795 | u811388439 | 1487470833 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 77 | def sunuke_f(n) :
x = n * 800
y = n // 15 * 200
return(x-y)
sunuke_f(N) |
s575725734 | p03795 | u952236873 | 1487470145 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 69 | import sys
N = int(sys.argv[1])
x = 800*N
y = (N/15)*200
print x - y
|
s986134218 | p03795 | u952236873 | 1487469773 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 91 | import sys
N = int(sys.argv[1])
assert(1 <= N <= 100)
x = 800*N
y = (N/15)*200
print x - y
|
s833399544 | p03796 | u828593789 | 1601442246 | Python | PyPy3 (7.3.0) | py | Runtime Error | 83 | 68536 | 263 | #include <iostream>
using namespace std;
using ll = long long int;
const ll MOD = 1000000007;
int main(){
ll n;
cin >> n;
ll ans = 1;
for(ll i = 2; i <= n; i++){
ans *= i;
ans %= MOD;
}
cout << ans << endl;
return 0;
} |
s190406207 | p03796 | u962718741 | 1601305700 | Python | Python (3.8.2) | py | Runtime Error | 23 | 8936 | 35 | print(math.factorial(int(input()))) |
s019158929 | p03796 | u889405092 | 1600323208 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9104 | 60 | import math
N=int(input())
print(math.factrial(N)%(10**9+7)) |
s367209124 | p03796 | u477320129 | 1599690308 | Python | Python (3.8.2) | py | Runtime Error | 44 | 9528 | 108 | from functools import reduce
MOD = 1_000_000_007
print(reduce(lambda a,b: a*b%MOD, range(1, int(input()))))
|
s187397943 | p03796 | u477320129 | 1599690191 | Python | Python (3.8.2) | py | Runtime Error | 44 | 9540 | 107 | from functools import reduce
MOD = 1_000_000_007
print(reduce(lambda a,b: a*b%MOD, range(1, int(input())))) |
s382355929 | p03796 | u179169725 | 1599619944 | Python | Python (3.8.2) | py | Runtime Error | 21 | 8884 | 539 | mycode = '''
# distutils: language=c++
# cython: language_level=3, boundscheck=False, wraparound=False
# cython: cdivision=True
ctypedef long long LL
import numpy as np
cimport numpy as cp
cdef LL MOD = 10**9 + 7
cdef LL N = int(input())
cdef LL ans = 1
cdef i
for i in range(2, N + 1):
ans *= i
ans %= MOD
pri... |
s412828293 | p03796 | u197237612 | 1599531813 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 9192 | 80 | n = int(input())
ans = 1
for i in range(1, n+1):
ans *= i
print(ans/(10**9+7)) |
s636540748 | p03796 | u244836567 | 1599343685 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 9484 | 135 | a=int(input())
b=1
for i in range(1,a+1):
b=b*i
if b<1000000000:
print(b)
else:
print(((b/10000000000)*(10000000000))%1000000007) |
s370446859 | p03796 | u074220993 | 1599246631 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9632 | 91 | N = int(input())
mod = int(10e9+7)
f = lambda n:1 if n==1 else n * f(n-1) % mod
print(f(N)) |
s780161529 | p03796 | u748722044 | 1599153709 | Python | PyPy3 (7.3.0) | py | Runtime Error | 90 | 74196 | 95 | n = int(input())
start = 1
for i in range(2, n+1):
start *= i
start %= MOD
print(start) |
s225534887 | p03796 | u477142306 | 1598960379 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9088 | 92 | s=int(input())
ans=1
for i in range(1,n+1):
ans=ans%(10**9+7)*i
print(ans%(10**9+7)) |
s745898421 | p03796 | u477142306 | 1598960363 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9160 | 92 | s=int(input())
ans=1
for i in range(1,n+1):
ans=ans%(10**9+7)*n
print(ans%(10**9+7)) |
s523320056 | p03796 | u477142306 | 1598960308 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9164 | 92 | s=int(input())
ans=1
for i in range(1,n+1):
ans=ans%(10**9+7)*n
print(ans%(10**9+7)) |
s822399919 | p03796 | u477142306 | 1598960266 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9164 | 93 | s=int(input())
ans=1
for i in range(1,n+1):
ans=ans%(10**9+7)*n
print(ans%1000000007) |
s816181722 | p03796 | u477142306 | 1598960245 | Python | Python (3.8.2) | py | Runtime Error | 18 | 9036 | 94 | s=int(input())
ans=1
for i in range(1,n+1):
ans=ans%(10**9+7)*n
print(ans%10000000007) |
s396226679 | p03796 | u477142306 | 1598956296 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8784 | 166 | #include<bits/stdc++.h>
using namespace std;
int main(){
long long int n,i,ans=1;
cin>>n;
for(i=1;i<=n;i++)
ans=(ans*i)%(10000000007);
cout<<ans<<endl; |
s789256644 | p03796 | u477142306 | 1598956076 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9076 | 66 | s=int(input())
ans=1
for i in range(1,n+1):
ans*=i
print(ans) |
s267514613 | p03796 | u607563136 | 1598400094 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9000 | 45 | print(math.factorial(int(input()))%(10**9+7)) |
s605672343 | p03796 | u068142202 | 1598287220 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 10152 | 140 | from decimal import Decimal
n = int(input())
training = 1
for i in range(1, n):
training *= i
print(Decimal(training) % (10 ** 9 + 7))
|
s394144631 | p03796 | u392361133 | 1597415715 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9152 | 66 | import math
n = int(input())
print(math.factrial(n) % (10**9 + 7)) |
s874645968 | p03796 | u698756732 | 1597170274 | Python | Python (3.8.2) | py | Runtime Error | 22 | 9020 | 129 | n = int(input())
power = 1
for i in range(1,n+1):
power *= i
power = power % (10 ** 9 + 7))
print(power % (10 ** 9 + 7)) |
s081445820 | p03796 | u921632705 | 1597167797 | Python | Python (3.8.2) | py | Runtime Error | 22 | 9096 | 91 | import math
x = int(input())
a = 10*10*10*10*10*10*10*10*10+7
print(math.fanctional(x) % a) |
s414191132 | p03796 | u921632705 | 1597167761 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9160 | 89 | import math
x = int(input())
a = 10*10*10*10*10*10*10*10*10+7
print(math.fanctional(x)%a) |
s440016667 | p03796 | u921632705 | 1597167733 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9164 | 89 | import math
x = int(input())
a = 10*10*10*10*10*10*10*10*10+7
print(math.functional(x)%a) |
s542314020 | p03796 | u921632705 | 1597167664 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9156 | 90 | import math
x = int(input())
y = 10*10*10*10*10*10*10*10*10 +7
print(math.functional(x)%y) |
s282764932 | p03796 | u985929170 | 1595620974 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9388 | 106 | N = int(input())
def amari(n):
if n==1:return 1
return (n*amari(n-1)) % 1000000007
print(amari(N)) |
s212056268 | p03796 | u277312083 | 1595390023 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8880 | 216 | #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
int main(){
long int n, i = 1;
cin >> n;
for(long int j = 1; j <= n; j++){
i *= j;
i %= MOD;
}
cout << i << endl;
return 0;
}
|
s053740065 | p03796 | u215376033 | 1595351348 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8940 | 88 | number = input()
power = 1;
for i in range(number):
power = power * i
print(power) |
s043890186 | p03796 | u755116850 | 1594588788 | Python | Python (3.8.2) | py | Runtime Error | 28 | 8988 | 121 | # coding: utf-8
n = int(N)
power = 1
for i in range(1, n+1):
power *= i
power = power % (10**9+7)
print(power) |
s344527460 | p03796 | u789290859 | 1593716752 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8984 | 90 | N = int(input())
power = 1
for i in range(1:N+1):
power *= i
print(power/1000000000+7) |
s213325611 | p03796 | u403436880 | 1593229929 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8884 | 59 | import math
N = int(input())
print(factorial.(N)%(10**9+7)) |
s437752301 | p03796 | u075303794 | 1592489187 | Python | Python (3.4.3) | py | Runtime Error | 277 | 20364 | 85 | import numpy as np
n = int(input())
l = np.arange(1,n+1)
print(np.pord(l)%(10**9+7)) |
s412040769 | p03796 | u084320347 | 1592245422 | Python | PyPy3 (2.4.0) | py | Runtime Error | 184 | 38256 | 85 | n = int(input())
ans = 1
for i in range(1,n+1):
ans=ans*i%(1e9+7)
print(int(ans) |
s168494790 | p03796 | u378157957 | 1592092012 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 146 | FACTOR = 10 ** 9 + 7
num = 1
for i in range(1, N+1):
num *= i
k, r = divmod(num, FACTOR)
num = r
k, r = divmod(num, FACTOR)
print(r) |
s631438568 | p03796 | u964521959 | 1591396003 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 3540 | 120 | #整数の入力
N = int(input())
ans = 1
for i in range(N):
ans = ans * (i+1)
ans = ans/(10**9 + 7)
print(ans)
|
s392882820 | p03796 | u392361133 | 1591271010 | Python | Python (3.4.3) | py | Runtime Error | 230 | 3984 | 67 | import math
a = int(input())
print(math.factorial(a) /( 10**9 + 7)) |
s739004929 | p03796 | u420130252 | 1590972611 | Python | PyPy3 (2.4.0) | py | Runtime Error | 286 | 50288 | 118 | n=int(input())
def ans(n):
if n==1:
return 1
else:
return n*ans(n-1)
print(ans(n)%1000000007) |
s918950983 | p03796 | u974935538 | 1590238548 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 3464 | 85 | N = int(input())
div = 1e9+7
ans = 1
for i in range(1,N+1):
ans*=i
print(ans%div) |
s041646434 | p03796 | u247211039 | 1589678719 | Python | Python (3.4.3) | py | Runtime Error | 230 | 3984 | 65 | import math
N = int(input())
print((math.factorial(N))/(10^9+7))
|
s295575392 | p03796 | u460468647 | 1589473139 | Python | PyPy3 (7.3.0) | py | Runtime Error | 150 | 72816 | 73 | n = int(input())
import fractions
print(fractions.factorial(n)%(10**9+7)) |
s269051372 | p03796 | u887147934 | 1589356117 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 60 | N=int(input())
M=int(math.factorial(N))
L=10**9+7
print(M%L) |
s197272875 | p03796 | u821588465 | 1589167144 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 57 | import math
print(math.factorial(int(input))%(10**9 + 7)) |
s082486964 | p03796 | u821588465 | 1589167091 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 45 | import math
print(math.factorial(int(input))) |
s369951579 | p03796 | u967822229 | 1589151582 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 82 | N = input()
sum=1
for i in range(1, N+1):
sum=(sum*i)%1000000007
print(sum)
|
s853686474 | p03796 | u967822229 | 1589151560 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 79 | N = input()
sum=1
for i in range(1, N):
sum=(sum*i)%1000000007
print(sum) |
s567093737 | p03796 | u967822229 | 1589151032 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 79 | N = input()
sum=1
for i in range(1, N):
sum=(sum*i)%1000000007
print(sum) |
s467039500 | p03796 | u629350026 | 1589139690 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 98 | N=int(input())
import math
power=1
for i in range(0,n):
power=power*(i+1)
print(power%(10**9+7)) |
s895230641 | p03796 | u870518235 | 1588951075 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 104 | N = int(input())
fact = 1
for integer in range(1,N+1):
fact = fac * integer % 1000000007
print(fact) |
s049343233 | p03796 | u146346223 | 1588903073 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 97 | N = int(input())
num = 1
for i in range(1, N+1):
num *= i
num %= 1_000_000_007
print(num) |
s314774074 | p03796 | u017415492 | 1588821322 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 117 | #a,b=map(int,input().split())
n=int(input())
#s=input()
ans=1
for i in range(n):
ans*=(n%mod)
ans%=mod
print(ans) |
s388547776 | p03796 | u017415492 | 1588821309 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 117 | #a,b=map(int,input().split())
n=int(input())
#s=input()
ans=0
for i in range(n):
ans*=(n%mod)
ans%=mod
print(ans) |
s906207130 | p03796 | u007886915 | 1588782667 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 9971 | # -*- coding: utf-8 -*-
import sys
import fractions
import copy
import bisect
import math
import numpy as np
import itertools
from itertools import combinations_with_replacement
#import math#数学的計算はこれでいける。普通に0.5乗しても計算可能
#w=input()
from operator import itemgetter
from sys import stdin
#input = sys.stdin.readline#こっちの方が入... |
s636809422 | p03796 | u165268875 | 1588624639 | Python | Python (3.4.3) | py | Runtime Error | 230 | 3976 | 68 |
import math
N = int(input())
print((math.factorial(N))/(10**9 + 7)) |
s747983109 | p03796 | u165268875 | 1588624587 | Python | Python (3.4.3) | py | Runtime Error | 230 | 3984 | 68 | import math
N = int(input())
print((math.factorial(N)/(10**9 + 7)))
|
s747923585 | p03796 | u165268875 | 1588624481 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 67 | import math
N = int(input())
print((math.factorial(N)/(10**9 + 7))
|
s597945293 | p03796 | u870518235 | 1588551551 | Python | Python (3.4.3) | py | Runtime Error | 74 | 3892 | 162 | N = int(input())
def fract(n):
if n == 0:
return 1
elif n == 1:
return n
return n * fract(n-1)
res = fract(N) % 1000000007
print(res) |
s567096398 | p03796 | u870518235 | 1588522145 | Python | Python (3.4.3) | py | Runtime Error | 74 | 3896 | 127 | N = int(input())
def fract(n):
if n == 1:
return n
return n * fract(n-1)
res = fract(N) % 1000000007
print(res) |
s246837621 | p03796 | u870518235 | 1588487931 | Python | Python (3.4.3) | py | Runtime Error | 73 | 3896 | 127 | N = int(input())
def fract(n):
if n == 1:
return n
return n * fract(n-1)
res = fract(N) % 1000000007
print(res) |
s082751089 | p03796 | u870518235 | 1588487811 | Python | Python (3.4.3) | py | Runtime Error | 73 | 3892 | 128 | N = int(input())
def fract(n):
if n == 1:
return n
return n * fract(n-1)
res = fract(N) /(1000000007)
print(res) |
s363499121 | p03796 | u600261652 | 1588443274 | Python | Python (3.4.3) | py | Runtime Error | 441 | 4360 | 99 | import math
N = int(input())
print(math.factorial(N)-math.factorial(N)/(10**9+7)*math.factorial(N)) |
s808335816 | p03796 | u600261652 | 1588442861 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 62 | import math
N = int(input())
print(math.factrial(N)%(10**9+7)) |
s886286516 | p03796 | u184902932 | 1588387076 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 64 | import math
N = int(input())
print(math.factorial(N) % (10**9+7) |
s118350059 | p03796 | u184902932 | 1588387018 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 62 | import math
N = int(input())
print(math.factorial(N)%(10**9+7) |
s139012701 | p03796 | u358254559 | 1588085124 | Python | PyPy3 (2.4.0) | py | Runtime Error | 181 | 38512 | 374 | n= int(input())
def fact_m(n, modulus=10**9+7):
ans=1
if n <= modulus//2:
for i in range(1,n+1):
ans = (ans * i) % modulus
else:
for i in range(1,modulus-n):
ans = (ans * i) % modulus
ans = modinv(ans, modulus)
if n % 2 == 0:
ans = -1*a... |
s461850277 | p03796 | u910295650 | 1588003030 | Python | Python (3.4.3) | py | Runtime Error | 74 | 3892 | 121 | def func(X):
if X==1:
return 1
else:
return X*func(X-1)
N=int(input())
print(func(N)%((10**9)+7)) |
s145738200 | p03796 | u633450100 | 1587967867 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 91 | N = int(input())
ans = 1
for i in range(2,i+1):
ans = ans * i % (10 ** 9 + 7)
print(ans) |
s500507008 | p03796 | u633450100 | 1587967313 | Python | Python (3.4.3) | py | Runtime Error | 73 | 3896 | 139 | N = int(input())
def per(N):
if N == 0 or N == 1:
return 1
else:
return N * per(N-1)
print(per(N) % (10 ** 9 + 7)) |
s899045299 | p03796 | u633450100 | 1587967009 | Python | Python (3.4.3) | py | Runtime Error | 74 | 4008 | 81 | N = int(input())
def per(N):
return N * per(N-1)
print(per(N) / (10 ** 9 + 7)) |
s582823165 | p03796 | u614964888 | 1587885920 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 62 | import math
N=int(input())
print(math.factorical(N)%(10**+7)) |
s256946360 | p03796 | u614964888 | 1587885829 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 65 | import math
N=int(input())
print((math.factorical(N))%(10**9+7)) |
s275233295 | p03796 | u884323674 | 1587705285 | Python | Python (3.4.3) | py | Runtime Error | 75 | 3892 | 146 | N = int(input())
def power(n):
if n == 1:
p = 1
else:
p = power(n-1) * n
return p % (10**9 + 7)
print(power(N)) |
s493378890 | p03796 | u282676559 | 1587340720 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 101 | import math
n = int(input())
result = math.prod([i for i in range(1, n+1)])
print(result%(10**9+7))
|
s831769357 | p03796 | u077127204 | 1587240222 | Python | Python (3.4.3) | py | Runtime Error | 38 | 3572 | 107 | import functools
N = int(input())
print(functools.reduce(lambda x, y: x * y % 1000000007, range(2, N+1)))
|
s519014121 | p03796 | u423585790 | 1587139243 | Python | PyPy3 (2.4.0) | py | Runtime Error | 181 | 38256 | 82 | n = int(input())
ans = 1
for i in range(1,n+1):
ans *= i
ans %= mod
print(ans) |
s485030374 | p03796 | u616017354 | 1586723547 | Python | Python (3.4.3) | py | Runtime Error | 72 | 3896 | 122 | def nn(n):
if n==0:
return 1
else:
return n*nn(n-1)
n=int(input())
ans=nn(n)%100000007
print(ans) |
s745763819 | p03796 | u964007550 | 1586719156 | Python | Python (3.4.3) | py | Runtime Error | 229 | 3980 | 63 | n = int(input())
import math
print(math.factorial(n)/(10**9+7)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.