problem_id
stringclasses
428 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
5
816
p02705
s235955967
Accepted
import math #from functools import reduce # import math # import itertools # import statistics # import numpy as np # import collections n = int(input()) # l, r = list(map(int, input().split())) # b = list(map(int, input().split())) print(n*2*math.pi)
p02598
s555203116
Accepted
N, K = map(int, input().split()) A = sorted(list(map(int, input().split()))) L, R = 0, A[-1] while R - L > 1: mid = L + (R - L) // 2 if sum([(a - 1) // mid for a in A]) <= K: R = mid else: L = mid print(R)
p03107
s180055346
Accepted
S = input() l = len(S) a = S.count('0') print(2 * min(a, l - a))
p02578
s462339872
Wrong Answer
n=int(input()) a=list(map(int,input().split())) an =0 ki=a[0] for i in range(n-1): wk=a[i]-a[i+1] if wk<0: an+=abs(wk) ki-=wk print(an)
p03328
s254422831
Accepted
a,b = map(int,(input().split())) x = b - a #塔の高さの差分 result = 0 for i in range(x+1): result += i print(result - b)
p03095
s646562764
Accepted
#解説参照済み n=int(input()) a=list(input()) from collections import defaultdict d=defaultdict(int) for i in a: d[i]+=1 cnt=[] for i in d.values(): cnt.append(i+1) ans=1 mod=10**9+7 for i in cnt: ans*=i ans%=mod print(ans-1)
p02596
s529772230
Wrong Answer
import sys def input(): return sys.stdin.readline().strip() def mapint(): return map(int, input().split()) sys.setrecursionlimit(10**9) K = int(input()) cnt = 0 now = 0 if K%2==0: print(-1) exit() s = set([0]) for _ in range(10**6+5): now += pow(10, cnt, K)*7 now %= K if now in s: print(cnt) break s.add(now) cnt += 1 else: print(-1)
p03994
s266751628
Accepted
s=input() n=int(input()) l="" for i in range(len(s)): f=(26+ord("a")-ord(s[i]))%26 if n>=f:n-=f;l+="a" else:l+=s[i] if n==0:print(l+s[i+1:]);exit() print(l[:-1]+chr(ord(l[-1])+n%26))
p02814
s697992501
Accepted
n,m=map(int,input().split()) a=list(map(int,input().split())) def gcd(a,b): while b:a,b=b,a%b return a def lcm(a,b):return a*b//gcd(a,b) l=a[0]//2 ll=a[0] for i in range(1,n): if a[i]%2:odd=True else:even=True l=lcm(l,a[i]//2) ll=lcm(ll,a[i]) if l>m:print(0);exit() for i in range(n): if l%a[i]==0:print(0);exit() print((m-l)//ll+1)
p03997
s713250448
Accepted
a = int(input()) b = int(input()) h = int(input()) print(((a+b)*h)//2)
p03416
s400857955
Wrong Answer
def main(): a, b = map(int, input().split()) print(b-a) ans = (b-a)//100 if int(str(a)[-2:]) <= int(str(a)[:1]) and int(str(b)[-2:]) <= int(str(b)[1:]): ans += 1 print(ans) if __name__ == "__main__": main()
p03434
s413862379
Wrong Answer
N=int(input()) a=list(map(int, input().split())) a.sort() Alice=0 Bob=0 for i in range(N): if i%2==0: Alice += a[i] else: Bob += a[i] print(Alice-Bob)
p02657
s506594028
Wrong Answer
a, b = map(int, input().split()) print(a + b)
p03623
s727443643
Wrong Answer
x,a,b=map(int,input().split()) print(min(abs(a-x),abs(b-x)))
p02595
s913990583
Accepted
import math N, D = map(int, input().split()) points = [] count =0 for i in range(N): X, Y = map(int, input().split()) if D >= math.sqrt(X ** 2 + Y ** 2): count += 1 print(count)
p02935
s900216396
Accepted
def main(): n = int(input()) v = list(map(int, input().split())) if len(v) == 1: return v = sorted(v, reverse=True) ans = (v.pop() + v.pop()) / 2 while v != []: v = sorted(v, reverse=True) ans = (ans + v.pop()) / 2 print(ans) if __name__ == '__main__': main()
p03679
s580269184
Wrong Answer
a,b,c=map(int,input().split()) c -= b if c > 0 and c < a: print('safe') elif c <= 0: print('delicious') else: print('gangerous')
p03160
s453307152
Accepted
n=int(input()) h=list(map(int,input().split())) res=[-1]*n res[0]=0 res[1]=abs(h[0]-h[1]) for i in range(2,n): res[i]=min(abs(h[i-1]-h[i])+res[i-1],abs(h[i-2]-h[i])+res[i-2]) print(res[-1])
p02729
s895278944
Accepted
n,m = map(int,input().split()) s = n*(n-1) // 2 t = m*(m-1) // 2 print(s + t)
p03208
s929737287
Accepted
n, k = map(int, input().split()) tree = [] for i in range(n): h = int(input()) tree.append(h) tree.sort() ans = 10**9 for i in range(n - k+1): t = tree[i+k-1]-tree[i] if ans > t: ans = t print(ans)
p02631
s772915273
Accepted
n = int(input()) a = list(map(int, input().strip().split())) x = 0 for i in range(n): x = x ^ a[i] #print(bin(c)) #x = int(x, 2) for i in range(n): ans = a[i] ^ x if i < n - 1: print(ans,end=' ') else: print(ans)
p03219
s470689169
Accepted
x,y=map(int,raw_input().split()) print x+y/2
p03943
s803842372
Wrong Answer
a,b,c = [int(i) for i in input().split()] if a == b or b == c or a == c: print("Yes") elif a == b+c or b == a+c or c == a+b: print("Yes") else: print("No")
p02697
s756388796
Accepted
inf = 10**15 mod = 10**9+7 n,m = map(int, input().split()) tmp = n//2 for i in range(m): if i % 2 == 0: print('{} {}'.format(tmp-i//2, tmp+1+i//2)) else: print('{} {}'.format(1+i//2, n-i//2-1))
p02861
s478879022
Accepted
import itertools import math n=int(input()) l=[list(map(int,input().split())) for _ in range(n)] distance=[] f=list(itertools.permutations(list(range(1,n+1)))) for i in range(len(f)): length=0 for j in range(1,n): length+=math.sqrt((l[f[i][j]-1][0]-l[f[i][j-1]-1][0])**2+(l[f[i][j]-1][1]-l[f[i][j-1]-1][1])**2) distance.append(length) print(sum(distance)/len(distance))
p03408
s941513123
Accepted
n=int(input()) s=[] t=[] for _ in range(n): s.append(input()) m=int(input()) for _ in range(m): t.append(input()) point=[None]*100 max_point=0 for i in range(len(s)): point_s=s.count(s[i]) point_t=-1*t.count(s[i]) point_sum=point_s+point_t max_point=max(max_point,point_sum) print(max_point)
p03264
s767289863
Wrong Answer
k=int(input()) if k%2==0:print(int((k/2)**2)) else:print(int((k/2)*(k-1)/2))
p03994
s055615462
Accepted
S=list(input()) k=int(input()) Ans=[0]*len(S) c=0 for i in range(len(S)): if (26-(ord(S[i])-97))%26<=k: Ans[i]="a" k=k-(26-(ord(S[i])-97))%26 c=c+(26-(ord(S[i])-97))%26 else: Ans[i]=S[i] if i==len(S)-1: c=ord(Ans[i])+k%26 if ord(Ans[i])+k%26>=123: c=c-26 Ans[i]=chr(c) print("".join(Ans))
p03456
s800004503
Accepted
import math a, b = list(map(int, input().split())) n = int(str(a) + str(b)) _n = int(math.sqrt(n)) if _n ** 2 == n: print('Yes') else: print('No')
p02552
s217478623
Wrong Answer
# D - Redistribution S = int(input()) MOD = 10**9+7 # dp[i]: 3 以上の数字で i を作る組み合わせ dp = [0]*(S+1) if S <= 2: print(0) elif S <= 5: print(1) else: # 初期条件 dp[3],dp[4],dp[5] = 1,1,1 # i を作る組合わせ for i in range(6,S+1): dp[i] = dp[i-2] + dp[i-3] + dp[i-4] ans = (dp[S])%MOD print(ans)
p03633
s336372522
Wrong Answer
def gcd(a, b): if(a == 0): return b return gcd(b % a, a) def lcm(a, b): return (a * b) / gcd(a, b) t = int(input()) ans = 1 while(t != 0): t -= 1 n = int(input()) if(ans < 10000000000000000000): ans = lcm(ans, n) print(int(ans))
p02780
s518967814
Wrong Answer
N, K = map(int, input().split()) P = list(map(int, input().split())) def expect(p): return (1+p)/2 maxV = sum([expect(p) for p in P[:K]]) for i in range(N-K): maxV = max(maxV, maxV - expect(P[i]) + expect(P[i+K])) print(maxV)
p03493
s782775159
Wrong Answer
s = list(input()) s.count(1)
p02705
s322984659
Accepted
import math print(2*int(input())*math.pi)
p02548
s406220650
Accepted
N=int(input()) ans=0 for i in range(1,N): for j in range(1,N): if i*j<N: ans+=1 else: break print(ans)
p02832
s965901093
Wrong Answer
n = int(input()) a_inputs = [int(i) for i in input().split()] a_only = list(set(a_inputs)) ans=0 count=0 for i in range(len(a_inputs)): if a_inputs[i]==(count+1): count+=1 continue else: ans+=1 if a_inputs==a_only: print(0) if 1 not in a_inputs: print(-1) else: print(ans)
p03761
s827454471
Accepted
from collections import Counter as co n=int(input()) s=set(list("qazwsxedcrfvtgbyhnujmiklop")) l=[500 for i in range(26)] for i in range(n): gr=sorted([a for a in co(input()).items()]) vs=set([a for a in zip(*gr)][0]) for t in s-vs: l[ord(t)-97]=0 if sum(l)==0:print();exit() for v, coun in gr: fg=ord(v)-97 l[fg]=min(l[fg],coun) s&=vs ans="" for i,c in enumerate(l): if c: f=chr(i+97) ans+=f*c print(ans)
p02971
s941858711
Wrong Answer
N = int(input()) A = [int(input()) for a in range(N)] maxnum = max(A) maxcount = A.count(maxnum) s = sorted(A) if maxcount == 1: index = A.index(maxnum) ans = [maxnum] * N ans[index] = s[1] else: ans = [maxnum] * N for a in ans: print(a)
p03408
s077426228
Accepted
N = int(input()) words = {} for _ in range(N): s = input() if s in words: words[s] += 1 else: words[s] = 1 M = int(input()) for _ in range(M): t = input() if t in words: words[t] -= 1 val = sorted(words.values()) if val: if val[-1] < 0: print(0) else: print(val[-1]) else: print(0)
p03250
s426771018
Accepted
A,B,C=map(int,input().split()) print(max([10*A+B+C,A+10*B+C,A+B+10*C]))
p02958
s099361564
Accepted
n=int(input()) p=list(map(int,input().split())) k=0 a=[0]*n for i in range(n): a[i]=i+1 for i in range(n): if a[i]!=p[i]: k+=1 if k<=2: print('YES') else: print('NO')
p02706
s782180193
Accepted
n, m = list(map(int, input().split())) homework = [int(i) for i in input().split()] for i in homework: n -= i if n >= 0: print(n) else: print(-1)
p03035
s659471390
Accepted
a, b = map(int, input().split()) print(b if a >= 13 else 0 if a <= 5 else b//2)
p03962
s567113985
Wrong Answer
a = input().split() num = 3 if a[0] == a[1]: num = num - 1 if a[0] == a[2]: num = num - 1 elif a[1] == a[2]: num = num - 1 print(num)
p03814
s655186626
Wrong Answer
l = list(input()) for i in range(len(l)): if l[i] == "A": a = i break for i in range(len(l)): if l[-1-i] == "Z": b = i break print(b-a+1)
p03059
s115180833
Wrong Answer
a,b,c=map(int,input().split()) d=0 e=1 while 1: if c+0.5>a: a*=e e+=1 d+=b else: break print(d)
p02675
s954121696
Accepted
n = input() last = n[-1] if last == "2" or last == "4" or last == "5" or last == "7" or last == "9": print('hon') elif last == last == "0" or last == "1" or last == "6" or last == "8": print('pon') else: print('bon')
p02753
s447144686
Accepted
S=input() a=S[0] z=0 for i in range(len(S)): if a==S[i]: a=S[i] else: z=1 if z==0: print('No') else: print('Yes')
p03543
s241905928
Accepted
N = input() if (N[0] == N[1] and N[1] == N[2]) or (N[1] == N[2] and N[2] == N[3]): print('Yes') else: print('No')
p03723
s036191770
Wrong Answer
a, b, c = map(int, input().split()) if a == b == c: if a % 2 == 0: print(-1) else: print(1) else: ans = 0 while a % 2 == 0 and b % 2 == 0: a1 = a b1 = b c1 = c a = (b1+c1)/2 b = (a1+c1)/2 c = (a1+b1)/2 ans += 1 print(ans)
p03038
s339621762
Accepted
from collections import defaultdict n,m=map(int,input().split()) a=list(map(int,input().split())) d=defaultdict(int) a.sort() for i in range(m): b,c=map(int,input().split()) d[c]+=b d_sorted=sorted(d.items(),reverse=True, key=lambda x:x[0]) l=[] for i,j in d_sorted: for k in range(j): l.append(i) if len(l)>n: break else: continue break for i in range(min(n, len(l))): a[i]=max(a[i],l[i]) print(sum(a))
p03324
s494160795
Accepted
d, n = map(int, input().split()) if d == 0: if n == 100: print(101) else: print(n) elif d == 1: if n == 100: print(10100) else: print(100*n) elif d == 2: if n == 100: print(1010000) else: print(10000*n)
p02598
s392684913
Wrong Answer
import heapq from fractions import Fraction import math def solve(): N, K = map(int, input().split()) A = list(map(lambda a: Fraction(-int(a), 1), input().split())) heapq.heapify(A) for _ in range(K): a = heapq.heappop(A) heapq.heappush(A, Fraction(a.numerator, a.denominator + 1)) ans = -heapq.heappop(A) print(math.ceil(ans)) solve()
p03838
s072590342
Wrong Answer
x, y = map(int, input().split()) x_, y_ = x, y ans = 0 def sign(n): if n == 0: return 0 else: return int(n / abs(n)) if abs(x) > abs(y): if x > 0: x_ = -x_ ans += 1 else: if x < 0: x_ = -x_ ans += 1 ans += abs(abs(x) - abs(y)) x_ += ans if sign(x_) != sign(y): ans += 1 print(ans)
p02676
s504852850
Accepted
K=int(input()) S=input() length=len(S) if length <= K: print(S) else: print(S[:K]+"...")
p02784
s926562535
Wrong Answer
h, n = map(int, input().split()) a = input() alst = [] for i in a.split(): alst.append(int(i)) if sum(alst) > int(h): print("Yes") else: print("No")
p02829
s809322254
Wrong Answer
a = int(input()) b = int(input()) print(6 - a + b)
p02723
s793161982
Accepted
S = input() if S[2] == S[3] and S[4] == S[5]: print('Yes') else: print('No')
p03360
s484343346
Accepted
a=list(map(int,input().split())) k=int(input()) b=max(a) for i in range(k): b*=2 print(sum(a)-max(a)+b)
p03331
s110863184
Accepted
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()) ans = float("inf") for i in range(1, n): a,b = i, n-i ans = min(ans, sum(map(int, str(a)))+sum(map(int, str(b))) ) print(ans)
p03407
s908022597
Wrong Answer
A, B, C = map(int, input().split()) if A + B <= C: print("Yes") else: print("No")
p02601
s244422624
Wrong Answer
A, B, C = list(map(int, input().split())) K = int(input()) c = 0 while A >= B: B *= 2 c += 1 # if c >= K: # break while B >= C: C *= 2 c += 1 # if c >= K: # break print(A) print(B) print(C) if c > K: ans = "No" else: ans = "Yes" print(ans)
p02802
s430675343
Accepted
N, M = map(int, input().split()) cleared = [0 for i in range(N)] wrong = [0 for i in range(N)] penalty = 0 for i in range(M): p, s = map(str, input().split()) p = int(p) - 1 if cleared[p] == 1: continue if s == "AC": cleared[p] = 1 penalty += wrong[p] else: wrong[p] += 1 print(sum(cleared), penalty)
p03696
s130903857
Wrong Answer
n = int(input()) s = input().split(")(") l = "" ans = "" for i in range(len(s)): if len(s) != 1: if i % 2 == 0: s[i] += ")" else: s[i] = "(" + s[i] R = s[i].count(")") L = s[i].count("(") if R < L: ans += s[i] + ")" * (L-R) elif L < R: ans += s[i] l += "(" * (R-L) else: ans += s[i] print(l + ans)
p02642
s618804837
Wrong Answer
n = int(input()) a = sorted([int(each) for each in input().split()]) if len(set(a)) == 1: print(0) else: counter = 1 for i in range(1, n): for j in range(i): if i == j: continue if a[i]/a[j] == a[i]//a[j]: break else: # print(i, j) counter += 1 print(counter)
p03632
s073718463
Wrong Answer
a, b, c, d = map(int, input().split()) s = [a, b, c, d] s = sorted(s) if b >= c: print(s[2] - s[1]) else: print(0)
p03105
s559060954
Wrong Answer
#!/usr/bin/python input_data = list(map(int,input().split())) d1 = input_data[0] d2 = input_data[1] d3 = input_data[2] total = 0 d4 = d2 % d1 if d4 > d3: total += 1 print(total)
p02879
s125675275
Wrong Answer
a,b=map(int,input().split()) if (a>10 or b>10 or b<=0 or a<=0) : print(-1) else: print(a*b)
p02801
s315954173
Accepted
x = input() y = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] for i in range(26): if y[i] == x: print(y[i + 1])
p02833
s839230778
Wrong Answer
n=12 def doublefactorial(n): if (n == 0 or n == 1): return 1; return n * doublefactorial(n - 2); def trailing_zeros(longint): manipulandum = str(longint) return len(manipulandum)-len(manipulandum.rstrip('0')) print("Double factorial is", doublefactorial(n)); print('trailing zeroes are'+ str(trailing_zeros(doublefactorial(n))))
p02641
s138982408
Accepted
x, len_arr = map(int, input().split()) if len_arr == 0: print(x) exit(0) arr = set(map(int, input().split())) for i in range(0, 100): if x - i not in arr: print(x - i) exit(0) if x + i not in arr: print(x + i) exit(0)
p03997
s955015026
Accepted
a,b,c=map(int,open(0));print((a+b)*c//2)
p03352
s566705509
Accepted
X = int(input()) ans = 0 for i in range(1, 33): for j in range(2, 11): if i**j > X: break ans = max(ans, i**j) print(ans)
p03379
s587044148
Wrong Answer
n = int(input()) x = list(map(int,input().split())) m = [] for i in range(n): m.append(x[i]) m.sort() k = m[n//2-1] l = m[(n-2)//2-1] for i in range(n): if(x[i]>l): print(l) else: print(k)
p03449
s557042669
Accepted
N = int(input()) A1, A2 = [list(map(int, input().split())) for _ in range(2)] ans = 0 sum = 0 for n in range(0, N): for i in range(0, n + 1): sum += A1[i] for j in range(n, N): sum += A2[j] if ans < sum: ans = sum sum = 0 print(ans)
p03469
s937732846
Wrong Answer
S = input() S[0:4]=="2017" print(S)
p03854
s830486195
Accepted
import re s = input() if re.match("(dream|dreamer|erase|eraser)+$", s): print("YES") else: print("NO")
p03797
s857928689
Accepted
N, M = map(int, input().split()) cnt = 0 if N<=M//2: cnt = N N,M =0,M-2*N cnt += M//4 print(cnt) else: cnt = M//2 print(cnt)
p03679
s935149433
Accepted
X,A,B = map(int,input().split()) print('delicious'if B <= A else 'safe' if A<B and B-A<=X else 'dangerous')
p02953
s369195628
Accepted
n = int(input()) h = list(map(int, input().split())) # sv = h[n-1] ok = True for i in range(n-1)[::-1]: # if h[i] - sv + 1 >= 2: # ok = False if h[i] <= h[i+1]: continue elif h[i] == h[i+1] + 1: h[i] -= 1 else: ok = False # if h[i] - h[i-1] < 0: # ok = False if ok: print('Yes') else: print('No')
p04029
s872335883
Accepted
# 入力 N = int(input()) # totalの定義 total = 0 # ループ while N > 0: total += N N -= 1 print(total)
p02731
s639715949
Wrong Answer
n = int(input()) s = n//3 t = n % 3 if t == 0: print(s**3) if t == 1: print((s+1)*s*s) if t == 2: print((s+1)*(s+1)*s)
p03623
s637288204
Accepted
x, a, b = map(int, input().split()) if abs(a - x) < abs(b - x): print('A') else: print('B')
p02835
s394417348
Accepted
a,b,c = map(int, input().split()) n = a + b + c if n <= 21: print("win") else: print("bust")
p03854
s143281014
Wrong Answer
# coding: utf-8 # Your code here! s = input() word_list = ["dream","dreamer","eraser","erase"] for i in word_list: s = s.replace(i,".") if len(set(s)) == 1: print("YES") else: print("NO")
p03281
s054715735
Wrong Answer
def divsor(num): count=0 for i in range(1,num+1): if num%i==0: count+=1 return count n=int(input()) if(n<=105): if(n==105): print(1) elif(n<105): print(0) exit() res=1 for i in range(106,n+1): if(divsor(i)==8 and i%2==1): res+=1 print(res)
p02694
s849148066
Accepted
import sys #sys.exit() #sorted( ,reverse=True) X = int(input()) #S,T = map(int, input().split()) #A = list(map(int, input().split())) #print(N) #print(S,T) #print(A) #print('Yes') #print('No') cnt = 0 m = 100 while m < X: m = int(m) * 1.01 cnt += 1 print(cnt)
p03038
s934902496
Accepted
from collections import Counter N,M = map(int, input().split() ) A = list(map(int, input().split() )) B = [0]*M C = [0]*M Cou = Counter(A) for i in range(M): B[i],C[i] = map(int, input().split() ) Cou[C[i]] += B[i] #print(Cou) ans=0 cnt=0 S=sorted(Cou,reverse=True) #print(S) for num in S: kosuu = min(Cou[num],N-cnt) cnt += kosuu ans += num*kosuu print(ans)
p02811
s096073771
Accepted
k,x = map(int, input().split()) if 500*k >= x: print('Yes') else: print('No')
p02922
s955522511
Wrong Answer
import math A, B=map(int, input().split()) if math.ceil(B/A)==1: print(1) else: if (B-A)%(A-1)==0: print((B-A)//(A-1)+1) else: print((B-A)//(A-1)+2)
p02797
s418369324
Accepted
N,K,S = map(int, input().split()) if S == 10**9: ans = [S]*K +[1]*(N-K) else: ans = [S]*K +[S+1]*(N-K) ans_txt='' for s in ans: ans_txt += str(s)+' ' print(ans_txt)
p02607
s047038786
Accepted
N=int(input()) a=[int(x) for x in input().split()] cnt=0 for i in range(N): if i%2==0 and a[i]%2==1: cnt+=1 print(cnt)
p03241
s392615754
Accepted
import sys import bisect inf = 10**15 mod = 10**9+7 # 約数生成 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(reverse = True) return divisors n,m = map(int, input().split()) kouho = make_divisors(m) for num in kouho: if m//num >= n: print(num) sys.exit()
p03817
s897915388
Wrong Answer
import math x = int(input()) # x = 10**15 xi = math.floor(x/5.5) # print(xi) for i in range(xi,10000000000000000000000000000): # print(6*i - math.floor(i/2)) if(x < 6*i-math.floor(i/2)): xa = i break print(xa)
p02676
s099081311
Accepted
#!/usr/bin/env python3 # atcoder # Türkçe konuşyorum # Türkler var mı # memnün oldum K = int(input()) S = input() if(len(S) <= K): print(S) else: print(S[:K] + '.' * 3) #for i in range(3): # change = change.replace(change[i], '.') #print(S[:K] + change[:3])
p03543
s616346400
Accepted
def atc_079a(input_value: str) -> str: n = 3 for i in range(0, len(input_value) + 1 - n): for j in range(1, n): if input_value[i] != input_value[i + j]: break if j == n - 1: return "Yes" return "No" input_value = input() print(atc_079a(input_value))
p02753
s782635655
Accepted
S = list(input()) if S[0] == S[1] and S[1] == S[2]: print('No') else: print('Yes')
p03359
s739556282
Accepted
def main(): a,b = map(int, input().split()) if b<a: print(a-1) else: print(a) if __name__ == '__main__': main()
p03208
s169591167
Wrong Answer
import numpy as np N, K = map(int, input().split()) A = np.array([input() for _ in range(N)], dtype=np.int64) A.sort() ans = (A[-K:] - A[:K]).min() print(ans)
p03469
s207628629
Wrong Answer
s = input() print('2018/'+s[6:11])