problem_id
stringclasses
428 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
5
816
p02988
s719112052
Wrong Answer
n = int(input()) p = list(map(int, input().split())) ans = 0 for i in range(1, n-1): if p[i] > p[i-1] and p[i] < p[i+1]: ans += 1 print(ans)
p03379
s950448526
Wrong Answer
n=int(input()) l=list(map(int,input().split())) l.sort() a=l[n//2-1] b=l[n//2] for i in range(n//2): print(b) for j in range(n//2,n): print(a)
p03623
s229924855
Accepted
x, a, b = map(int, input().split()) if abs(a - x) > abs(b - x): print('B') else: print('A')
p04019
s882382162
Wrong Answer
s = list(set(input())) l = [["N","S"], ["W","E"], ["N", "S", "W", "E"]] if len(s) != 2 and len(s) != 4: print("No") exit() for i in l: x = 0 for j in s: if j in i: x += 1 if x == len(s): print("Yes") exit() print("No")
p02597
s135279237
Accepted
n = int(input()) C = input() len_r, len_w = 0, 0 for c in C: if c == 'R': len_r += 1 else: len_w += 1 c2 = 'R'*len_r + 'W'*len_w cnt = 0 for a, b in zip(C, c2): if a != b: cnt += 1 print(cnt//2)
p02911
s081307893
Accepted
n,k,q=map(int,input().split()) lis=[0]*n for i in range(q): a=int(input()) lis[a-1]+=1 for j in range(0,n): if k-q+lis[j]>0: print("Yes") else: print("No")
p03817
s050616583
Accepted
x = (int)(input()) temp = 0 if x % 11 != 0: if x % 11 < 7: temp = 1 else: temp = 2 print((int)(x/11) * 2 + temp)
p03637
s150698947
Accepted
_ = input() a = [int(x) for x in input().split()] odd = [] m4 = [] m2 = 0 for i in a: if i % 2 != 0: odd.append(i) elif i % 4 == 0: m4.append(i) else: m2 = 1 else: if len(odd) + m2 - 1 <= len(m4): print("Yes") else: print("No")
p03161
s751521462
Wrong Answer
n,k = list(map(int, input().split())) nums = list(map(int, input().split())) best = [99999999]*n best[0] = 0 for i in range(1,n): for j in range(1,min(i+1,k+1)): #print(i,i-j, "CHECKING", best[i-j],abs(nums[i-j]-nums[i])) best[i] = min(best[i], best[i-j]+abs(nums[i-j]-nums[i])) print(best[-1])
p03565
s398201516
Accepted
def restore(): for i in range(N - M, -1, -1): if all(s == '?' or s == t for s, t in zip(S[i:i + M], T)): ans = S[:i] + T + S[i + M:] return ''.join('a' if c == '?' else c for c in ans) return 'UNRESTORABLE' S = input() T = input() N = len(S) M = len(T) print(restore())
p02953
s899901007
Accepted
n = int(input()) h = list(map(int, input().split())) h = h[::-1] ans = '' for i in range(1, n): if h[i - 1] >= h[i]: next elif h[i] - h[i - 1] == 1: h[i] = h[i] - 1 else: ans = 'No' break if ans == '': ans = 'Yes' print(ans)
p03471
s210722641
Accepted
n,y=map(int,input().split()) for i in range(n+1): for j in range(n-i+1): if 10000*i+5000*j+1000*(n-i-j)==y: print(i,j,n-i-j) exit() print(-1,-1,-1)
p02773
s824891105
Accepted
n=int(input()) ans={"b":0} ma=0 pr=[] for i in range(n): name=input() if name in ans.keys(): ans[name]=ans[name]+1 else: ans[name]=1 for j,k in ans.items(): if k>ma: ma=k pr=[j] elif k==ma: pr.append(j) pr.sort() for l in pr: print(l)
p03077
s810571406
Wrong Answer
N = int(input()) Carry = [] for i in range(5): Carry.append(int(input())) min_num = min(Carry) if N < min_num: print(5) elif N % min_num == 0: print((N//min_num)) elif min_num == 1: print((N//min_num)+(5-Carry.index(min_num))) else: print((N//min_num)+5)
p04030
s251042690
Wrong Answer
s = list(input()) l = [] for i in range(len(s)): if s[i] == "B": try: l[i-1] = "" except: pass else: l.append(s[i]) print("".join(l))
p03067
s556818426
Wrong Answer
a,b,c=map(int,input().split()) if(a<b and b<c): print('Yes') else: print('No')
p03360
s434721839
Accepted
a = sorted(list(map(int, input().split()))) k = int(input()) a[-1] = 2**k*a[-1] print(sum(a))
p02862
s217939557
Accepted
import sys x,y=map(int,input().split()) if (x+y)%3 != 0: print(0) sys.exit() tmp=(x+y)//3 x=x-tmp y=y-tmp sosu=10**9+7 if x<0 or y<0: print(0) sys.exit() def combination(x,y): n=x+y r=min(x,y) upper=1 lower=1 for i in range(r): upper=(upper*(n-i))%sosu lower=(lower*(i+1))%sosu return (upper * pow(lower,sosu-2,sosu))%sosu print(combination(x,y))
p03243
s572502222
Wrong Answer
N=int(input()) for i in range(1,10): if 111*i<=N: print(111*i) break
p03637
s604849240
Wrong Answer
n = int(input()) a = list(map(int, input().split())) one = 0 two = 0 four = 0 for x in a: if x % 4 == 0: four += 1 elif x % 2 == 0: two += 1 else: one += 1 if (two != 1 and four >= one - 1) or four >= one+two-1 or one == 0: print("Yes") else: print("No")
p03672
s310558907
Accepted
s=input() for i in range(len(s)): s=s[:-2] if s[:len(s)//2]==s[len(s)//2:]: print(len(s)) break
p03254
s616031847
Accepted
N, X = map(int, input().split()) A = list(map(int, input().split())) A.sort() cnt=0 for i in range(N): if A[i]<=X: X-=A[i] cnt+=1 else: break if X>0 and cnt==N: cnt-=1 print(cnt)
p02663
s186890663
Accepted
h1,m1,h2,m2,K=map(int, input().split()) x1=h1*60+m1 x2=h2*60+m2 print(x2-x1-K)
p03087
s802146653
Accepted
n,q=map(int,input().split()) s=input() t=[0]*(n+1) for i in range(n-1): t[i+1]=t[i]+(1 if s[i:i+2]=="AC" else 0) for i in range(q): l,r=map(int,input().split()) print(t[r-1]-t[l-1])
p02946
s760139623
Accepted
K,X=map(int,input().split()) a=X-K+1 b=X+K while a<b: print(a,end=" ") a+=1
p02753
s279984946
Wrong Answer
s=str(input()) if s=='AAA' or 'BBB': print('No') else: print('Yes')
p02727
s431853366
Wrong Answer
from collections import Counter,defaultdict,deque from heapq import heappop,heappush,heapify import sys,bisect,math,itertools,fractions,pprint sys.setrecursionlimit(10**8) mod = 10**9+7 INF = float('inf') def inp(): return int(sys.stdin.readline()) def inpl(): return list(map(int, sys.stdin.readline().split())) a,b,X,Y,Z = inpl() x = sorted(inpl(), reverse = True) y = sorted(inpl(), reverse = True) z = sorted(inpl(), reverse = True) apples = x + y + z apples.sort(reverse = True) print(sum(apples[:a+b]))
p03041
s753687236
Wrong Answer
Big=["A","B","c"] Small=["a","b","c"] N,K=map(int,input().split()) S=list(input()) for i in range(3): if S[K-1]==Big[i]: S[K-1]=Small[i] print("".join(S))
p02693
s467910791
Accepted
K=int(input()) a,b=map(int,input().split()) ans=0 for i in range(a,b+1): if i%K==0: ans+=1 if ans>=1: print("OK") else: print("NG")
p02882
s284978757
Wrong Answer
import numpy as np a, b, x = map(float, input().split()) print(np.degrees(np.arctan((2.0*(np.power(a, 2.0)*b-x))*np.power(a, -3.0))))
p02570
s346894079
Accepted
d, t, s = map(int, input().split()) if d <= s*t: print("Yes") else: print("No")
p03665
s906201684
Accepted
n, p = map(int, input().split()) a = list(map(int, input().split())) is_odd = False for ai in a: if ai % 2 == 1: is_odd = True break if is_odd: ans = 2 ** (n - 1) else: if p == 0: ans = 2 ** n else: ans = 0 print(ans)
p03457
s663343154
Accepted
N = int(input()) Sorted = [list(map(int, input().split())) for _ in range(N)] Sorted.insert(0, [0, 0, 0]) for i in range(N): d = abs(Sorted[i+1][1] - Sorted[i][1]) + abs(Sorted[i+1][2] - Sorted[i][2]) t = Sorted[i+1][0] - Sorted[i][0] if d > t or d % 2 != t % 2: print("No") break else: print("Yes")
p03210
s572431049
Accepted
x = int(input()) if x == 3 or x == 5 or x == 7: print("YES") else: print("NO")
p02916
s392297302
Accepted
import os, sys, re, math N = int(input()) A = [int(n) for n in input().split()] B = [int(n) for n in input().split()] C = [int(n) for n in input().split()] s = 0 for i in range(N): s += B[A[i] - 1] if i > 0 and A[i - 1] == A[i] - 1: s += C[A[i - 1] - 1] print(s)
p03632
s471998440
Accepted
a, b, c, d = map(int, input().split()) print(max(min(b, d) - max(a, c), 0))
p02917
s896993684
Accepted
n = int(input()) B = list(map(int, input().split())) ans = B[0]+B[n-2] for i in range(n-2): ans += min(B[i],B[i+1]) print(ans)
p02696
s807954234
Accepted
a, b, n = map(int, input().split()) if n < b: x = n print(int(a * x / b) - a * int(x / b)) else: x = b - 1 print(int(a * x / b) - a * int(x / b))
p03038
s830104654
Wrong Answer
n,m=map(int,input().split()) a=sorted(map(int,input().split())) l=list() for i in range(m): l.append(list(map(int,input().split()))) l.sort(key=lambda x:-x[1]) i=0 for b,c in l: for j in range(b): if i+j<n and a[i+j]<c: a[i+j]=c else: exit() i+=b print(sum(a))
p03107
s442015848
Wrong Answer
L = list(input()) i = 0 cnt = 0 for _ in range(len(L)): if ''.join(L[i:i+2]) == '01' or ''.join(L[i:i+2]) == '10': for j in range(i,i+2): L.pop(i) cnt += 1 i = 0 else: i += 1 print(cnt)
p02608
s350034458
Accepted
import math N = int(input()) ans = [0 for _ in range(10050)] for x in range(1, 100): for y in range(1, 100): for z in range(1, 100): a = x**2+y**2+z**2+x*y+y*z+z*x if a < 10050: ans[a] +=1 for i in range(N): print(ans[i+1])
p02612
s918776101
Accepted
n = int(input()) for i in range(1, 11): if 1000*i-n>=0: print(1000*i-n) break
p03665
s344043629
Accepted
n, p, *a = map(int, open(0).read().split()) odd = [i for i in a if i%2 == 1] if len(odd) == 0: if p == 0: print(2**n) else: print(0) else: print(2**(n -1))
p02690
s802213100
Accepted
N=int(input()) for A in range(-118,120): for B in range(-119,119): if A**5-B**5==N: print(A,B) exit()
p03524
s666960719
Accepted
S = input() print('YES' if max(S.count('a'),S.count('b'),S.count('c'))-min(S.count('a'),S.count('b'),S.count('c')) < 2 else 'NO')
p03625
s340847815
Accepted
n = int(input()) a = list(map(int,input().split())) a.sort(reverse=True) s = set() s.add(0) s.add(-1) for i in range(n-1): if a[i] == a[i+1]: s.add(a[i]) m = max(s) s.discard(m) k = max(s) if a.count(m) > 3: print(m**2) else: print(m*k)
p02970
s521940009
Accepted
import math n, d = map(int, input().split()) print(math.ceil(n/(d*2+1)))
p02613
s921525451
Wrong Answer
N = int(input()) ACcount = 0 WAcount = 0 TLEcount = 0 REcount = 0 for i in range(N): S=input() if S == "AC": ACcount = ACcount + 1 elif S == "WA": WAcount = WAcount + 1 elif S == "TLE": TLEcount = TLEcount + 1 elif S == "RE": REcount = REcount + 1 print("AC x " + str(ACcount)) print("WA x " + str(WAcount)) print("TLE x " + str(TLEcount)) print("RE x " + str(REcount))
p02601
s615085166
Accepted
#Problem B A,B,C = map(int, input().split()) K = int(input()) for i in range(K): if A >= B: B *= 2 elif B > A: if B >= C: C *= 2 elif B < C: pass else: pass if A < B and B < C: print("Yes") else: print("No")
p03795
s158539794
Wrong Answer
x = int(input()) print(x*1500 - (x//15)*200)
p02970
s553274152
Accepted
import sys import math N, D = map(int, input().split()) print(math.ceil(N / (1 + 2 * D)))
p02963
s875307274
Wrong Answer
s = int(input()) print(0,0,10**9,1,s%10**9,s//10**9)
p03339
s190411738
Wrong Answer
N = int(input()) S = list(input()) cumsum = [0]*N if S[0] == 'E': cumsum[0] += 1 for i in range(1, N): if S[i] == 'E': cumsum[i] += cumsum[i-1] + 1 else: cumsum[i] += cumsum[i-1] ans = float('inf') ans = min(ans, cumsum[-1]-cumsum[0]) for i in range(1, N): tmp = (i) - (cumsum[i-1] - cumsum[0]) tmp += (cumsum[-1]-cumsum[i]) ans = min(ans, tmp) print(ans)
p03951
s095186108
Accepted
# agc006_a.py N = int(input()) S = list(input()) T = list(input()) ans = N*2 for i in range(N): # print(i,S[N-1-i:] , T[:i+1]) if S[N-1-i:] == T[:i+1]: # print("find") ans = N*2-(i+1) print(ans)
p03067
s937192944
Accepted
a,b,c=map(int,input().split()) print("Yes" if (a<c and c<b) or (b<c and c<a) else "No")
p03351
s051436464
Accepted
a,b,c,d=map(int,input().split()) if ((abs(b-a)<=d)&(abs(c-b)<=d))|(abs(c-a)<=d): print("Yes") else: print("No")
p02615
s107592906
Accepted
n = int(input()) A = list(int(x) for x in input().split()) A.sort(reverse=True) if n == 2: print(A[0]) exit() ans = A[0] for i in range(2, n): ans += A[i//2] print(ans)
p03971
s090523950
Wrong Answer
inp=input().split() N,A,B=[int(n) for n in inp] S=input() total=0 total2=0 for i,s in enumerate(S): if s=='a': if total<A+B: print('Yes') else: print('No') total +=1 elif s=='b': if total<A+B and total2<=B: print('Yes') total2+=1 else: print('No') total +=1 else: print('No')
p03821
s850222742
Wrong Answer
n=int(input()) a=[] rn=0 cnt=0 for i in range(n): b,c=map(int,input().split()) a.append([b,c]) a=a[::-1] print(a) for i in range(n): b,c=a[i] b+=cnt cnt+=(c-b%c)%c print(cnt)
p02743
s747625334
Accepted
a,b,c = [int(x) for x in input().split()] if c - a - b < 0: print("No") elif 4 * a * b < (c - a - b) ** 2: print("Yes") else: print("No")
p03556
s227596595
Accepted
n=int(input()) ans=(int(n**0.5))**2 print(ans)
p03721
s130079246
Wrong Answer
n, k = map(int, input().split()) i = 0 d = {} for _ in range(n): a,b = map(int, input().split()) if a in d: d[a] += b else: d[a] = b key_l = list(d.keys()) key_l.sort() ans = d[key_l[-1]] for key in key_l: if i<k: i += d[key] else: ans = key break print(ans)
p02760
s513542009
Accepted
A = [list(map(int, input().split())) for i in range(3)] N = int(input()) m = [[0]*3 for i in range(3)] ans,l,r = 0,0,0 for _ in range(N): b = int(input()) for i in range(3): if b in A[i]: m[i][A[i].index(b)]=1 for i in range(3): t = sum(m[i]) l += m[i][i] y = 0 for j in range(3): y += m[j][i] if i+j == 2: r += m[i][j] if t==3 or y==3 or r==3 or l==3: ans=1 print('Yes' if ans else 'No')
p03659
s308341562
Wrong Answer
N=int(input()) A=list(map(int,input().split())) s=[0]*(N+1) for i in range(N): s[i + 1]=s[i]+A[i] C=[0]*(N);C[0]=abs(A[0]-(s[N]-s[1]));x=10**9;p=0 for i in range(1,N): if N-i==1: break else: C[i]=abs(C[i-1]+A[i]-(s[N]-s[i])) if x>C[i]: x=C[i] p=i print(abs(C[p-1]+A[p]-(s[N]-s[p])))
p03951
s967715922
Accepted
n = int(input()) s = input() t = input() lt = min(len(s), len(t)) i = -1 overlap = 0 for i in range(lt): if s[-(i + 1):] == t[:i + 1]: overlap = i + 1 if lt >= 2 and s[-(i + 2):] != t[:i + 2]: break ans = max(n, len(s) + len(t) - overlap) print(ans)
p04044
s256023600
Accepted
# -*- coding: utf-8 -*- n, l = map(int,input().split()) s = [] for i in range(n): s.append(str(input())) s.sort() ans = "" for i in range(n): ans += s[i] print(ans)
p03001
s414517288
Wrong Answer
# 点(x, y)から長方形の中心を通る直線を引くと面積を半分にすることができ、分割された小さい方の面積が最大となる # 点(x, y)が長方形の中心と一致する場合、直線は複数存在する w, h, x, y = map(int, input().split()) s = w * h s_min = s / 2 # 中心 a = w / 2 b = w / 2 divide = 0 if x == a and y == b: divide = 1 print(s_min, divide) else: print(s_min, divide)
p03803
s806689942
Accepted
a, b = map(int, input().split()) if a == b: print('Draw') elif a == 1: print('Alice') elif b == 1: print('Bob') elif a > b: print('Alice') else: print('Bob')
p03327
s329567297
Accepted
n = int(input()) if n > 999: print("ABD") else: print("ABC")
p03838
s814078068
Accepted
x,y=map(int,input().split()) ans=10**12 if x<=y: ans=min(ans,y-x) if -x<=y: ans=min(ans,y+x+1) if x<=-y: ans=min(ans,-y-x+1) if -x<=-y: ans=min(ans,-y+x+2) print(ans)
p02676
s184373413
Wrong Answer
K=int(input()) S=input() s=list(S) if len(s) < K: print(S) else: print(s[0:(K-1):1],"...")
p02988
s858001922
Accepted
n = int(input()) P = list(map(int,input().split())) cnt = 0 for i in range(1,n-1): if P[i-1]<P[i]<P[i+1] or P[i-1]>P[i]>P[i+1]: cnt += 1 print(cnt)
p02584
s725334541
Accepted
x, k, d = map(int, input().split()) ans = 0 if k * d < abs(x): if x >= 0: ans = x - k*d else: ans = x + k*d print(abs(ans)) exit() xd = x // (2*d) if k % 2: tmp = x - 2*d*xd l = [abs(tmp-d), abs(tmp+d), abs(tmp+3*d)] ans = min(l) else: tmp = x - 2*d*xd l = [abs(tmp-2*d), abs(tmp), abs(tmp+2*d)] ans = min(l) print(ans)
p03000
s265041965
Wrong Answer
n,x=map(int,input().split()) l=[int(x) for x in input().split()] ans=0 s=0 for ll in l: if s <= x: ans+=1 s+=ll print(ans)
p03486
s944155527
Accepted
s = input() t = input() s = list(s) t = list(t) s.sort() t.sort(reverse=True) s = ''.join(s) t = ''.join(t) if s < t: print('Yes') else: print('No')
p02584
s991374698
Wrong Answer
X,K,D = map(int, input().split()) for i in range(K): if X>=0: X -= D else: X += D if abs(X)<=D/2: break x = abs(X) print(x)
p02959
s765123525
Wrong Answer
N=int(input()) A=list(map(int,input().split())) B=list(map(int,input().split())) cnt=0 for i in range(N): cnt+=min(A[i]+A[i+1],B[i]) print(cnt)
p03419
s212783592
Accepted
N,M = map(int,input().split()) if N == 2 or M == 2: Ans = 0 elif N == 1 or M == 1: if not N == M: Ans = max(N,M)-2 else: Ans = 1 else: Ans = (N-2)*(M-2) print(Ans)
p03220
s533541385
Accepted
N=int(input()) T,A=map(int,input().split()) S=list(map(int,input().split())) mini=16777216 mininum=0 for i in range(N): if abs(T-0.006*S[i]-A)<mini: mini=abs(T-0.006*S[i]-A) mininum=i+1 print(mininum)
p03262
s071535384
Accepted
from fractions import gcd n,x=map(int,input().split()) l=list(map(int,input().split()))+[x] l.sort() ans=l[1]-l[0] for i in range(2,n+1): sa=l[i]-l[i-1] ans=gcd(ans,sa) print(ans)
p02795
s048186641
Wrong Answer
h=int(input()) w=int(input()) n=int(input()) print((n-1)//max(h,w)+2)
p02748
s675743073
Wrong Answer
# coding: utf-8 A, B, M = map(int, input().split()) # print("A:", A, "B:", B, "M:", M) a = list(map(int, input().split())) # print("a:", a) b = list(map(int, input().split())) # print("b:", b) z = [list(map(int, input().split())) for _ in range(M)] num1 = a[0] + b[0] for i in range(M): # print("z[i]:", z[i]) x, y, c = z[i] # print("x:", x, "y:", y, "c:", c) num = a[x - 1] + b[y - 1] - c # print(num) if num < num1: num1 = num print(num1)
p02786
s872768016
Accepted
h=int(input()) n=0 for i in range(10**12): if h<2**i: n=i-1 break ans=1 for i in range(1,n+1): ans+=2**i print(ans)
p02687
s367036609
Accepted
s = input() if s == "ABC": print("ARC") else: print("ABC")
p03637
s744111297
Accepted
n=int(input()) a=list(map(int,input().split())) f=0 t=0 z=0 for i in range(n): if a[i]%4==0: f+=1 elif a[i]%2==0: t+=1 else: z+=1 flg=False if t==0 and z-1<=f: flg=True if z<=f and t>0: flg=True if flg: print("Yes") else: print("No")
p02717
s764007769
Wrong Answer
num=input() num=num.split() print(num[2]+num[0]+num[1])
p03543
s409958235
Accepted
import sys n = input() for i in range(2): if n[i]==n[i+1] and n[i]==n[i+2]: print("Yes") sys.exit() print("No")
p02818
s467753849
Wrong Answer
def main(): a, b, k = list(map(int, input().split())) a = a - k if a < 0: k = a * -1 a = 0 else: k = k - a b = b - k if b > 0 else 0 print(a, b) if __name__ == '__main__': main()
p02711
s019526120
Accepted
str = input() if '7' in str: print("Yes") else: print("No")
p02881
s673447235
Wrong Answer
# 2020/01/23 # AtCoder Beginner Contest 144 - C # Input n = int(input()) nsq = int(n ** (1/2)) + 1 x = nsq y = nsq while x >= 1: wkn = x * y if n == wkn: ans = (x - 1) + (y - 1) break elif n > wkn: y = y + 1 else: x = x - 1 # Output print(ans)
p03206
s753879111
Wrong Answer
D = int(input()) print('Chrismas' + " Eve"*(25-D))
p02630
s489409273
Accepted
from collections import Counter n=int(input()) a=list(map(int,input().split())) cnt=Counter(a) ans=sum(a) q=int(input()) for i in range(q): b,c=map(int,input().split()) ans+=(c-b)*cnt[b] cnt[c]+=cnt[b] cnt[b]=0 print(ans)
p02690
s488417864
Accepted
x = int(input()) for i in range(-1000,1000): for j in range(-1000,1000): if i**5 - j**5 == x: print(i,j) quit()
p02987
s843203533
Accepted
S = list(input()) res = list(set(S)) if(len(res) == 2): print('Yes') else: print('No')
p03243
s854110617
Wrong Answer
N = int(input()) for i in range(0,112): N = N+i n = list(str(N)) if n[0] == n[1] == n[2]: print(N)
p02918
s340596110
Wrong Answer
(N,K) = map(int,input().split()) S = input() dan = 1 for i in range(N-1): if S[i] != S[i+1]: dan += 1 if 2*K >= (dan-1): print(N) else: print(N-dan+2*K)
p03698
s287775748
Accepted
N=input() if len(N)==len(set(N)): print("yes") else: print("no")
p03289
s451683813
Wrong Answer
import sys def input(): return sys.stdin.readline().rstrip() def main(): S = list(input()) isWA = False if S[0] != 'A': isWA = True if S[2:-2].count('C') != 1: isWA = True for s in S: if s == 'A' or s == 'C': continue if s.isupper(): isWA = True if isWA: print('WA') else: print('AC') if __name__ == '__main__': main()
p03345
s901269382
Accepted
a,b,c,k = map(int,input().split()) if k%2 == 0: print(a-b) else: print(b-a)
p03605
s723765632
Wrong Answer
N = str(input()) if "9" == N[0]: if "9" == N[1]: print( "YES" ) else: print( "NO" )