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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s886379635 | p03959 | u436484848 | 1477277683 | Python | Python (3.4.3) | py | Runtime Error | 94 | 19136 | 518 | def read():
return [int(i) for i in input().split(" ")]
N = int(input())
T = read()
A = read()
tempT, tempA = 0, 0
for i in range(N):
if(T[i] > tempT):
tempT = L[i] = T[i]
L.append(tempT)
unknowL.append(0)
else:
unknowL.append(T[i])
L.append(0)
for i in range(N):
val = A.pop()
if(A[i] > tempA):
if(L[i]... |
s632844576 | p03959 | u436484848 | 1477277569 | Python | Python (3.4.3) | py | Runtime Error | 94 | 19776 | 514 | def read():
return [int(i) for i in input().split(" ")]
N = int(input())
T = read()
A = read()
tempT, tempA = 0, 0
for i in range(N):
if(T[i] > tempT):
tempT = L[i] = T[i]
L.append(tempT)
unknowL.append(0)
else:
unknowL.append(T[i])
L.append(0)
for i in range(N-1, -1, -1):
if(A[i] > tempA):
if(L[i] != 0... |
s802630650 | p03959 | u335830383 | 1477277481 | Python | Python (2.7.6) | py | Runtime Error | 976 | 22928 | 882 | # -*- coding: utf-8 -*-
from sys import stdin
import numpy as np
n = stdin.readline()
n = n.strip().split(" ")
N = int(n[0])
n = stdin.readline()
n = n.strip().split(" ")
T = []
for t in n:
T.append(int(t))
T = np.array(T)
n = stdin.readline()
n = n.strip().split(" ")
A = []
for a in n:
A.append(int(a))
A = np.array... |
s136808478 | p03959 | u647537044 | 1477277099 | Python | Python (3.4.3) | py | Runtime Error | 123 | 18496 | 439 | N = int(input())
T = list(map(int, input().split()))
A = list(map(int, input().split()))
Z = []
for i in range(N):
Z.append(min(T[i],A[i]))
sum = 1
offset = []
if max(Z) < max(T(-1),A(0)):
print(0)
else:
for i in range(1,N-1):
if not (Z[i] > Z[i-1] or Z[i] > Z[i+1]):
... |
s867634992 | p03959 | u947823593 | 1477276717 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2696 | 1010 | import math as mt
import operator as op
def ncr(n, r):
r = min(r, n-r)
if r == 0: return 1
numer = reduce(op.mul, xrange(n, n-r, -1))
denom = reduce(op.mul, xrange(1, r+1))
return numer//denom
N = input()
T = map(lambda x:int(x), raw_input().split())
A = map(lambda x:int(x), raw_input().split())
... |
s529634067 | p03959 | u107077660 | 1477276382 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3064 | 780 | N = int(input())
T = list(map(int, input().split()))
A = list(map(int, input().split()))
h = [0 for i in range(N)]
if T[-1] != A[0]:
print(0)
exit()
else:
h[0] = T[0]
h[-1] = A[-1]
for i in range(1,N):
if T[i] > T[i-1]:
if T[i] < h[i]:
print(0)
exit()
else:
h[i] = T[i]
else:
if h[i] < 0:
... |
s165033097 | p03959 | u098968285 | 1477276253 | Python | PyPy3 (2.4.0) | py | Runtime Error | 271 | 38640 | 654 | # def makelist(n, m):
# return [[0 for i in range(m)] for j in range(n)]
# n = int(input())
# a, b = map(int, input().split())
# s = input()
K, T = map(int, input().split())
hoge = list(map(int, input().split()))
a = [0]*T
for i in range(T):
a[i] = (hoge[i], i)
if T == 1:
print(K-1)
else:
a.sort()
a[-1] = (a[... |
s180001285 | p03959 | u272028993 | 1477275845 | Python | Python (2.7.6) | py | Runtime Error | 163 | 14500 | 731 | mod=10**9+7
n=int(raw_input())
t=map(int,raw_input().split())
a=map(int,raw_input().split())
if t[n-1]!=a[0]:
print(0)
exit()
ans=1
for i in xrange(n):
if i==0 or i==n-1 or t[i]>t[i-1]:
if a[i]<t[i] and a[i]==a[i+1]:
print(0)
exit()
elif a[i]!=t[i] and a[i]!=a[i+1]:... |
s165223690 | p03959 | u343675824 | 1477274512 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3064 | 601 | N = int(input())
T = list(map(int,input().split()))
A = list(map(int,input().split()))
B = [0] * N
h = 0
for i in range(N):
if h < T[i]:
B[i] = T[i] h = T[i]
h = 0
check = True
for i in range(N):
if h < A[N-i-1]:
if B[N-i-1] != 0 and B[N-i-1] != A[N-i-1]:
check = False
else... |
s789272783 | p03959 | u729300713 | 1477274342 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2568 | 741 | import sys
n = input()
t = map(int, raw_input().split())
a = map(int, raw_input().split())
ans = 0
if max(t) != max(a):
print ans
sys.exit()
supermax = max(t)
flagt = 0
flaga = 0
for i in range(n):
if flagt = 0 and t[i] == supermax:
flagt = i
if flaga = 0 and a[n-1-i] == supermax:
flaga ... |
s038375930 | p03959 | u422104747 | 1477273805 | Python | Python (3.4.3) | py | Runtime Error | 22 | 2940 | 351 | n=int(input())
l= list(map(int, input().split()))
r= list(map(int, input().split()))
l=[0]+l
r.append(0)
res=1
for i in range(n):
if( (l[i]<l[i+1]) or (r[i]>r[i+1]) ):
if( ( (l[i]<l[i+1]) and (r[i]>r[i+1]) ) and (l[i+1]!=r[i]) ):
res*=0
else:
res*=min(l[i],... |
s534849683 | p03959 | u783676040 | 1477273188 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2568 | 816 | N=int(raw_input())
T=map(int,raw_input().split())
A=map(int,raw_input().split())
I,J=N-1,0
ans=1
for i in range(N):
H=min(T[i],A[i])
if i>0 and T[i-1]<T[i]:
H=1
if i+1 <N and A[i+1]<A[i]:
if T[i]!=A[i]:
ans=0
break
if i==N-1 and T[i]!=A[i]:
... |
s250515393 | p03959 | u422104747 | 1477272636 | Python | Python (3.4.3) | py | Runtime Error | 88 | 18752 | 334 | n=int(input())
l= list(map(int, input().split()))
r= list(map(int, input().split()))
l=[0]+l
r.append(0)
res=1
max=1
if(max(l)!=max(r)):
res=0
for i in range(n):
if( (l[i]<l[i+1]) or (r[i]>r[i+1]) ):
if( ( (l[i]<l[i+1]) and (r[i]>r[i+1]) ) and (l[i+1]!=r[i]) ):
res*=0
else:
res*=min(l[i],r[i])
res%=1000000... |
s744040548 | p03959 | u637175065 | 1477272495 | Python | Python (3.4.3) | py | Runtime Error | 709 | 21620 | 816 | import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time
sys.setrecursionlimit(10**7)
inf = 10**10
mod = 10**9 + 7
def f():
n = int(input())
t = list(map(int, input().split()))
a = list(map(int, input().split()))
r = 0
if a[-1] > t[-1] or a[0] < t[0]:
retu... |
s132811079 | p03960 | u532966492 | 1590247767 | Python | PyPy3 (2.4.0) | py | Runtime Error | 1774 | 128092 | 773 | def main():
h, w = map(int, input().split())
grid = [list(input()) for _ in [0]*h]
grid = [[grid[j][i] for j in range(h)] for i in range(w)]
ans = 0
for i in range(w-1):
same = [[0]*(h+1) for _ in [0]*(w+1)]
for j in range(h-1, -1, -1):
for k in range(h-1, -1, -1):
... |
s553371148 | p03960 | u102461423 | 1568510883 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 850 | import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
import numpy as np
"""
それぞれの隣接2列ごとに、可能な摩擦の最小値を実現する → 小問題に分割。
"""
buffer = sys.stdin.buffer
H,W = map(int,buffer.readline().split())
C = np.frombuffer(buffer.read(),dtype='S1').reshape(H,-1)[:,:W].T
dp_1 = np.zeros((W-1,H+H+1,H+1),dtype=np.int64)
f... |
s553160038 | p03960 | u777923818 | 1560476861 | Python | Python (3.4.3) | py | Runtime Error | 2109 | 16276 | 881 | import numpy as np
def inpl(): return list(map(int, input().split()))
def min(a, b): return a if a < b else b
H, W = inpl()
C = np.zeros((H, W), dtype=np.uint8)
for h in range(H):
S = input()
for w in range(W):
C[w, h] = ord(S[w]) - 97
def calc_cost(L, R):
def count(l, r):
a = max(l-r, 0)... |
s782251815 | p03960 | u024612773 | 1491676496 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2110 | 107608 | 768 | h,w=map(int,input().split())
if w > 3: exit(1)
b=[[] for i in range(w+2)]
b[0] = [' ']*h
b[w+1] = [' ']*h
for y in range(h):
r = list(input())
for x in range(1, w+1):
b[x].insert(0, r[x-1])
mem = {}
def rec(ls):
if sum(ls[1:-1]) == 0: return 0
if ''.join(map(chr,ls)) in mem: return mem[''.join... |
s657995981 | p03960 | u257374434 | 1477281601 | Python | PyPy3 (2.4.0) | py | Runtime Error | 224 | 43120 | 1111 | H, W = list(map(int, input().split()))
X = [input() for _ in range(H)]
Y = list(map(list, zip(*X)))
def get(A, B):
cost = [[0 for _ in range(H + 2)] for _ in range(H + 2)]
def calc(A, B, a_n, b_n):
if a_n >= H or b_n >= H:
return 0
if (a_n, b_n) in cost:
return cost[(... |
s857562682 | p03960 | u821849577 | 1477281487 | Python | PyPy2 (5.6.0) | py | Runtime Error | 44 | 9200 | 2018 | class Bit:
def __init__(self, n):
sz = 1
while n >= sz:
sz *= 2
self.size = sz
self.data = [0]*sz
def sum(self, i):
assert i > 0
s = 0
while i > 0:
s += self.data[i]
i -= i & -i
return s
def add(self, i, x)... |
s006374535 | p03960 | u386131832 | 1477278011 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3064 | 361 | import sys
n=int(input())
t=[int(i) for i in input().split()]
a=[int(i) for i in input().split()]
a_max=max(a)
t_max=max(t)
if a_max != t_max(t):
print(0)
sys.exit()
i=0
sum=1
while t[i]!=t_max:
if t[i]==t[i+1]:
sum*=t[i]
j=len(a)-1
while a[j]!=a_max:
if a[j]==a[j-1]:
sum*=a[j]
sum=sum*(... |
s767549970 | p03960 | u986399983 | 1477277990 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2696 | 286 | h, w = map(int, raw_input().split())
a = []
for i in range(h):
a[i] = raw_input().split()
ans = 0
for i in range(h):
count = 0
for j in range(h-i):
if a[j][1] == a[j+i][0]:
count += 1
if a[j][1] == a[j+i][2]:
count += 1
print ans |
s201785331 | p03961 | u535803878 | 1596088082 | Python | PyPy3 (7.3.0) | py | Runtime Error | 498 | 222740 | 1591 | import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")
M = 10**9+7
n = int(input())
p = list(map(int, input().split()))
g1 = [None]*(n+10)
v = 1
g1[0] = 1
for i in range(1,len(g1)):
v *= i
v %= M
g1[i] = v
def init(... |
s939673938 | p03961 | u535803878 | 1596087386 | Python | PyPy3 (7.3.0) | py | Runtime Error | 464 | 222440 | 1549 | import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")
M = 10**9+7
n = int(input())
p = list(map(int, input().split()))
g1 = [None]*(n+10)
v = 1
g1[0] = 1
for i in range(1,len(g1)):
v *= i
v %= M
g1[i] = v
def init(... |
s861672639 | p03961 | u535803878 | 1596087324 | Python | PyPy3 (7.3.0) | py | Runtime Error | 175 | 133804 | 1537 | import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")
n = int(input())
p = list(map(int, input().split()))
g1 = [None]*(n+10)
v = 1
g1[0] = 1
for i in range(1,len(g1)):
v *= i
v %= M
g1[i] = v
def init(bit, values)... |
s300318023 | p03962 | u401183062 | 1601228815 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8940 | 236 | def iroha():
a, b, c = map(int, input().split())
if a == b and b == c and a == c:
print(1)
elif a != b and b != c and a != c:
print(3)
elif else:
print(2)
if __name__ == "__main__":
iroha()
|
s790665650 | p03962 | u401183062 | 1601228357 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8908 | 140 | a, b, c = map(int, input().split())
if a == b == c:
print(1)
elif a != b != c:
print(3)
else:
print(2)
|
s924618339 | p03962 | u174040991 | 1601070561 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9092 | 79 | n,k = map(int, input().split())
p=k
for i in range(n-1):
p *= k-1
print(p)
|
s589811887 | p03962 | u231198419 | 1599336400 | Python | Python (3.8.2) | py | Runtime Error | 21 | 8936 | 39 | a=set(int,input().split())
print(len(a) |
s789495834 | p03962 | u306412379 | 1598995605 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9096 | 63 | N, K = map(int, input().split())
print(K * ((K - 1) **(N - 1))) |
s532790974 | p03962 | u808569469 | 1598664125 | Python | Python (3.8.2) | py | Runtime Error | 19 | 8900 | 67 | a, b, c = map(int, input().split())
m = set([a, b, c])
print(len(m) |
s931099328 | p03962 | u808569469 | 1598664097 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8892 | 70 | a, b, c = map(int, input().split())
m = set([a, b, c]))
print(len(m) |
s722146602 | p03962 | u834301346 | 1598023259 | Python | Python (3.8.2) | py | Runtime Error | 18 | 9028 | 66 | a, b = list(map(int, input().split(' ')))
print(b*pow(b-1, a-1))
|
s289576398 | p03962 | u426649993 | 1597856506 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8868 | 6 | 3 3 33 |
s168166561 | p03962 | u774163366 | 1597756657 | Python | PyPy3 (7.3.0) | py | Runtime Error | 112 | 74708 | 229 | data = [int(i) for i in input().split()]
count = 0
for i in range(len(data)):
for j in range(i+1, len(data)):
if (data[i] == data[j]):
count += 1
del data[j]
else:
continue
del data[i]
print(count) |
s673965203 | p03962 | u612635771 | 1597530736 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9024 | 43 | s = list(input().split())
print(len(set(s)) |
s406656040 | p03962 | u612635771 | 1597530683 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8744 | 35 | s = list(input())
print(len(set(s)) |
s628852019 | p03962 | u612635771 | 1597530658 | Python | Python (3.8.2) | py | Runtime Error | 20 | 8880 | 43 | s = list(input().split())
print(len(set(s)) |
s726681050 | p03962 | u468972478 | 1597511150 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8916 | 49 | l = set(list(map, input().split()))
print(len(l)) |
s295728021 | p03962 | u895918162 | 1597070817 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8960 | 245 | sample = input()
sample_list = sample.split(" ")
count = 0
flag = 0
for i in range(len(sample_list)):
for j in range(1, i):
if sample_list[i] == sample_list[j]:
flag = 1
if flag == 0:
count += 1
flag = 0
return count
|
s165045535 | p03962 | u895918162 | 1597070754 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9040 | 226 | sample = input()
sample_list = sample.split(" ")
count = 0
flag = 0
for i in range(len(sample_list)):
for j in range(1, i):
if L1[i] == L1[j]:
flag = 1
if flag == 0:
count += 1
flag = 0
return count |
s813685070 | p03962 | u250662864 | 1597064264 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9100 | 100 | j = int(input())
x = j.split()
y = []
for i in x:
if(i not in y):
y.append(i)
print(len(y))
|
s223812189 | p03962 | u250662864 | 1597064119 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9024 | 133 | a = int(input())
b = int(input())
c = int(input())
x = [a, b, c]
y = []
for i in x:
if(i not in y):
y.append(i)
print(len(y))
|
s515203069 | p03962 | u250662864 | 1597064013 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8940 | 98 | a = int(input())
b = int(input())
c = int(input())
s = {}
s.add(a)
s.add(b)
s.add(c)
print len(s)
|
s885127388 | p03962 | u250662864 | 1597063943 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8956 | 78 |
a = int(input())
b = int(input())
c = int(input())
s = {a, b, c}
print len(s) |
s444784845 | p03962 | u939790872 | 1596780390 | Python | Python (3.8.2) | py | Runtime Error | 20 | 8968 | 54 | n, k = map(int, input().split())
print(k*(k-1)**(n-1)) |
s034012326 | p03962 | u442948527 | 1596683553 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8964 | 44 | print(len(set([input() for i in range(3)]))) |
s476241767 | p03962 | u714104087 | 1596573035 | Python | PyPy3 (7.3.0) | py | Runtime Error | 85 | 74716 | 50 | abc = list(input().split())
print(lens(set(abc))) |
s051186415 | p03962 | u876742094 | 1596477026 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9080 | 116 | abc=sorted(list(map(int,input().split())))
if a==c:
print(1)
elif a==b or b==c:
print(2)
else:
print(3)
|
s903598249 | p03962 | u980503157 | 1596415868 | Python | Python (3.8.2) | py | Runtime Error | 22 | 9172 | 157 | a = int(input())
b = int(input())
c = int(input())
count = 0
if a != b:
count += 1
if b != c:
count += 1
if a != c:
count += 1
print(int(count/2)) |
s595922270 | p03962 | u684743124 | 1595400134 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9088 | 41 | s=set(int(input().split()))
print(len(s)) |
s533561095 | p03962 | u860546679 | 1595280852 | Python | Python (3.8.2) | py | Runtime Error | 27 | 8988 | 129 | a=list(map(int,input().split())).sort()
if a[0]==a[2]:
print(1)
elif (a[0]==a[1]) or (a[1]==a[2]):
print(2)
else:
print(3)
|
s266649282 | p03962 | u860546679 | 1595280807 | Python | Python (3.8.2) | py | Runtime Error | 23 | 8936 | 127 | a=sort(list(map(int,input().split())))
if a[0]==a[2]:
print(1)
elif (a[0]==a[1]) or (a[1]==a[2]):
print(2)
else:
print(3) |
s821287550 | p03962 | u520018621 | 1594614104 | Python | PyPy3 (7.3.0) | py | Runtime Error | 87 | 74720 | 39 | a, b, c = getNM()
print(len({a, b, c})) |
s953049083 | p03962 | u316603606 | 1594412647 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9112 | 199 | a,b,c = (int(x) for x in input().split())
if a == b:
if a == c:
print (1)
else:
pritn (2)
else:
if a == c:
print (2)
else:
if b == c:
print (2)
else:
print (3) |
s868502474 | p03962 | u316603606 | 1594412440 | Python | Python (3.8.2) | py | Runtime Error | 23 | 8924 | 157 | a,b,c = (int(x) for x in input().split())
if a == b:
if a == c:
print (1)
else:
pritn (2)
else:
if a == c:
print (2)
else:
print (3)
|
s200112065 | p03962 | u969848070 | 1594172518 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9088 | 46 | a = list(map(int, input()))
print(len(set(a))) |
s767622769 | p03962 | u215376033 | 1594067553 | Python | Python (3.8.2) | py | Runtime Error | 28 | 8980 | 185 | a = int(input())
b = int(input())
c = int(input())
if a==b and a==c:
print("1")
elif a==b:
print("2")
elif a==c:
print("2")
elif b==c:
print("2")
else:
print("3") |
s129377336 | p03962 | u215376033 | 1594067437 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9052 | 175 | a = int(input())
b = int(input())
c = int(input())
if a==b and a==c:
print(1)
elif a==b:
print(2)
elif a==c:
print(2)
elif b==c:
print(2)
else:
print(3)
|
s329341598 | p03962 | u215376033 | 1594067349 | Python | Python (3.8.2) | py | Runtime Error | 31 | 9160 | 167 | a = int(input())
b = int(input())
c = int(input())
if a == b and a==c:
print(1)
elif a==b:
print(2)
elif a==c:
print(2)
elif b==c:
print(2)
else:
print(3)
|
s321232811 | p03962 | u215376033 | 1594067320 | Python | Python (3.8.2) | py | Runtime Error | 19 | 9032 | 167 | a = int(input())
b = int(input())
c = int(input())
if a == b and a==c:
print(1)
elif a==b:
print(2)
elif a==c:
print(2)
elif b==c:
print(2)
else:
print(1)
|
s742173430 | p03962 | u215376033 | 1594067243 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8952 | 166 | a = int(input())
b = int(input())
c = int(input())
if a == b && a==c:
print(1)
elif a==b:
print(2)
elif a==c:
print(2)
elif b==c:
print(2)
else:
print(1)
|
s680992259 | p03962 | u047931063 | 1593910092 | Python | PyPy3 (7.3.0) | py | Runtime Error | 99 | 74676 | 59 | A = list(map(int,input().split()))
B = map(A)
print(len(B)) |
s867050968 | p03962 | u858670323 | 1593538667 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9152 | 39 | a = set(map(int,input()))
print(len(a)) |
s799515345 | p03962 | u679817762 | 1593371731 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8872 | 231 | #入力
lst = input().split()
#整数値化
for i in range(len(lst)):
lst[i] = int(lst[i])
#ソート
lst.sort()
#出力
if lst[0] == lst[2]
print(3)
elif lst[0] == lst[1] or lst[1] == lst[2]:
print(2)
else:
print(1) |
s751415062 | p03962 | u679817762 | 1593371551 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8964 | 232 | #入力
lst = input().spilit()
#整数値化
for i in range(len(lst)):
lst[i] = int(lst[i])
#ソート
lst.sort()
#出力
if lst[0] == lst[2]
print(3)
elif lst[0] == lst[1] or lst[1] == lst[2]:
print(2)
else:
print(1) |
s300003209 | p03962 | u656120612 | 1592978145 | Python | Python (3.8.2) | py | Runtime Error | 21 | 8820 | 174 | a,b,c=map(int,input().split())
if a=b and b=c:
print(1)
elif a=b and a!=c:
print(2)
elif a!=b and b=c:
print(2)
elif a=c and a!=b:
print(2)
else:
print(3) |
s013147750 | p03962 | u656120612 | 1592978035 | Python | Python (3.8.2) | py | Runtime Error | 20 | 9020 | 150 | a,b,c=map(int,input().split())
if a=b=c:
print(1)
elif a=b!=c:
print(2)
elif a!=b=c:
print(2)
elif a=c!=b:
print(2)
else:
print(3) |
s555800231 | p03962 | u656120612 | 1592977678 | Python | Python (3.8.2) | py | Runtime Error | 29 | 8896 | 134 | a=input().split()
a.sort()
cnt=0
while len(s)>0:
i=a.count(a.pop(0))
for j in range(i):
a.pop(0)
cnt+=1
print(cnt) |
s540205160 | p03962 | u333591669 | 1592884300 | Python | Python (3.8.2) | py | Runtime Error | 20 | 9128 | 187 | def color():
a=int(input())
b=int(input())
c=int(input())
if a==c==b:
print(1)
elif a==b or b==c or a==c:
print(2)
else:
print(3)
color()
|
s018555880 | p03962 | u578580291 | 1592757763 | Python | Python (3.8.2) | py | Runtime Error | 21 | 8900 | 195 | def paint():
a = int(input())
b = int(input())
c = int(input())
count = 1
if a != b:
count += 1
if a != c and b != c:
count += 1
print(count)
paint() |
s463827577 | p03962 | u578580291 | 1592757484 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9168 | 201 | def paint():
a = int(input())
b = int(input())
c = int(input())
count = 1
if a != b:
count += 1
if a != c and b != c:
count += 1
print(count)
paint() |
s056048641 | p03962 | u578580291 | 1592757206 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8992 | 219 | def paint():
a = int(input())
b = int(input())
c = int(input())
count = 3
if a == b:
count -= 1
if a == c:
count -= 1
if b == c:
count -= 1
print(count)
paint() |
s929040388 | p03962 | u583276018 | 1591580650 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 48 | print(ren(set(list(map(int, input().split()))))
|
s603200144 | p03962 | u987170100 | 1591324531 | Python | Python (3.4.3) | py | Runtime Error | 36 | 5048 | 293 | import math
from fractions import Fraction
N = int(input())
a, b = map(int, input().split())
ret_a = a
ret_b = b
for _ in range(1, N):
a, b = map(int, input().split())
x = math.ceil(max(Fraction(ret_a, a), Fraction(ret_b, b)))
ret_a = a * x
ret_b = b * x
print(ret_a + ret_b)
|
s313187637 | p03962 | u680503348 | 1591206222 | Python | Python (3.4.3) | py | Runtime Error | 33 | 5076 | 610 | # For taking integer inputs.
import math
from decimal import Decimal
from itertools import permutations
def inp():
return(int(input()))
# For taking List inputs.
def inlist():
return(list(map(int, input().split())))
# For taking string inputs. Actually it returns a List of Characters, instead of a string,... |
s646536927 | p03962 | u680503348 | 1591206100 | Python | Python (3.4.3) | py | Runtime Error | 35 | 5076 | 618 | # For taking integer inputs.
import math
from decimal import Decimal
from itertools import permutations
def inp():
return(int(input()))
# For taking List inputs.
def inlist():
return(list(map(int, input().split())))
# For taking string inputs. Actually it returns a List of Characters, instead of a s... |
s545680162 | p03962 | u680503348 | 1591206040 | Python | Python (3.4.3) | py | Runtime Error | 33 | 5076 | 609 | # For taking integer inputs.
import math
from decimal import Decimal
from itertools import permutations
def inp():
return(int(input()))
# For taking List inputs.
def inlist():
return(list(map(int, input().split())))
# For taking string inputs. Actually it returns a List of Characters, instead of a s... |
s442461619 | p03962 | u778348725 | 1590938898 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 229 | #おととい買ったペンキ
a = int(input())
#きのう買ったペンキ
b = int(input())
#今日買ったペンキ
c= int(input())
penki_list = [a,b,c]
#print(penki_list)
#print(set(penki_list))
print(len(set(penki_list)))
|
s205891321 | p03962 | u405256066 | 1590369748 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 299 | from sys import stdin
import math
N = int(stdin.readline().rstrip())
t,a = [int(x) for x in stdin.readline().rstrip().split()]
for _ in range(N-1):
T,A = [int(x) for x in stdin.readline().rstrip().split()]
n = int(max(math.ceil(t/T),math.ceil(a/A)))
t = n*T
a = n*A
print(t+a) |
s907142806 | p03962 | u496148227 | 1590155932 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 54 | N, K = map(int, input().split())
print(K*(K-1)**(N-1)) |
s120790730 | p03962 | u895040371 | 1590116273 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 44 | a = list[input().split()]
print(len(set(a))) |
s281488627 | p03962 | u957198490 | 1589152832 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 54 | a = list(map(int,inptu().split()))
print(len(set(a)))
|
s869321831 | p03962 | u989306199 | 1589091405 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 540 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define all(x) (x).begin(),(x).end()
template <class T> inline bool chmin(T &a, T b) {if (a > b){a = b;return true;}return false;}
template <class T> inline bool chmax(T &a,... |
s407318752 | p03962 | u857673087 | 1588818649 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 49 | abc = lits(input().split())
print(len(set(abc))) |
s386170021 | p03962 | u383450070 | 1588779228 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 92 | lst(list(map(str,input().split())))
a=set()
for i in range(3):
a.add(lst[i])
print(len(a)) |
s550018107 | p03962 | u246661425 | 1588652685 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 60 | a, b, c = map(int, input().split())
print(len(set(a, b, c))) |
s862540453 | p03962 | u366886346 | 1588495184 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 111 | a,b,c=input().split()
d=list[a,b,c]
for i in range(2):
if d.count(d[i])!=1:
del d[i]
print(len(d))
|
s414947179 | p03962 | u366886346 | 1588495129 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 120 | a,b,c=map(int,input().split())
d=list[a,b,c]
for i in range(2):
if d.count(d[i])!=1:
del d[i]
print(len(d))
|
s847589779 | p03962 | u272522520 | 1588182037 | Python | Python (3.4.3) | py | Runtime Error | 16 | 2940 | 51 | s = {input() for i in range(3)}
N = len(s)
print(N) |
s163426428 | p03962 | u830162518 | 1587940640 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 126 | a,b.c=map(int,input().split())
L=[a,b,c]
L.sort()
if L[0]==L[2]:
print(1)
elif L[0]<L[1]<L[2]:
print(3)
else:
print(2) |
s727300259 | p03962 | u830162518 | 1587940556 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3188 | 130 | a,b.c=map(int,input().split())
L=list[a,b,c]
L.sort()
if L[0]==L[2]:
print(1)
elif L[0]<L[1]<L[2]:
print(3)
else:
print(2) |
s490807290 | p03962 | u423665486 | 1587855887 | Python | PyPy3 (2.4.0) | py | Runtime Error | 164 | 38384 | 114 | def resolve():
n, k = map(int, input().split())
if n == 1:
print(k)
else:
print(k*((k-1)**(n-1)))
resolve() |
s776513929 | p03962 | u115877451 | 1587763539 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 53 | a,b,c=map(int,input().split())
print(len(set(a,b,c))) |
s394257250 | p03962 | u115877451 | 1587763158 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 124 | a,b,c=map(int,input().split())
n=[a,b,c]
if a!=b!=c:
print(3)
elif a=b!=c or a!=b=c or b=a!=c:
print(2)
else:
print(1) |
s668914461 | p03962 | u342456871 | 1587694635 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 163 | n=int(input())
tv=1
av=1
for i in range(n):
ti,ai=map(int,input().split())
m=max(int((tv-1)//ti)+1,int((av-1)//ai)+1)
tv=m*ti
av=m*ai
print(tv+av)
|
s890299290 | p03962 | u581603131 | 1587656270 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 53 | list = set(map(int, input().split()))
print(len(set)) |
s752034501 | p03962 | u275212209 | 1587526100 | Python | PyPy3 (2.4.0) | py | Runtime Error | 183 | 38640 | 104 | if __name__ == '__main__':
a = []
for i in range(3):
a.append(int(input()))
print(len(set(a))) |
s539838663 | p03962 | u275212209 | 1587526028 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 104 | if __name__ == '__main__':
a = []
for i in range(3):
a.append(int(input()))
print(len(set(a))) |
s096059708 | p03962 | u810978770 | 1587518763 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 52 | a = map(int ,input().split())
print(len(Counter(a))) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.