problem_id
stringclasses
428 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
5
816
p03457
s427918704
Wrong Answer
n = int(input()) for i in range(n): t,x,y = map(int,input().split()) if (x + y) > t or (x + y + t) % 2: print("No") exit() print("Yes")
p02552
s244622700
Accepted
print('10'[int(input())])
p02661
s961276075
Accepted
import sys read = sys.stdin.buffer.read N, *AB = map(int, read().split()) A,B=AB[::2],AB[1::2] A.sort() B.sort(reverse=True) pos=(N+1)//2-1 if N%2==1: ans = B[pos]-A[pos]+1 else: ans = (B[pos]+B[pos+1])-(A[pos]+A[pos+1])+1 print(ans)
p02873
s585950445
Wrong Answer
import sys S = list(">") lis = [0] * (len(S)+1) if len(S) == 1: print(1) sys.exit() #最初は < を処理する for i in range(len(S)): if S[i] == "<": lis[i+1] = lis[i] + 1 for j in range(len(S)-2,-1,-1): if S[j] == ">": lis[j] = max(lis[j],lis[j+1] + 1) print(sum(lis))
p02848
s689342816
Accepted
N = int(input()) S = input() base = ord('A') ans = '' for s in S: ans += chr((ord(s)+N-base)%26 + base) print(ans)
p03711
s087787011
Accepted
x, y = map(int, input().split()) a = [1, 3, 5, 7, 8, 10, 12] b = [4, 6, 9, 11] c = [2] if (x in a and y in a) or (x in b and y in b) or (x in c and y in c): print('Yes') else: print('No')
p02911
s675980064
Wrong Answer
n,k,q =map(int,input().split()) ans=[0]*n for i in range(q): a=int(input()) ans[a-1]+=1 for i in range(n): if k+q-ans[i]>0: print("Yes") else: print("No")
p03612
s378043059
Accepted
n=int(input()) p=list(map(int,input().split())) cnt=0 for i in range(n-1): if p[i]==(i+1): p[i],p[i+1]=p[i+1],p[i] cnt+=1 if p[-1]==n: cnt+=1 print(cnt)
p03035
s793362981
Accepted
A, B = map(int, input().split()) if A >= 13: print(B) elif 6 <= A <= 12: print(B // 2) else: print(0)
p03324
s709853637
Accepted
d,n = map(int, input().split()) if d == 0: if n < 100: print(n) else: print(101) elif d == 1: if n < 100: print(n*100) else: print(10100) elif d == 2: if n < 100: print(n*10000) else: print(n*10000+10000)
p02909
s884943775
Accepted
S = input() if S == 'Sunny': print('Cloudy') elif S == 'Cloudy': print('Rainy') else : print('Sunny')
p02729
s500551010
Accepted
n,m = map(int,input().split()) ''' 和が偶数: 奇数+奇数 偶数+偶数 ''' ans = n*(n-1)//2 + m*(m-1)//2 print(ans)
p03352
s170840118
Wrong Answer
import math x = int(input()) s = math.floor(math.sqrt(x)) if x == 1: print(1) exit() def l(k,p): return(int(math.floor(math.log(p)/math.log(k)))) ans = 0 for i in range(2,s+1): ans = max(ans, i ** l(i,x)) print(ans)
p03261
s923188036
Accepted
from collections import defaultdict d = defaultdict(int) N=int(input()) s=input() d[s]+=1 x=s[-1] for i in range(N-1): s=input() if s[0]==x and d[s]==0: x=s[-1] d[s]+=1 else: print('No') exit(0) print('Yes')
p03069
s674401101
Wrong Answer
N,S = open(0).read().split() ans = 0 ls = [] cnt = 1 p = S[0] for c in S[1:]: if p!=c: p = c ls.append(cnt) cnt = 1 else: cnt += 1 ls.append(cnt) if S[0]=='.': ls = ls[1:] if len(ls)%2==1: ls = ls[:-1] m = sum(ls[i] for i in range(0,len(ls),2)) n = sum(ls)-m ans = min(n,m) print(ans)
p03427
s076069501
Wrong Answer
N = int(input()) x = 9 order = 0 for i in range(16): if x > N: break x = x*10+9 order = i+1 ans = x for i in range(10): ans -= 10**order if ans < N: break ret = 0 while True: if ans == 0: break ret += ans % 10 ans = ans//10 print(ret)
p02578
s697495275
Accepted
N = int(input()) L = list(map(int,input().split())) ans=0 for i in range(N-1): if L[i]-L[i+1]>0: ans += L[i]-L[i+1] L[i+1]=L[i] print(ans)
p02556
s506965811
Accepted
n = int(input()) u = [list(map(int, input().split())) for i in range(n)] z = [u[i][0] + u[i][1] for i in range(n)] w = [u[i][0] - u[i][1] for i in range(n)] d = [max(z)-min(z), max(w)-min(w)] print(max(d))
p03145
s913620511
Accepted
a,b,c=map(int,input().split()) print(a*b//2)
p03323
s108034852
Accepted
a, b = map(int, input().split()) if a <= 8 and b <= 8: print('Yay!') else: print(':(')
p02663
s832969675
Accepted
H_1, M_1, H_2, M_2, K = map(int, input().split()) print(H_2*60+M_2-(H_1*60+M_1)-K)
p03962
s449676898
Wrong Answer
a=list(map(int,input().split())) a.sort() if a[0]==a[1]==a[2]: print(1) else: if a[0]==a[1] or a[1]==a[2] or a[2]==a[0]: print(2) else: print(1)
p04044
s466694583
Wrong Answer
a=input() b=[] for i in range(int(a[0])): b.append(input()) f=sorted(b) for i in range(int(a[0])): print(f[i],end='')
p02681
s133738094
Wrong Answer
s = input() t = input() if((c.islower() for c in s) and (d.islower() for d in t) and (s in t) and len(s) + 1 == len(t)): print("Yes") else: print("No")
p02952
s230076078
Accepted
N=int(input()) ans=0 for i in range(1,N+1): if len(str(i))%2==1: ans=ans+1 print(ans)
p03645
s094577752
Wrong Answer
n, m = map(int, input().split()) a = [] b = [] for i in range(m): c, d = map(int, input().split()) a.append(c) b.append(d) indexa_num = [] indexb_num = [x for x, v in enumerate(b) if v == n] for i in indexb_num: indexa_num = [y for y, w in enumerate(a) if w == i] ans = 'IMPOSSIBLE' for j in indexa_num: if 1 == a[j]: ans = 'POSSIBLE' print(ans)
p03817
s776604896
Accepted
x = int(input()) if x % 11 == 0: ans = x // 11 * 2 else: if x % 11 <= 6: ans = x // 11 * 2 + 1 else: ans = (x // 11 + 1) * 2 print(ans)
p02847
s586189104
Accepted
n = input() list = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"] x = 7 for item in list: if n == item: print(x) x -= 1
p02775
s968200364
Accepted
N = input() count = 0 prev = 0 for i in range(len(N)): if 0 <= int(N[i]) + prev < 5: count += int(N[i]) + prev prev = 0 elif 6 <= int(N[i]) + prev <= 9: count += 10 - (int(N[i]) + prev) prev = 1 elif int(N[i]) + prev == 10: prev = 1 else: if (i < (len(N) - 1) and int(N[i+1]) < 5) or i == len(N) - 1: count += 5 prev = 0 else: count += 5 prev = 1 count = count + prev print(count)
p03037
s374924764
Accepted
n,m = map(int,input().split()) lScope = [] rScope = [] ans = 0 for i in range(m): l,r = map(int,input().split()) lScope.append(l) rScope.append(r) # k in keyScope[i] (i= 0~m) を確かめたい if min(rScope) >= max(lScope): print(min(rScope) - max(lScope) + 1) else: print(0)
p02922
s480075138
Accepted
A, B = map(int, input().split()) cnt = 1 while A*cnt-(cnt-1) < B: cnt +=1 print(cnt if B > 1 else 0)
p03730
s305158260
Wrong Answer
a, b, c = map(int, input().split()) ans = "No" for i in range(b): if a*i % b == c: ans = "Yes" break print(ans)
p02994
s711038438
Wrong Answer
N,L=map(int,input().split()) ans=(L-1)*N+(N+1)*N//2 if (L<0 and L+N<0): ans-=L+N-1 elif L>=N or L>0: ans-=L print(ans)
p03854
s995405736
Accepted
S = input().replace("eraser", "").replace("erase", "").replace("dreamer", "").replace("dream", "") if S: print("NO") else: print("YES")
p03796
s807067599
Accepted
import math print(math.factorial(int(input()))%(10**9+7))
p02922
s305233906
Accepted
import math A, B = map(int, input().split()) x = math.ceil((B - A) / (A - 1)) + 1 print(x)
p02576
s144523972
Accepted
N, X, T = list(map(int, input().split())) ans = N // X if N % X != 0: ans += 1 ans = ans * T print(ans)
p03220
s408651709
Accepted
N = int(input()) T,A = map(int,input().split()) H = list(map(int,input().split())) x = 100000 ans = 0 for i in range(N): temp = abs(A -(T - H[i]*0.006)) if abs(A -(T - H[i]*0.006)) < x: x = abs(A -(T - H[i]*0.006)) ans = i print(ans+1)
p02753
s821599397
Wrong Answer
a,b,c=input() if a==b and b==c: print("NO") else: print("YES")
p03698
s437082892
Accepted
S = list(input()) len_S = len(S) set_S = set(S) len_set_S = len(set_S) if len_S == len_set_S: print("yes") else: print("no")
p03835
s316598498
Accepted
k, s = map(int,input().split()) ans = 0 for x in range(k+1): for y in range(k+1): if 0 <= s-x-y <= k: ans += 1 print(ans)
p03319
s042067877
Accepted
n, k=map(int, input().split()) a=list(map(int, input().split())) cnt=k ans=1 while cnt<n: cnt+=k-1 ans+=1 print(ans)
p03796
s978028718
Accepted
def main(): N = int(input()) result = 1 for n in range(2,N + 1): result *= n result %= 10 ** 9 + 7 print(result) if __name__ == '__main__': main()
p02676
s433514161
Wrong Answer
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys def input(): return sys.stdin.readline() def resolve(): k = int(input()) s = input() if k > len(s): print(s) else: print(s[:k] + "...") if __name__ == "__main__": resolve()
p02873
s838324345
Accepted
S = list(input()) len_S = len(S) a = [0]*(len_S+1) for i, s in enumerate(S): if s == '<': a[i+1] = a[i]+1 for i, s in enumerate(S[::-1]): inv_i = len_S-1-i if s == '>': a[inv_i] = max(a[inv_i+1]+1, a[inv_i]) print(sum(a))
p02546
s704036989
Wrong Answer
S = str(input()) if S[len(S)-1] == 'e': print(S + 's') else: print(S + 'es')
p04011
s649960493
Accepted
icase=44 if icase==44: n=int(input()) k=int(input()) x=int(input()) y=int(input()) if n<=k: print(n*x) else: print(k*x+(n-k)*y)
p02801
s599009632
Accepted
c = input() print(chr(ord(c)+1))
p02576
s138069603
Wrong Answer
n,x,t=map(int,input().split()) print((n//x+1)*t)
p03719
s347568636
Accepted
import sys def I(): 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 main(): a, b, c = MI() if a <= c and c <= b: print('Yes') else: print('No') if __name__ == '__main__': main()
p03607
s826463542
Accepted
N = int(input()) memo = {} for _ in range(N): Ai = int(input()) try: memo[Ai] += 1 except: memo[Ai] = 1 ans = 0 for i in memo: if memo[i] % 2 == 1: ans += 1 print(ans)
p03319
s163418887
Accepted
N,K=map(int,input().split()) *A,=map(int,input().split()) print(-(-(N-1)//(K-1)))
p02664
s249359422
Accepted
t = list(input()) ans ="" for i in t: if i == "?": ans += "D" else: ans += i print(ans)
p03162
s978151528
Wrong Answer
N=int(input()) L = [list(map(int, input().split())) for i in range(N)] dp=[[0 for j in range(3)] for i in range(N)] ans=[0]*(N+1) for i in range(N): dp[i][0]=max(dp[i-1][1],dp[i-1][2])+L[i][0] dp[i][1]=max(dp[i-1][2],dp[i-1][0])+L[i][1] dp[i][2]=max(dp[i-1][0],dp[i-1][1])+L[i][2] ans=max(dp[i][0],dp[i][1],dp[i][2]) #print(ans) print(ans)
p02747
s258289213
Wrong Answer
s=input() s1=set(list(s[::2])) s2=set(list(s[1::2])) if len(s1)==1 and len(s2)==1 and "h" in s1 and "i" in s2: print("Yes") else: print("No")
p02873
s673868242
Wrong Answer
S = input() a = [0] * (len(S) + 1) for i in range(len(S)): if S[i] == '<': a[i + 1] = max(a[i + 1], a[i] + 1) for i in range(len(S) - 1, 0, -1): if S[i] == '>': a[i] = max(a[i], a[i + 1] + 1) print(sum(a))
p03836
s235426221
Accepted
SX, SY, TX, TY = map(int, input().split()) way1 = 'U' * (TY - SY) + 'R' * (TX - SX) way2 = 'D' * (TY - SY)+ 'L' * (TX - SX) way3 = 'L' + 'U' * (TY - SY + 1) + 'R' * (TX - SX + 1) + 'D' way4 = 'R' + 'D' * (TY - SY + 1) + 'L' * (TX - SX + 1) + 'U' print(way1 + way2 + way3 + way4)
p03720
s373369202
Accepted
n , m = map(int, input().split()) ab = [list(map(int, input().split())) for _ in range(m)] ans = [] for i in range(n): cnt = 0 for j in range(m): if ab[j][0] == i+1 or ab[j][1] == i+1: cnt += 1 ans.append(cnt) for k in range(n): print(ans[k])
p03487
s207992732
Accepted
n = int(input()) a = list(map(int, input().split())) d = {} for c in a: if c in d.keys(): d[c] += 1 else: d.setdefault(c, 1) ans = 0 for indx, cnt in d.items(): if indx < cnt: ans += cnt - indx elif indx > cnt: ans += cnt print(ans)
p02577
s778301589
Wrong Answer
l = list(map(int, input())) sum = 0 for i in range(len(l)): sum += l[i] print(sum)
p03637
s858677670
Accepted
import sys n, *a = map(int, sys.stdin.read().split()) def main(): c4 = c2 = 0 for x in a: if not x % 4: c4 += 1 elif not x % 2: c2 += 1 ans = 'Yes' if c4 >= n // 2 or c4 * 2 + c2 >= n else 'No' print(ans) if __name__ == '__main__': main()
p02983
s795995169
Wrong Answer
def solve(): i = L//2019 ans = 0 while L <= 2019*i <= R: i += 1 # print(i) if i >= 1: print(ans) else: ans = (L*(L+1)) % 2019 print(ans) if __name__ == "__main__": L,R = list(map(int, input().split())) solve()
p03042
s385729494
Wrong Answer
s = input() f, b = int(s[:2]), int(s[2:]) if (f == 0 or b == 0): print("NA") elif (f > 12 and b > 12): print("NA") elif (f > 12): print("YYMM") elif (b > 12): print("MMYY") else: print("AMBIGUOUS")
p03221
s026858995
Wrong Answer
import bisect n, m = map(int, input().split()) # 市番号 order = [] pre = [[0] for _ in range(n + 1)] for i in range(m): p, y = map(int, input().split()) order.append([p, y]) pre[p].append(y) # 各県ごとにソート for i in range(n + 1): pre[p].sort() # 市番号順に,各県の何番目かをにぶたんで探す
p03293
s276399655
Accepted
def main(): s = input() t = input() ans = 'No' s2 = s * 2 for i in range(len(s2)): if t == s2[i:i + len(s)]: ans = 'Yes' break print(ans) if __name__ == '__main__': main()
p02819
s758655290
Wrong Answer
X = int(input()) MAX = 10**5+3 num = 2 primes = [0 for _ in range(MAX+1)] while(num**2 > MAX): if primes[num] == 1: num += 1 continue i = 2 while(num*i <= MAX): primes[num*i] = 1 i += 1 while(True): if primes[X] == 0: print(X) exit() else: X += 1
p02613
s406372240
Wrong Answer
loop_count = int(input()) ac_count = 0 wa_count = 0 tle_count = 0 re_count = 0 for i in range(loop_count): result = input() if result == 'AC': ac_count += 1 elif result == 'WA': wa_count += 1 elif result == 'TLE': tle_count += 1 else: re_count += 1 print("AC × {0}".format(str(ac_count))) print("WA × {0}".format(str(wa_count))) print("TLE × {0}".format(str(tle_count))) print("RE × {0}".format(str(re_count)), end="")
p02631
s739080733
Accepted
n,a,s=int(input()),list(map(int,input().split())),0 for x in a: s ^= x print(' '.join(list(map(str,[x^s for x in a]))))
p03251
s189847325
Accepted
N, M, X, Y = map(int, input().split()) x = list(map(int, input().split())) y = list(map(int, input().split())) x.sort() y.sort() if x[-1] < y[0] and X < y[0] and x[-1] < Y: print('No War') else: print('War')
p03071
s723115668
Accepted
INT = lambda: int(input()) INTM = lambda: map(int,input().split()) STRM = lambda: map(str,input().split()) STR = lambda: str(input()) LIST = lambda: list(map(int,input().split())) LISTS = lambda: list(map(str,input().split())) def do(): a,b=INTM() if a>=b: c=a-1 d=b else: c=b-1 d=a print(max(a,b)+max(c,d)) if __name__ == '__main__': do()
p03680
s767672130
Accepted
def main(): N=int(input()) a=[int(input()) for i in range(N)] tmp=1 for i in range(N): if tmp==2: print(i) exit() tmp = a[tmp-1] print(-1) main()
p03696
s758149144
Accepted
n = int(input()) array = list(input()) ret = [] count = 0 for str in array: if str == "(": count += 1 if str == ")": count -= 1 if count < 0: for i in range(-count): ret.insert(0, "(") count = 0 ret.append(str) for i in range(count): ret.append(")") print(''.join(ret))
p02623
s259528070
Accepted
N, M, K = map(int,input().split()) A = list(map(int,input().split())) B = list(map(int,input().split())) Asum = [0] Bsum = [0] a = 0 b = 0 for i in range(N): a += A[i] Asum.append(a) for i in range(M): b += B[i] Bsum.append(b) Asum.append(0) Bsum.append(0) res, j = 0, M for i in range(N+1): if Asum[i] > K: break while Asum[i] + Bsum[j] > K: j -= 1 res = max(res,i+j) print(res)
p03013
s291113938
Accepted
def Fibonacci(n): if n==1 or n==2: return 1 a,b=1,1 for i in range (3,1+n): a,b=a+b,a return a n,m=map(int,input().split()) bk=-1 ans=1 for i in range(m): a=int(input()) if bk==-1 and a==2: ans*=2 elif bk+1==a: print(0) exit() ans*=Fibonacci(a-bk-1) bk=a if bk!=m: ans*=Fibonacci(n-bk) print(ans%(10**9+7))
p03327
s913154446
Accepted
N=input() N=int(N) if N<1000: print('ABC') else: print('ABD')
p03264
s102159383
Accepted
k=int(input()) print((k // 2) * ((k + 1) // 2))
p02676
s992310085
Accepted
k = int(input()) s = input() if len(s) <= k: print(s) else: print(s[:k] + "...")
p03163
s785551679
Accepted
import numpy as np N,W = list(map(int,input().split())) dp = np.zeros(W+1,dtype = int) for i in range(N): w,v = list(map(int,input().split())) dp[w:] = np.maximum(dp[w:],dp[:-w] + v) print(dp[-1])
p02971
s257575873
Wrong Answer
from heapq import nlargest n = int(input()) a = [int(input()) for i in range(n)] l1, l2 = nlargest(2, a) for i in a: if a == l1: print(l2) else: print(l1)
p03680
s271614995
Accepted
N = int(input()) A = [0] + [int(input()) for i in range(N)] now = 1 count = 0 pushed = {1} while now != 2: now = A[now] count += 1 if now in pushed: print(-1) quit() pushed.add(now) print(count)
p03105
s465852765
Accepted
A, B, C = map(int,input().split()) x = B // A if x < C: print(x) else: print(C)
p02972
s991401430
Accepted
#!/usr/bin/env python3 n = int(input()) *a, = map(int, input().split()) b = [0]*(n//2) + a[n//2:] for i in reversed(range(n//2)): b[i] = sum(b[(i+1)*(j+1)-1] for j in range(n//(i+1)))%2 ^ a[i] print(sum(b)) print(*[i+1 for i in range(n) if b[i]==1])
p02647
s661785566
Wrong Answer
import copy def blight(dist,_i): l=_i-dist r=_i+dist+1 if l<0:l=0 if r>n:r=n for _ in range(l,r): b[_]+=1 n,k=map(int,input().split()) a=list(map(int,input().split())) cnt=0 cntmax=450 while cnt<k: if cnt>cntmax: break b=[0]*n for i in range(n): blight(a[i],i) cnt+=1 a=copy.deepcopy(b) print(b) print(" ".join(map(str,b)))
p03030
s134232159
Wrong Answer
N = int(input()) L1 = [] for i in range(N): L1.append(list(input().split())) L2 = L1 ans=[] for i in L1: seq = 1 for j in L2: if i[0] > j[0]: seq += 1 elif i[0] == j[0]: if int(i[1]) < int(j[1]): seq += 1 ans.append(seq) print(ans) for i in range(N): print(ans.index(i+1)+1)
p02683
s079692127
Wrong Answer
from itertools import combinations, chain def main(): n,m,x = map(int, input().split()) books = [list(map(int, input().split())) for _ in range(n)] comb = [*chain(*(combinations(books, n+1) for n in range(len(books))))] print(comb) money = 10**9 for c in comb: c = c[0] s = sum([c[i] for i in range(1,m+1)]) if s < x: break money = min(money,sum(c[0] for _ in c)) if money == 10**9: money = -1 print(money) if __name__ == '__main__': main()
p03795
s954635382
Accepted
N = int(input()) print((N*800)-((N//15)*200))
p02694
s246422579
Wrong Answer
X = int(input()) n = 1 p = 100 while True: p = p*(1 + 1/100) if p >= X: print(n) break n = n + 1
p03073
s938628762
Accepted
s = input() a = 0 b = 0 for i in range(len(s)): if i & 1: if s[i] == "0": a += 1 else: b += 1 else: if s[i] == "0": b += 1 else: a += 1 print(min(a, b))
p03435
s605037695
Accepted
a, b, c = map(int, input().split()) d, e, f = map(int, input().split()) g, h, i = map(int, input().split()) if a - b == d - e == g - h and b - c == e - f == h - i: print('Yes') else: print('No')
p02546
s851102538
Wrong Answer
S = input() a = len(S) if S[a-1] == 's': print(S[:a-1]+'es') else: print(S+'s')
p02624
s437504432
Accepted
import sys; input = sys.stdin.buffer.readline sys.setrecursionlimit(10**7) from collections import defaultdict con = 10 ** 9 + 7; INF = float("inf") def getlist(): return list(map(int, input().split())) def calc(N, p): n = int(N // p) cnt = int((n * (n + 1) * p // 2)) return cnt #処理内容 def main(): N = int(input()) ans = 0 for i in range(1, N + 1): ans += calc(N, i) print(ans) if __name__ == '__main__': main()
p02911
s999575361
Accepted
from collections import Counter import sys input = sys.stdin.buffer.readline sys.setrecursionlimit(10 ** 7) N, K, Q = map(int, input().split()) A = [int(input()) for _ in range(Q)] c = Counter(A) for i in range(1, N + 1): if Q - c[i] >= K: print("No") else: print("Yes")
p02699
s955892974
Accepted
S,W=map(int,input().split()) if W>=S: print('unsafe') else: print('safe')
p02723
s528942410
Wrong Answer
S=input() if(S[2]==S[3]): if(S[4]==S[5]): if(S[0]!=S[1]): print("Yes") else: print("No")
p02778
s149738519
Accepted
s = input() print('x'*len(s))
p02547
s782543432
Accepted
n = int(input()) d = [list(map(int, input().split()))for _ in range(n)] cnt = 0 for i, (p, q) in enumerate(d): if p == q: cnt += 1 else: cnt = 0 if cnt == 3: print("Yes") break else: print("No")
p03073
s752490860
Wrong Answer
S = input() count1 = [S[i] for i in range(len(S)) if i % 2 == 0] count2 = [S[i] for i in range(len(S)) if i % 2 != 0] point = 1 if len(S) % 2 == 0 else 0 print(min(count1.count('0')+count1.count('1')-point, count2.count('0')+count2.count('1')-point))
p03723
s650814152
Accepted
import sys input=sys.stdin.buffer.readline A,B,C = map(int,input().split()) def F(A,B,C): if any(x&1 for x in [A,B,C]): return 0 if A == B == C: return -1 return 1 + F((A+B)//2,(B+C)//2,(C+A)//2) answer = F(A,B,C) print(answer)
p02789
s264315533
Accepted
def main(): n, m = map(int, input().split()) if n == m: print("Yes") else: print("No") main()
p02957
s651663310
Wrong Answer
a,b= map(int,input().split()) if (b-a)%2==0: print((a+b)/2) else: print("IMPOSSIBLE")