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
s600436926
p03962
u843522325
1476581106
Python
Python (3.4.3)
py
Runtime Error
22
3064
63
a = input().split() s = {} for i in a: s |= i print(len(s))
s794709086
p03962
u851897760
1476581045
Python
Python (3.4.3)
py
Runtime Error
22
3064
103
line = input.split() l = list(map(int, line)) a = l[0] b = l[1] c = l[2] print (a) print (b) print (c)
s891659719
p03962
u442810826
1476580737
Python
Python (3.4.3)
py
Runtime Error
23
3064
60
a,b,c = raw_input().split() A = {a:1,b:1,c:1} print len(A)
s741300673
p03962
u428937140
1476580724
Python
Python (2.7.6)
py
Runtime Error
16
2696
73
n, k = map(int, raw_input().split()) ans = k * ((k-1)**(n-1)) print(ans)
s836017971
p03962
u994720641
1476580086
Python
Python (2.7.6)
py
Runtime Error
16
2568
112
a = int(input()) b = int(input()) c = int(input()) map_ = {} map_[a] = 1 map_[b] = 1 map_[c] = 1 print len(map_)
s108107255
p03962
u422104747
1476580045
Python
Python (3.4.3)
py
Runtime Error
22
3064
211
#include <iostream> using namespace std; int main(void){ int a,b,c,s=0; int[101] arr={}; cin >> a >> b >> c; int[a]=1; int[b]=1; int[c]=1; for(int i=0;i<101;i++){ s+=arr[i]; } cout << s; return 0; }
s056844645
p03962
u994720641
1476579995
Python
Python (2.7.6)
py
Runtime Error
16
2568
114
a = int(input()) b = int(input()) c = int(input()) map_ = {} map_[a] = 1 map_[b] = 1 map_[c] = 1 print len(map_)
s549119842
p03962
u539953365
1476579969
Python
Python (3.4.3)
py
Runtime Error
22
3064
64
N, K = [int(i) for i in input().split()] print(K*((K-1)**(N-1)))
s114624251
p03962
u496694349
1476579713
Python
Python (3.4.3)
py
Runtime Error
27
3064
90
from sys import stdin a = map((int(x) for x in stdin.readline().split())) print(len(a))
s798226179
p03962
u340781749
1476579676
Python
Python (3.4.3)
py
Runtime Error
22
3064
30
print(len({input().split()}))
s679424556
p03963
u074161135
1601076427
Python
Python (3.8.2)
py
Runtime Error
33
9092
82
lst = list(map(int,input().strip())) N = lst[0] K = lst[1] print(K * (N-1)*(K-1))
s231219897
p03963
u074161135
1601076368
Python
Python (3.8.2)
py
Runtime Error
24
9084
83
lst = list(map(int,input().strip())) N = lst[0] K = lst[1] total = K * (N-1)*(K-1)
s883053657
p03963
u174040991
1601069827
Python
Python (3.8.2)
py
Runtime Error
30
9504
118
def fib(n): if n <= 1: return 1 return fib(n-1)*n n,k = map(int, input().split()) print(int(fib(k)/fib(k-n)))
s020616208
p03963
u174040991
1601069659
Python
Python (3.8.2)
py
Runtime Error
25
9516
128
def fib(n): if n == 1: return 1 else: return fib(n-1)*n n,k = map(int, input().split()) print(int(fib(k)/fib(k-n)))
s147126622
p03963
u036104576
1598761730
Python
Python (3.8.2)
py
Runtime Error
28
8896
63
N, K = map(int, input().split()) print(K * ((K - 1) ** (N - 1))
s366359602
p03963
u602500004
1598278006
Python
PyPy3 (7.3.0)
py
Runtime Error
88
74828
528
import math import numpy as np import sys import os from operator import mul sys.setrecursionlimit(10**7) def _S(): return sys.stdin.readline().rstrip() def I(): return int(_S()) def LS(): return list(_S().split()) def LI(): return list(map(int,LS())) if os.getenv("LOCAL"): inputFile = basename_without_ext = os.path.splitext(os.path.basename(__file__))[0]+'.txt' sys.stdin = open(inputFile, "r") INF = float("inf") IINF = 10 ** 18 MOD = 10 ** 9 + 7 # MOD = 998244353 N,K = LI() ans = K*(K-1)**(N-1) print(ans)
s451670787
p03963
u953379577
1597942882
Python
Python (3.8.2)
py
Runtime Error
26
9016
53
n,k = map(int,input().split()) print(k*((k-1)**(n-1))
s592229598
p03963
u107915058
1597853547
Python
Python (3.8.2)
py
Runtime Error
29
9012
98
ans = 1 for i in range(N): if i == 0: ans *= K else: ans *= K-1 print(ans)
s849293393
p03963
u451965785
1597693591
Python
Python (3.8.2)
py
Runtime Error
27
9148
73
L = list(map(int,input().split())) N = L[0] K = L[1] print(K(K-1)^(N-1))
s711185083
p03963
u895918162
1597073212
Python
Python (3.8.2)
py
Runtime Error
25
9020
417
sample = input() # two numbers in a string new_sample = sample.split(" ") ball = int(new_sample[0]) # number of balls color = int(new_sample[1]) # number of colors if color == 1 and ball > 1: print(0) else: product = color # for i in range(1, ball): for i in range(1, ball): product *= (color-1) print(product) # 3 balls, 10 colors # 1st spot, 10 choices # 2nd spot, 9 choices # 3rd spot, 9 choices
s922383309
p03963
u895918162
1597072889
Python
Python (3.8.2)
py
Runtime Error
19
8968
356
sample = input() # two numbers in a string new_sample = sample.split(" ") ball = new_sample[0] # number of balls color = new_sample[1] # number of colors product = color # for i in range(1, ball): for i in range(1, ball): product *= product-1 print(product) # 3 balls, 10 colors # 1st spot, 10 choices # 2nd spot, 9 choices # 3rd spot, 9 choices
s536688416
p03963
u895918162
1597072595
Python
Python (3.8.2)
py
Runtime Error
23
9040
305
sample = input() # two numbers in a string new_sample = sample.split(" ") ball = new_sample[0] # number of balls color = new_sample[1] # number of colors product = color for i in range(1, ball+1): product *= color-1 print(product) # 2 balls, 10 colors # 1st spot, 10 choices # 2nd spot, 9 choices
s516351784
p03963
u895918162
1597072376
Python
Python (3.8.2)
py
Runtime Error
26
9036
200
sample = input() # two numbers in a string new_sample = sample.split(" ") ball = new_sample[0] color = new_sample[1] product = color for i in range(1, ball): product *= color-1 print(product)
s186113090
p03963
u250662864
1597065707
Python
Python (3.8.2)
py
Runtime Error
22
8940
205
i = input() j = i.split() num_balls = j[0] num_colors = j[1] product = num_colors if(num_balls > 1 and num_colors == 1): print(0) for i in range(1, num_balls): product *= (num_balls - 1) print(product)
s531125481
p03963
u980503157
1596416431
Python
Python (3.8.2)
py
Runtime Error
24
9020
97
n = int(input()) k = int(input()) ans=1 for i in range(k): ans = ans*n n -= 1 print(ans)
s465636592
p03963
u556594202
1596324057
Python
Python (3.8.2)
py
Runtime Error
23
9160
131
N = int(input()) %10 hon=[2,4,5,7,9] bon=[3] if N in hon: print("hon") elif N in bon: print("bon") else: print("pon")
s423478695
p03963
u081149041
1594943248
Python
Python (3.8.2)
py
Runtime Error
24
9104
144
def I_dont_know_what_to_do(): n = int(input()) k = int(input()) s = k * ((k - 1) ** (n - 1)) print(s) I_dont_know_what_to_do()
s331522849
p03963
u081149041
1594943202
Python
Python (3.8.2)
py
Runtime Error
21
9064
131
def I_dont_know_what_to_do(): n = int(input()) k = int(input()) s = k * ((k - 1) ** (n - 1)) I_dont_know_what_to_do()
s341105974
p03963
u158677249
1594413162
Python
Python (3.8.2)
py
Runtime Error
21
9028
51
N=int(input()) K=int(input()) print(K*(K-1)**(N-1))
s995923769
p03963
u697615293
1593559242
Python
Python (3.8.2)
py
Runtime Error
24
9008
115
a = list(map(int,input().strip()) b = a[0] #色の数 c = a[1] #ボールの数 ans = (b*(b-1)**(c-1)) print(ans)
s883318005
p03963
u274635633
1591088179
Python
Python (3.4.3)
py
Runtime Error
17
2940
50
n,k=map(int,input().spkit()) print(k*(k-1)**(n-1))
s308941457
p03963
u900848560
1590690820
Python
PyPy3 (2.4.0)
py
Runtime Error
174
38256
118
a=input().split(" ") part=0 for i in range(a[0]): if i==0: part=a[1] else: part=part*(a[1]-1) print(part)
s250800850
p03963
u193565131
1588465972
Python
Python (3.4.3)
py
Runtime Error
17
2940
39
list=[x for x in input()] print(max(x))
s143382112
p03963
u459965464
1587948710
Python
Python (3.4.3)
py
Runtime Error
17
2940
60
a = input().split() n = int[0] k = int[1] print(2**(n-1)*k)
s142447661
p03963
u353797797
1586221418
Python
Python (3.4.3)
py
Runtime Error
22
3316
734
from itertools import permutations import sys sys.setrecursionlimit(10 ** 6) from bisect import * from collections import * from heapq import * from math import gcd def II(): return int(sys.stdin.readline()) def MI(): return map(int, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def SI(): return sys.stdin.readline()[:-1] def LLI(rows_number): return [LI() for _ in range(rows_number)] int1 = lambda x: int(x) - 1 def MI1(): return map(int1, sys.stdin.readline().split()) def LI1(): return list(map(int1, sys.stdin.readline().split())) p2D = lambda x: print(*x, sep="\n") dij = [(1, 0), (0, 1), (-1, 0), (0, -1)] def main(): n,k=MI() ans=k*pow(k-1,n-1) print(ans) main()
s904153027
p03963
u835924161
1585654311
Python
Python (3.4.3)
py
Runtime Error
17
2940
50
n,m=map(int,input().split()) print(n*pow(n-1,k-1))
s918227226
p03963
u956012380
1584919654
Python
PyPy3 (2.4.0)
py
Runtime Error
173
38256
272
import math n,k=map(int,input().split()) if n % k == 0: x= n//k print(x*math.factorial(k)) """else: r= n % k div=n-r y=div//k sum= y*(math.factorial(k)) z=nCr(k,r) sum+=z print(sum) """ def nCr(n,r): f = math.factorial return f(n) / f(r) / f(n-r)
s297129894
p03963
u956012380
1584919493
Python
PyPy3 (2.4.0)
py
Runtime Error
173
38256
258
import math n,k=map(int,input().split()) if n % k == 0: x= n//k print(x*math.factorial(k)) else: r= n % k div=n-r y=div//k sum= y*(math.factorial(k)) z=nCr(k,r) sum+=z print(sum) def nCr(n,r): f = math.factorial return f(n) / f(r) / f(n-r)
s780188450
p03963
u198073053
1584913871
Python
Python (3.4.3)
py
Runtime Error
18
2940
90
import math N,K=map(int,input().split()) print(int(math.factorial(N)/math.factorial(N-K)))
s205998776
p03963
u655761160
1584910380
Python
Python (3.4.3)
py
Runtime Error
17
2940
50
N, K input().split() print(K * (K - 1) ** (N - 1))
s190456835
p03963
u414050834
1584306380
Python
Python (3.4.3)
py
Runtime Error
18
2940
53
n,k=(map(int,input().split()) print(k*((k-1)**(n-1)))
s154971563
p03963
u434311880
1584301703
Python
Python (3.4.3)
py
Runtime Error
18
3188
55
N, K = map(int,input()) cnt = K*(K-1)**(N-1) print(cnt)
s425704672
p03963
u075595666
1583891317
Python
Python (3.4.3)
py
Runtime Error
17
2940
55
N,K = int(input().split()) print(int(K*((K-1)**(N-1))))
s361988558
p03963
u453683890
1583437050
Python
Python (3.4.3)
py
Runtime Error
18
2940
81
ilne = input().split(' ') print(int(line[0])*((int(line[0])-1)**(int(line[1])-1))
s524478135
p03963
u757030836
1583263206
Python
Python (3.4.3)
py
Runtime Error
17
2940
55
n,k = map(int,input().split()) print(k*((k-1)**(n-1))
s803629010
p03963
u757030836
1583263096
Python
Python (3.4.3)
py
Runtime Error
17
2940
53
n,k = map(int,input().split()) print(k*((k-1)*(n-1))
s303990776
p03963
u353919145
1582352958
Python
Python (3.4.3)
py
Runtime Error
17
2940
178
#include<bits/stdc++.h> using namespace std; int main() { long long int n,k; cin>>n>>k; long long int ans = (long long int) (k*pow(k-1,n-1)); cout<<ans; return 0; }
s029012688
p03963
u513434790
1580961924
Python
Python (3.4.3)
py
Runtime Error
17
2940
59
N, M = map(int,input().split()) ans = K * ((K-1) ** (N-1))
s282321157
p03963
u113971909
1580297025
Python
Python (3.4.3)
py
Runtime Error
72
3888
115
n,k=map(int,input().split()) def pt(n,k): if n==1: return k else: return pt(n-1,k)*(k-1) print(pt(n,k))
s811100251
p03963
u936205094
1579237103
Python
Python (3.4.3)
py
Runtime Error
18
3064
88
n = int(input()) k = int(input()) val = k; for i in range(n-1): val *= k -1 print(val)
s987418214
p03963
u417014669
1576695198
Python
Python (3.4.3)
py
Runtime Error
17
2940
53
a,b=map(int,input().spllt()) n=b+(a-1)*(b-1) print(n)
s967246117
p03963
u202688141
1576543674
Python
Python (3.4.3)
py
Runtime Error
17
2940
55
N,K = map(int, input().split()) print(K * (k-1)**(N-1))
s031368661
p03963
u528720841
1576459474
Python
Python (3.4.3)
py
Runtime Error
17
2940
89
N, K = map(int, input().split()) ans = K for i in range(N-1): K *= (k-1) print(ans)
s493037441
p03963
u328090531
1575837966
Python
Python (3.4.3)
py
Runtime Error
17
3060
221
n, k = (int(x) for x in input().split()) count = 0 s = [[0 for i in range(n)] for j in range(k)] for i in range(n): for j in range(k): if i == 0 or s[i][j] != s[i - 1][j]: count += 1 print(count)
s496485297
p03963
u301331835
1575829671
Python
Python (3.4.3)
py
Runtime Error
18
2940
83
a, b , x = map(int,input().split()) cnt = 0 a = (a - 1 ) // x b //= x print(b - a)
s168688592
p03963
u007263493
1574132706
Python
Python (3.4.3)
py
Runtime Error
17
2940
80
N, K = [int(input()) for _ in range(2)] A =int((K - 1) ** N) print(int(A * K))
s528417151
p03963
u813174766
1573192058
Python
Python (3.4.3)
py
Runtime Error
17
2940
52
a=map(int(input())) print(((a[1]-1)**(a[0]-1))*a[1])
s732455024
p03963
u190086340
1572990028
Python
Python (3.4.3)
py
Runtime Error
538
4336
502
def solve(): N, K = list(map(int, input().split())) TABLE = [[-1 for x in range(K + 3)] for y in range(N + 3)] def recur(i, k): if not i < N: return 1 if not TABLE[i][k] == -1: return TABLE[i][k] ans = 0 for a in range(K): if not a == k: ans += recur(i + 1, a) TABLE[i][k] = ans return TABLE[i][k] return recur(0, -1) if __name__ == '__main__': res = solve() print(res)
s790609631
p03963
u190086340
1572989846
Python
Python (3.4.3)
py
Runtime Error
533
4340
502
def solve(): N, K = list(map(int, input().split())) TABLE = [[-1 for x in range(K + 3)] for y in range(N + 3)] def recur(i, k): if not TABLE[i][k] == -1: return TABLE[i][k] if not i < N: return 1 ans = 0 for a in range(K): if not a == k: ans += recur(i + 1, a) TABLE[i][k] = ans return TABLE[i][k] return recur(0, -1) if __name__ == '__main__': res = solve() print(res)
s561642328
p03963
u190086340
1572989545
Python
Python (3.4.3)
py
Runtime Error
541
4312
502
def solve(): N, K = list(map(int, input().split())) TABLE = [[-1 for x in range(K + 1)] for y in range(N + 1)] def recur(i, k): if not TABLE[i][k] == -1: return TABLE[i][k] if not i < N: return 1 ans = 0 for a in range(K): if not a == k: ans += recur(i + 1, a) TABLE[i][k] = ans return TABLE[i][k] return recur(0, -1) if __name__ == '__main__': res = solve() print(res)
s156916656
p03963
u923659712
1572690480
Python
Python (3.4.3)
py
Runtime Error
21
3316
48
n,k=map(int,input()) s=k*(k-1)**(n-1) print(s)
s583206658
p03963
u982517812
1572379538
Python
Python (3.4.3)
py
Runtime Error
17
2940
65
a = int(input()) b = int(input()) c = b * (b-1) ** (a-1) print(c)
s155138910
p03963
u593590006
1571424409
Python
Python (3.4.3)
py
Runtime Error
17
2940
87
n,k=map(int,input().split()) t=n//2+n%2 h=n//2 ans=pow(k,tot) *pow(k-1,h) print(ans)
s215138257
p03963
u873059840
1570206241
Python
Python (3.4.3)
py
Runtime Error
17
2940
101
N = int(input()) K = int(input()) if(N==1): print(K) else: answer = K*(N-1)*(K-1) print(answer)
s404432908
p03963
u381246791
1570041656
Python
Python (3.4.3)
py
Runtime Error
17
2940
98
N,K=map(int,input()split()) answer=K if N>1: for _ range(N-1): answer*=(K-1) print(answer)
s501917690
p03963
u871596687
1568754282
Python
Python (3.4.3)
py
Runtime Error
17
2940
56
n = int(input()) k = int(input()) print(k*(k-1)**(n-1))
s082717617
p03963
u296518383
1568402503
Python
Python (3.4.3)
py
Runtime Error
17
2940
51
n,k=map(int,input().split()) print(k*((k-1)**(n-1))
s477089413
p03963
u119982001
1567223623
Python
Python (3.4.3)
py
Runtime Error
17
3060
401
import sys from sys import stdin N, k = [int(x) for x in stdin.readline().rstrip().split()] if K < 2: raise Exception('Error!') sum = K for i in range(N-1): sum = sum*(K-1) if __name__ == '__main__': print(sum) """ def myfunc(n, k): if n <= 0: return k n = int(n-1) k = k*(k-1) return myfunc( n,k ) if __name__ == '__main__': print(int(myfunc(N, K))) """
s605785679
p03963
u119982001
1567223506
Python
Python (3.4.3)
py
Runtime Error
18
3060
401
import sys from sys import stdin N, k = [int(x) for x in stdin.readline().rstrip().split()] if K < 2: raise Exception('Error!') sum = K for i in range(N-1): sum = sum*(K-1) if __name__ == '__main__': print(sum) """ def myfunc(n, k): if n <= 0: return k n = int(n-1) k = k*(k-1) return myfunc( n,k ) if __name__ == '__main__': print(int(myfunc(N, K))) """
s375326621
p03963
u093500767
1564734959
Python
Python (3.4.3)
py
Runtime Error
17
2940
37
n, k = input() print(k*(k-1)**(n-1))
s534659057
p03963
u374802266
1564166278
Python
Python (3.4.3)
py
Runtime Error
17
2940
61
a=list(map(int,input().split())) print(a[1]+(a[0]-1)*(a[1]-1)
s058595892
p03963
u296150111
1561511780
Python
Python (3.4.3)
py
Runtime Error
17
2940
63
n,k-map(int,input().split()) ans=k for i in range(n): ans*=k-1
s956667307
p03963
u062459048
1560655384
Python
Python (3.4.3)
py
Runtime Error
17
2940
63
N, K = map(int, imput().split()) p = K*((K-1)**(N-1)) print(p)
s237445690
p03963
u062459048
1560655250
Python
Python (3.4.3)
py
Runtime Error
17
2940
59
N, K = map(int, imput().split()) p = K*(K-1)^(N-1) print(p)
s654526691
p03963
u825842302
1560384288
Python
Python (3.4.3)
py
Runtime Error
17
2940
138
n,k = map(int, input()) ans = 0 for i in range(n): if i == 0: ans = k else: ans = ans * (k-1) print(ans)
s131031837
p03963
u114648678
1560258674
Python
Python (3.4.3)
py
Runtime Error
17
2940
187
#include <bits/stdc++.h> #include <math.h> using namespace std; int main() { int n,k; cin>>n>>k; if (n==1){ cout<<k<<endl; } else { cout<<k*pow(k-1,n-1)<<endl; } }
s327664921
p03963
u178192749
1560009458
Python
Python (3.4.3)
py
Runtime Error
17
2940
43
n,k = input().split() print(k*(k-1)**(n-1))
s813303219
p03963
u672494157
1559878206
Python
Python (3.4.3)
py
Runtime Error
17
3060
323
import math def inputs(num_of_input): ins = [input() for i in range(num_of_input)] return ins def solve(inputs): N = int(inputs[0]) power = 1 for i in range(1, N + 1): power = (i * power) % (10 ** 9 + 7) return power if __name__ == "__main__": ret = solve(inputs(1)) print(ret)
s678956088
p03963
u498620941
1559759183
Python
Python (3.4.3)
py
Runtime Error
76
4128
335
n,k = map(int,input().split()) def ans(cnt,a,b,c=0): if cnt == a : return c else : if cnt == 0: c += b cnt += 1 return ans(cnt,a,b,c) else: cnt += 1 c = c*(b-1) return ans(cnt,a,b,c) a = ans(cnt = 0,a = n,b = k,c=0) print(a)
s372275588
p03963
u498620941
1559758978
Python
Python (3.4.3)
py
Runtime Error
74
4120
333
n,k = map(int,input().split()) def ans(cnt,a,b,c=0): if cnt == a : return c else : if cnt == 0: c += b cnt += 1 return ans(cnt,a,b,c) else: cnt += 1 c = c*(b-1) return ans(cnt,a,b,c) a = ans(cnt = 0,a = n,b = k,c=0) print(a)
s127531131
p03963
u864453204
1559673624
Python
Python (3.4.3)
py
Runtime Error
17
2940
65
n, k = map(int, input().split()) print(k * ((nk - 1) ** (n - 1)))
s091780197
p03963
u911575040
1559246758
Python
Python (3.4.3)
py
Runtime Error
17
2940
49
N,K=map(int,input().split()) print(K*(K-1)**(N-1)
s710724815
p03963
u149752754
1555700272
Python
Python (3.4.3)
py
Runtime Error
17
2940
66
N, K = map(int, input().split()) ans = ((K-1)**(M-1))*K print(ans)
s409786583
p03963
u405947212
1554243962
Python
Python (3.4.3)
py
Runtime Error
20
3060
159
import math def permutations_count(n, r): return math.factorial(n) // math.factorial(n - r) a,b = map(int,input().split()) print(permutations_count(a,b))
s893341401
p03963
u393581926
1554006899
Python
Python (3.4.3)
py
Runtime Error
18
3068
1
j
s605607397
p03963
u962819039
1551643541
Python
Python (3.4.3)
py
Runtime Error
18
2940
56
n, k = map(int, input()) print(k * ((k - 1) ** (n - 1)))
s450154393
p03963
u952130512
1550663295
Python
Python (3.4.3)
py
Runtime Error
18
2940
59
n,k=input().split() N=int(n) K=int(k) print(k*(k-1)**(n-1))
s086883205
p03963
u593063683
1546805582
Python
Python (3.4.3)
py
Runtime Error
72
3876
148
#B N, K = [int(x) for x in input().split()] #print(N, K)# def count(n): if n<=0: return 1 else: return (K-1)*count(n-1) print(K*count(N-1))
s991801195
p03963
u593063683
1546805331
Python
Python (3.4.3)
py
Runtime Error
74
3884
148
#B N, K = [int(x) for x in input().split()] #print(N, K)# def count(n): if n<=0: return 1 else: return (K-1)*count(n-1) print(K*count(N-1))
s846472141
p03963
u350997995
1546234788
Python
Python (3.4.3)
py
Runtime Error
18
2940
54
N,K = map(int,input().split()) print(K*((M-1)**(K-1)))
s093608041
p03963
u669770658
1542044622
Python
Python (3.4.3)
py
Runtime Error
18
2940
137
def abc046_b(): n, k = map(int, input().split()) return k * ((k - 1) ** (n - 1)) if __name__ == '__main__': print(abc046_b())
s983228649
p03963
u637824361
1541188695
Python
Python (3.4.3)
py
Runtime Error
17
2940
57
N, K = map(int, input().split()) print(K * ((K-1)**(N-1))
s967909088
p03963
u920299620
1540952916
Python
Python (3.4.3)
py
Runtime Error
17
2940
52
N,K=map(int,input().split()) print(K*((K-1)^^(N-1)))
s990923815
p03963
u447528293
1540912147
Python
Python (3.4.3)
py
Runtime Error
17
2940
73
N, K = list(map(int, input().rstrip())) ans = K * (K-1)**(N-1) print(ans)
s172108078
p03963
u657913472
1537921929
Python
Python (3.4.3)
py
Runtime Error
17
2940
54
<?php fscanf(STDIN,"%d%d",$n,$k);echo $k*($k-1)**~-$n;
s295305398
p03963
u665190342
1533574638
Python
Python (3.4.3)
py
Runtime Error
17
2940
109
N = int(input()) K = int(input()) result = K for i in range(N-1) : result = result * (K -1) print(result)
s760923516
p03963
u314057689
1528661734
Python
PyPy3 (2.4.0)
py
Runtime Error
171
38640
10
aaaaaaaaaa
s374003621
p03963
u219369949
1523248780
Python
Python (3.4.3)
py
Runtime Error
73
3884
145
n, k = map(int, input().split()) def powk(n): if n == 1: return 1 else: return (k - 1) * powk(n - 1) print(k * powk(n))
s679104699
p03963
u873538240
1521478689
Python
Python (3.4.3)
py
Runtime Error
17
3064
91
N, K = tuple(map(int ,input().split(' '))) print( K * int(power(float(K), float(N - 1))) )
s515344808
p03963
u391475811
1518842986
Python
Python (3.4.3)
py
Runtime Error
17
2940
75
N,K=int(input().split()) ans=K for i in range(N-1): ans*=(K-1) print(ans)