problem_id stringclasses 428
values | submission_id stringlengths 10 10 | status stringclasses 2
values | code stringlengths 5 816 |
|---|---|---|---|
p02791 | s636489814 | Wrong Answer | n = int(input())
a_l = [int(x) for x in input().split()]
count = 1
minnum = a_l[0]
for i in range(n-1):
if a_l[i] >= a_l[i+1]:
minnum = a_l[i]
count += 1
else:
pass
print(count) |
p03852 | s368389675 | Wrong Answer | c = input()
if c == 'a' or 'i' or 'u' or 'e' or 'o':
print('vowel')
else:
print('consonant') |
p02775 | s799587710 | Accepted | n=[int(x) for x in input()]
dp=[[100000000000 for i in range(len(n)+1)]for j in range(2)]
dp[0][0]=0
dp[1][0]=1
for i in range(len(n)):
d=n[i]
dp[0][i+1]=min(dp[0][i+1],min(d,11-d)+dp[0][i],10-d+dp[1][i])
dp[1][i+1]=min(dp[1][i+1],d+1+dp[0][i],9-d+dp[1][i])
print(dp[0][len(n)])
#print(dp) |
p03030 | s450754720 | Wrong Answer | n=int(input())
l=[]
for i in range(n):
a,b=map(str, input().split())
b=str(100-int(b))
a=a+b
l.append(a)
l2=sorted(l)
for i in range(n):
print(l.index(l2[i])+1) |
p03815 | s513907308 | Accepted | n = int(input())
ans = 2*(n // 11)
if n % 11 > 6:
ans += 2
elif n % 11 > 0:
ans += 1
else:
ans += 0
print(ans) |
p03360 | s138720373 | Wrong Answer | a, b, c = map(int, input().split())
d = int(input())
l = [a, b, c]
index = l.index(max(l))
l[index] = l[index] * 2 * d
print(sum(l))
|
p03437 | s091352417 | Wrong Answer | x,y=map(int,input().split())
if y%x == 0:
print(-1)
else:
print(x*2) |
p02817 | s328067862 | Accepted | a, b = input().split()
s = b + a
print(s) |
p02700 | s161593170 | Accepted | def main():
A, B, C, D = map(int, input().split())
while True:
C -= B
if C <= 0:
print("Yes")
exit()
A -= D
if A <= 0:
print("No")
exit()
if __name__ == '__main__':
main()
|
p02602 | s330379785 | Wrong Answer | import numpy as np
n,k=map(int,input().split())
a=list(map(int,input().split()))
s=np.prod(a[:k])
for i in range(0,n-k):
if a[i]!=0:
ns=s/a[i]*a[i+k]
else:
ns=np.prod(a[i+1:i+1+k])
if ns>s:
print("Yes")
else:
print("No")
s=ns |
p03419 | s346977530 | Wrong Answer | import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))
if __name__ == "__main__":
n ,m = I2()
print(max(1, n - 2)*max(1, m - 2)) |
p03043 | s970207008 | Accepted | def get_c(p, k):
c = 0
while 1:
if p * pow(2, c) >= k:
return c
c += 1
# input
N, K = map(int, input().split())
# check
prob = [1 / N] * N
for p, i in zip(range(1, N + 1), range(N)):
c = get_c(p, K)
prob[i] *= (1 / 2) ** c
print(sum(prob))
|
p03474 | s579524628 | Accepted | nums = "1234567890"
a, b = map(int, input().split())
s = input()
ok_flg = True
for i in range(a):
if s[i] not in nums:
ok_flg = False
break
if s[a] != "-":
ok_flg = False
for j in range(b):
if s[a + 1 + j] not in nums:
ok_flg = False
break
if ok_flg == True:
print("Yes")
else:
print("No")
|
p03627 | s698542682 | Accepted | from collections import Counter
n = int(input())
A = list(map(int, input().split()))
cnt_A = Counter(A)
# print(cnt_A)
kouho = []
ans = 0
for key in cnt_A:
if cnt_A[key] >= 2:
kouho.append(key)
if cnt_A[key] >= 4:
ans = max(ans, key ** 2)
if len(kouho) < 2:
print(ans)
exit()
kouho.sort()
ans = max(ans, kouho[-1] * kouho[-2])
print(ans)
|
p02646 | s647889475 | Accepted | import io,sys
sys.setrecursionlimit(10**6)
def main():
a,v = map(int,sys.stdin.readline().rstrip().split())
b,w = map(int,sys.stdin.readline().rstrip().split())
t = int(input())
l = abs(a-b)
p = v-w
if p > 0 and l/p <= t:
print("YES")
else:
print("NO")
main() |
p02691 | s396976865 | Wrong Answer | def main():
N = int(input())
sanka_l = list(map(int, input().split()))
count = 0
min_num = min(sanka_l)
for i in range(N):
if sanka_l[i] >= N-i-min_num:
break
for j in range(i, N):
if sanka_l[i] + sanka_l[j] == j - i:
count += 1
print(count)
main() |
p03329 | s804810625 | Accepted | n = int(input())
import math
ans = float('inf')
def calc(x,cnt):
if x<6:
global ans
ans = min(ans,x+cnt)
else:
c = 6**int(math.log(x,6))
if c*6==x:c*=6
calc(x-c,cnt+1)
c = 9**int(math.log(x,9))
if c*9==x:c*=9
calc(x-c,cnt+1)
calc(n,0)
print(ans)
|
p02801 | s403313919 | Wrong Answer | N = str(input())
chr(ord(N)+1) |
p02779 | s223563256 | Accepted | n = int(input())
lst = list(map(int, input().split()))
lset = set(lst)
if len(lset) == len(lst):
print("YES")
else:
print("NO") |
p03556 | s944263947 | Accepted | N = int(input())
ans = 0
for i in range(1,100000):
if i**2 > N:
print(ans)
exit()
ans = i**2
print(ans)
|
p03548 | s570920605 | Accepted | X, Y, Z = map(int, input().split())
print((X-Z) // (Y+Z))
|
p03434 | s746154591 | Accepted | N = int(input())
List = [int(x) for x in input().split()]
Sum = sum(List)
List.sort(reverse=True)
del List[::2]
Sum_B = sum(List)
Sum_A = Sum-Sum_B
print(Sum_A-Sum_B) |
p03494 | s645269959 | Accepted | n = int(input())
a = list(map(int,input().split()))
cnt = 0
while True:
if sum(list(1 for x in a if x % 2 == 1)) != 0:
print(cnt)
exit()
a = list(x // 2 for x in a)
cnt += 1
print(cnt) |
p03377 | s148383533 | Accepted | #!/usr/bin/env python3
a, b, x = list(map(int, input().split()))
if a+b >= x and x >= a:
print("YES")
else:
print("NO")
|
p03208 | s459018521 | Wrong Answer | n, k = map(int, input().split())
h = [int(i) for i in range(n)]
h.sort()
for i in range(n-k+1):
a = h[i+k-1]-h[i]
ans = a if i == 0 else min(ans, a)
print(ans) |
p02657 | s950468058 | Accepted | A, B = map(int, input().split( ))
print(A*B) |
p03438 | s196739060 | Wrong Answer | def ceil(a, b):
return (a + b - 1) // b
N = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
n = sum(b) - sum(a)
for _a, _b in zip(a, b):
if _a > _b:
n -= _a - _b
if _a < _b:
n -= ceil(_b - _a, 2)
if n >= 0:
print('Yes')
else:
print('No')
|
p02777 | s329373162 | Wrong Answer | l = {}
s, t = map(str, input().split())
a, b = map(int, input().split())
l[s] = a
l[t] = b
u = input()
l[u] -= 1
a = list(map(str, l.values()))
print("{} {}".format(a[0], a[1]))
|
p02570 | s920524659 | Accepted | D, T, S = map(int, input().split())
print('Yes') if T * S >= D else print("No") |
p02631 | s221349019 | Wrong Answer | n = int(input())
lis = list(map(int, input().split()))
t = lis[0]
for i in range(1, n):
t ^= i
ans = [0] * n
for i , j in enumerate(lis):
ans[i] = t ^ j
print(*ans) |
p02963 | s564291144 | Accepted | s = int(input())
v = 1000000000
x=(v-s%v)%v
y=(s+x)//v
print("0 0 1000000000 1",int(x),int(y)) |
p02705 | s610281340 | Accepted | import math
n = int(input())
print (2*math.pi*n) |
p02690 | s375403495 | Accepted | from itertools import count
def main():
X = int(input())
for i in count():
for A in (-i, i):
for B in range(-i, i+1):
if A**5 - B**5 == X:
print(A, B)
return
main()
|
p03071 | s113180392 | Wrong Answer | a,b=map(int,input().split())
if a<=b:
print(b+b-1)
else:
print(a+a-1) |
p03838 | s085620236 | Accepted | x,y = [int(x) for x in input().split()]
if y == 0:
print(abs(x) + (x>0))
elif x < y < 0:
print(y-x)
elif 0 < y < x:
print(x-y+2)
else:
print(abs(abs(y) - abs(x)) + (x < 0) + (y < 0)) |
p03264 | s715333927 | Wrong Answer | k = int(input())
print(k//2 ** 2) if k % 2 == 0 else print(k//2 * (k//2 + 1))
|
p03281 | s345525659 | Accepted | def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
divisors.sort()
return divisors
n = int(input())
ans = 0
for i in range(1, n+1,2):
if len(make_divisors(i)) == 8:
ans += 1
print(ans)
|
p03943 | s280436950 | Accepted | ll=list(map(int,input().split()))
ll.sort()
if ll[2] == ll[0]+ll[1]:
print('Yes')
else:
print('No')
|
p02631 | s780067279 | Wrong Answer | n = int(input())
a = sorted(list(map(int, input().split())))
x = 0
for i in a:
x ^= i
for i in range(n):
a[i] ^= x
print(*a) |
p03659 | s266812932 | Accepted | N = int(input())
a = list(map(int,input().split()))
x = a[0]
y = sum(a[1:N])
ans = abs(x-y)
for i in range(1,N-1):
x += a[i]
y -= a[i]
ans = min(ans,abs(x-y))
print(ans) |
p03680 | s844796773 | Accepted | n = int(input())
a_list = list()
for _ in range(n):
a_list.append(int(input()))
light_button = 1
target_light_button = 2
for i in range(n):
light_button_index = light_button - 1
light_button = a_list[light_button_index]
if light_button == target_light_button:
print(i + 1)
exit(0)
print(-1) |
p04034 | s586947667 | Accepted | N,M = map(int,input().split())
C = {i:[1,0] for i in range(1,N+1)}
C[1][1] = 1
for _ in range(M):
x,y = map(int,input().split())
C[x][0] -= 1
C[y][0] += 1
if C[x][1]==1:
C[y][1]=1
if C[x][0]==0:
C[x][1]=0
cnt = 0
for i in range(1,N+1):
cnt += C[i][1]
print(cnt) |
p03854 | s113924161 | Wrong Answer | s=input()
s1=s.replace("eraser","0").replace("erase","0").replace("dreamer","0").replace("dream","0")
n=len(s1)
flag=False
for i in range(0,n):
if s1[i]!='0':
flag=True
break
if flag==False:
print("Yes")
else:
print("No")
|
p03695 | s847050467 | Accepted | from collections import Counter
N = int(input())
a = [min(8, int(x) // 400) for x in input().split()]
cnt = Counter(a)
min_col = 0 # レート3200未満の人の色の数
for i in range(8):
if cnt[i]:
min_col += 1
if min_col == 0: # 全員3200以上
min_col = 1
max_col = N
else:
max_col = min_col + cnt[8]
print(min_col, max_col) |
p02843 | s319222197 | Wrong Answer | #!/usr/bin/env python3
from itertools import product
def f(x):
b = sum(range(100,106))
return x % b
def g(r):
l = list(range(100,106))
p = product([0,1],repeat=5)
m = []
for x in p:
s = 0
for i in range(5):
s += l[i]*x[i]
m.append(s)
return r in m
def main():
X = int(input())
print(int(g(f(X))))
if __name__ == '__main__':
main() |
p03407 | s035316122 | Accepted | a, b, c = map(int, input().split())
if a + b >= c:
print('Yes')
else:
print('No')
|
p03592 | s876678957 | Accepted | def main():
width, height, target = map(int, input().split())
answer = False
if target == 0:
answer = True
else:
for i in range(height):
if answer:
break
for j in range(width):
if (width - j) * (height - i) + i * j == target:
answer = True
break
print("Yes" if answer else "No")
if __name__ == '__main__':
main()
|
p03071 | s521338529 | Accepted | def main():
num = list(map(int,input().split()))
flg=0
if num[0]>num[1]:
print(num[0]*2-1)
elif num[1]>num[0]:
print(num[1]*2-1)
else:
print(num[0]*2)
main() |
p03759 | s773223500 | Accepted | a,b,c=map(int,input().split())
print('YES' if b-a==c-b else 'NO')
|
p02659 | s307492155 | Wrong Answer | A, B = map(float, input().split())
C = str(A * B)
if '.' in C:
ans = C.split('.')
print(ans[0])
else:
print(C) |
p02552 | s586743345 | Accepted | x=int(input())
if x==0:
print(1)
else:
print(0) |
p02690 | s626283897 | Accepted | import sys
X = int(input())
# X = 33
for a in range(-118, 120):
for b in range(-119, 119):
if a**5 - b**5 == X:
print(a, b)
sys.exit(0)
|
p03438 | s015485992 | Wrong Answer | n = int(input())
a = sum(list(map(int,input().split())))
b = sum(list(map(int,input().split())))
if (a - b) % 2 == 0 and a != b:
print("No")
else:
print("Yes") |
p02760 | s524792193 | Wrong Answer | a = [[j for j in map(int,input().split())] for i in range(3)]
n = int(input())
b = [[int(j) for j in input()] for i in range(n)]
for i in range(3):
for j in range(3):
for k in range(n):
if a[i][j] == b[k]:
a[i][j] = 0
if sum(a[0]) % 3 == 0 or sum(a[1]) % 3== 0 or sum(a[2]) % 3 == 0:
print('Yes')
elif (a[0][0] + a[1][1] + a[2][2]) % 3 == 0 or (a[0][2] + a[1][1] + a[2][0]) % 3 == 0:
print('Yes')
else:
print('No') |
p02982 | s753403138 | Wrong Answer | N, D = map(int, input().split())
X = [input().split() for i in range(N)]
count = 0
d_2 = 0
d = 0
for i in range(N):
for j in range(0, i):
for k in range(D):
d_2 += (float(X[i][k]) - float(X[j][k]))**2
d = d_2**(1/2)
if d.is_integer() == True:
count += 1
print("{}".format(count)) |
p02729 | s274557527 | Wrong Answer | n,m=map(int,input().split())
if(n+m>=2):
print((n*(n-1)/2)+(m*(m-1)/2)) |
p03627 | s468653061 | Wrong Answer | from collections import Counter
def solve():
N = int(input())
A = list(map(int, input().split()))
c = Counter(A)
B = sorted([k for k,v in c.items() if v>=2],reverse=True)
if len(B)<2:
return 0
ans = B[0]*B[1]
return ans
print(solve()) |
p02577 | s413993263 | Wrong Answer | N = int(input())
count = 0
lst = []
while N > 0:
lst.append(N%10)
N //= 10
for i in lst:
count += i
if count % 9 == 0:
print("Yes")
else:
print("No")
print(count) |
p04029 | s659240395 | Wrong Answer | n = int(input())
print((n*n-1)//2) |
p03627 | s424707170 | Accepted | from collections import Counter
n = int(input())
ctr = Counter(list(map(int, input().split())))
side = []
for k in sorted(ctr.keys(), reverse=True):
if ctr[k] >= 4:
side.append(k)
side.append(k)
elif ctr[k] >= 2:
side.append(k)
print(side[0] * side[1] if len(side) >= 2 else 0) |
p02909 | s990207491 | Accepted | s = input()
w = ['Sunny','Cloudy','Rainy']
if w.index(s) == 2:
print(w[0])
else:
print(w[w.index(s)+1]) |
p03760 | s625307023 | Wrong Answer | O = input()
E = input()
print(*[o + e for o, e in zip(O, E)], sep="")
|
p02957 | s873906924 | Accepted | a, b = map(int, input().split())
if (a - b) % 2 == 0:
print((a + b) // 2)
else:
print('IMPOSSIBLE')
|
p02792 | s593215712 | Wrong Answer | # 解答見た
n = int(input())
a = [[0 for i in range(10)] for j in range(10)]
for i in range(n):
b = int(str(i)[0])
c = int(str(i)[-1])
a[b][c] += 1
ans = 0
for i in range(1,10):
for j in range(1,10):
ans += a[i][j]*a[j][i]
print(ans)
|
p03254 | s111529323 | Accepted | n,x = map(int,input().split())
al = list(map(int,input().split()))
al.sort()
c = 0
for a in al:
if x >= a:
c += 1
x -= a
if x > 0 and c > 0:
c -= 1
print(c) |
p02973 | s984199111 | Wrong Answer | from bisect import bisect_left
import heapq
n=int(input())
l=[]
l.append(int(input()))
heapq.heapify(l)
for i in range(n-1):
a=int(input())
x=bisect_left(l,a)
if x==0:
heapq.heappush(l,a)
else:
l[x-1]=a
print(len(l)) |
p03548 | s328196310 | Accepted | def main():
x, y, z = map(int, input().split())
print((x - z) // (y + z))
if __name__ == "__main__":
main()
|
p02717 | s540579437 | Wrong Answer | from sys import stdin, stdout
l = list(map(int, stdin.readline().rstrip().split(' ')))
f=[]
i=-1
n = 0
while(n<len(l)):
f.append(l[i])
i = i+1
n= n+1
print(f) |
p02811 | s116373322 | Wrong Answer | tmp = input().split()
K = tmp[0]
X = tmp[1]
yen = K *500
if (yen >= X):
print("Yse")
else:
print("No") |
p02608 | s768936039 | Accepted | n = int(input())
count = [0] * (10**6)
s = 0
for i in range(1, 101):
for j in range(1, 101):
for k in range(1, 101):
s = i * i + j * j + k * k + i * j + j * k + k * i
count[s - 1] += 1
for i in range(n):
print(count[i])
|
p02814 | s832141915 | Wrong Answer | import sys
readline = sys.stdin.buffer.readline
from fractions import gcd
from functools import reduce
n,m = map(int,readline().split())
alst = list(map(int,readline().split()))
if n == 1:
g = alst[0]
if g * 3 > 2 * m:
print(0)
else:
print((m-g//2)//g)
quit()
else:
mm = 2 * m
f = lambda x,y:x*y//gcd(x,y)
g = reduce(f, alst)
if g > mm:
print(0)
else:
c = mm // g
c = c//2+c%2
print(c) |
p02693 | s567038053 | Wrong Answer | K = int(input())
A,B = input().split()
if K == 1:
print('OK')
else:
for i in range(int(A),int(B)):
if i%K==0 :
print('OK')
break
elif i == int(B)-1:
print('NG')
|
p03062 | s904814726 | Accepted | N = int(input())
A = map(int, input().split())
ans = 0
m = 10 ** 9 + 1
cnt = 0
for a in A:
if a < 0:
cnt ^= 1
a *= -1
m = min(m, a)
ans += a
if cnt:
ans -= 2 * m
print(ans)
|
p02693 | s764273616 | Wrong Answer | K = int(input())
A, B = map(int, input().split())
for i in range(A+1,B+1):
if i%K==0:
print("OK")
exit()
print("NG") |
p02881 | s901958117 | Accepted | import math
N = int(input())
a = math.ceil(math.sqrt(N))
yaku = {1,N}
for i in range(2,a+1):
if N % i == 0:
yaku.add(i)
yaku.add(N // i)
sl = len(yaku)
lyaku =list(yaku)
lyaku.sort()
if sl % 2 == 1:
print((lyaku[sl//2]-1)*2)
else:
print(lyaku[sl//2]+lyaku[sl//2-1] -2)
|
p03479 | s360860520 | Wrong Answer | x,y=map(int,input().split())
import bisect as bi
ans=1
for i in range(80):
if x*2<=y:
ans+=1
print(ans) |
p03455 | s491434588 | Wrong Answer | a, b = map(int, input().split())
def answer(a, b) -> str:
if (a * b) % 2 == 0:
return 'Even'
else:
return 'Odd' |
p02597 | s342537420 | Accepted | from collections import deque
N = int(input())
c = list(str(input()))
dw = deque()
dr = deque()
for i, c in enumerate(c, 1):
if c == 'W':
dw.append(i)
else:
dr.appendleft(i)
ans = 0
while dw and dr:
w = dw.popleft()
r = dr.popleft()
if w < r:
ans += 1
else:
break
print(ans) |
p02681 | s437334917 | Wrong Answer | S = str(input())
T = str(input())
if T != S[-1]:
print("Yes")
else:
print("No")
|
p02957 | s163836937 | Accepted | A, B = map(int, input().split())
print((A + B) // 2 if (A + B) % 2 == 0 else "IMPOSSIBLE") |
p02732 | s451544492 | Wrong Answer | n = int(input())
a = [int(i) for i in input().split()]
c = [0 for i in range(n+1)]
b = sorted(a)
cnt = 1
for i in range(n-1):
if b[i]==b[i+1]:
cnt += 1
else:
c[b[i]] = cnt
cnt = 1
if i==n-2:
c[b[n-1]] = cnt
ans = 0
for i in range(n):
ans += int(c[i]*(c[i]-1)/2)
for i in range(n):
print(ans-(c[a[i]]-1)) |
p03474 | s887610185 | Accepted | import re
a, b = map(str, input().split())
s = input()
ptn = '^\d{' + a + '}-\d{' + b + '}'
if re.search(ptn, s):
print('Yes')
else:
print('No') |
p03657 | s193296326 | Accepted | a,b=map(int,input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:
print('Possible')
else:
print('Impossible') |
p03210 | s774378912 | Accepted | x = int(input())
if x == 7 or x == 3 or x == 5:
print("YES")
else:
print("NO") |
p02879 | s555592993 | Accepted | a, b = map(int, input().split())
print(a * b if a < 10 and b < 10 else -1) |
p03309 | s323864490 | Wrong Answer | n = int(input())
a = list(map(int,input().split()))
for i in range(n):
a[i] = a[i]-(i+1)
m1 = sum(a)//n
m2 = -(-sum(a)//n)
ans1 = 0
ans2 = 0
for i in range(n):
ans1 += abs(a[i]-m1)
ans2 += abs(a[i]-m2)
print(min(ans1,ans2))
|
p02899 | s670679625 | Accepted | n=int(input())
a=list(map(int,input().split()))
b=[0]*n
for i in range(n):
b[a[i]-1]=i+1
print(*b) |
p04020 | s082649918 | Wrong Answer | n = int(input())
a1 = int(input())
flag = a1%2
ans = a1//2
for i in range(n-1):
a = int(input())
if flag:
ans+=1 if 0<a else 0
ans+=(a-1)//2 if a!=0 else 0
flag=1 if a!=0 and (a-1)%2==0 else 0
else:
ans +=a//2
flag=a%2
print(ans) |
p02684 | s504181251 | Accepted | def main():
N, K = [int(x) for x in input().split()]
a = [int(x)-1 for x in input().split()]
pos = 0
while K > 0:
if K&1:
pos = a[pos]
# doubling
a = [a[a[i]] for i in range(N)]
K >>= 1
print(pos+1)
if __name__ == '__main__':
main()
|
p03281 | s300148770 | Accepted | #ABC105-B
n = int(input())
divisor_list = []
ans = 0
for i in range(1,n+1):
divisor_list = []
#odd,even判定
if(i % 2 != 0):
#約数をdivisor_listに追加していく
for j in range(1,i+1):
if (i % j == 0):
divisor_list.append(j)
if(len(divisor_list) == 8):
ans += 1
print(ans) |
p03555 | s095844465 | Accepted | str1=input()
str2=input()
str3=str1[::-1]
if str3==str2:
print("YES")
else:
print("NO") |
p02631 | s859742759 | Accepted | n,*a=map(int,open(0).read().split())
x=0
for i in a:x^=i
for i in a:print(x^i) |
p03145 | s694886559 | Accepted | AB, BC, CA = map(int, input().split())
print(AB*BC//2) |
p03107 | s385163904 | Accepted | S = list(map(int, list(input())))
c = sum(S)
print(2 * min(c, len(S) - c)) |
p03219 | s333012819 | Accepted | import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input(): return sys.stdin.readline().rstrip()
def main():
X,Y=map(int,input().split())
print(X+Y//2)
if __name__ == '__main__':
main()
|
p03624 | s749020151 | Accepted | S = sorted(list(set(input())))
alphabet = list('abcdefghijklmnopqrstuvwxyz')
for i in range(len(alphabet)):
if alphabet[i] not in S:
print(alphabet[i])
exit()
print('None') |
p03035 | s294444907 | Accepted | Age,Pri=map(int,input().split())
if Age>=13:
print(Pri)
elif Age<=5:
print(0)
else:
print(int(Pri/2)) |
p02795 | s569533933 | Accepted | import math
H = int(input())
W = int(input())
N = int(input())
print(math.ceil(N / max(H, W)))
|
p02706 | s697766932 | Accepted | n , m = map(int,input().split())
day = list(map(int, input().split()))
aso = n-sum(day)
print(aso if aso >= 0 else "-1")
|
p02601 | s177109236 | Accepted | A, B, C=list(map(int,input().split()))
K=int(input())
for i in range(K):
if A>=B:
B=2*B
elif B>=C:
C=2*C
if A<B<C:
print('Yes')
else:
print('No') |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.