problem_id
stringclasses
428 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
5
816
p02831
s321263160
Wrong Answer
a,b=input().split() a=int(a) b=int(b) c=1 d=0 if a>b: for i in range(1,a): if a%i==0 and b%i==0: a=a/i b=b/i c=c*i print(int(a*b*c)) if a<b: for i in range(1,b): if a%i==0 and b%i==0: a=a/i b=b/i c=c*i print(int(a*b*c))
p03282
s498345221
Accepted
S = input() K = int(input()) if all(s == "1" for s in S[:K]): print(1) else: for i in range(len(S)): if S[i] != "1": print(S[i]) break
p02935
s286827658
Accepted
n = int(input()) v = list(map(int, input().split())) v.sort() tmp = (v[0] + v[1])/2 for i in range(2, n): tmp = (tmp + v[i])/2 print(tmp)
p03720
s424655684
Wrong Answer
N, M = map(int, input().split()) ABs = [input().split() for i in range(M)] MPs = {} for a, b in sorted(ABs, key=lambda i: i[1]): if a not in MPs: MPs[a] = 1 else: MPs[a] += 1 if b not in MPs: MPs[b] = 1 else: MPs[b] += 1 for mp in range(N): if mp in MPs: MPs[mp] = 0 for x, y in sorted(MPs.items(), key=lambda j: j[0]): print(y)
p03254
s825532301
Accepted
n,x = map(int,input().split()) a = list(map(int,input().split())) ans = 0 a.sort() for i in range(n): ai = a[i] if i==n-1: if ai==x: ans+=1 else: pass break if ai<=x: ans+=1 x-=ai print(ans)
p02676
s419851777
Accepted
K=int(input()) S=list(input()) if len(S)<=K: print("".join(S)) else: ans="".join(S[0:K]) ans+="..." print(ans)
p03329
s907979215
Accepted
s={int(input())} def f(k,m): p=1; while p*m<=k: p*=m return p a=0 while all(s): s={i-f(i,6) for i in s}|{i-f(i,9) for i in s} a+=1 print(a)
p02847
s765508678
Wrong Answer
l= ["SUN","MON","TUE","WED","THU","FRI","SAT"] s=input() ans=0 for i in range(7): if s==l[i]: ans =(7-i)%7 print(ans)
p02678
s505527384
Wrong Answer
n,m = map(int,input().split()) chizu = [[] for _ in range(n)] for i in range(m): a,b = map(int,input().split()) chizu[a-1].append(b-1) chizu[b-1].append(a-1) inf = 10**10 dep = [inf]*n dep[0] = 0 prev = [-1]*n former = [] for i in range(n): for j in chizu[i]: if dep[i]+1 < dep[j]: prev[j] = i+1 dep[j] = dep[i]+1 print('Yes') for i in range(1,n): print(prev[i])
p03345
s930703211
Accepted
A, B, C, K = map(int, input().split()) threshold = 10 ** 18 res = (-1) ** K * (A - B) if abs(res) > threshold: print('Unfair') else: print(res)
p02795
s356255954
Accepted
H = int(input()) W = int(input()) N = int(input()) ans = 0 plus = max(H,W) cnt = 0 while ans < N: ans+=plus cnt+=1 print(cnt)
p02996
s735506980
Accepted
import sys import numpy as np sys.setrecursionlimit(10**9) INF=10**18 def input(): return sys.stdin.readline().rstrip() def main(): N=int(input()) A,B=[0]*N,[0]*N for i in range(N): A[i],B[i]=map(int,input().split()) Bargsort=np.argsort(B) t=0 for i in Bargsort: t+=A[i] if t>B[i]: print('No') exit() print('Yes') if __name__ == '__main__': main()
p02820
s729042744
Accepted
n, k = map(int, input().split()) r, s, p = map(int, input().split()) T = list(input()) P = {'s':r, 'p':s, 'r':p} mx = r*T.count('s')+s*T.count('p')+p*T.count('r') if len(T)<k: print(mx) else: for i in range(n-k): if T[i]==T[i+k]: mx -= P[T[i]] T[i+k] = '_' print(mx)
p02791
s011506788
Accepted
n = int(input()) p = [int(i) for i in input().split()] count = 0 min_value = p[0] for i in p: if i <= min_value: count += 1 min_value = i print(count)
p03239
s066481491
Wrong Answer
n,t = map(int,input().split()) ans = 0 for i in range(n): a,b = map(int,input().split()) if t > b: ans = b print(ans if ans > 0 else "TLE")
p02623
s771817667
Accepted
from itertools import accumulate n, m, k = map(int, input().split()) a = list(map(int, input().split())) b = list(map(int, input().split())) a = [0] + list(accumulate(a)) b = [0] + list(accumulate(b)) ans = 0 j = m for i in range(n + 1): if a[i] > k: break while b[j] > k - a[i]: j -= 1 ans = max(ans, i+j) print(ans)
p03327
s820249898
Accepted
n = int(input()) print("ABC" if n <1000 else "ABD")
p03254
s360808373
Wrong Answer
import sys input = sys.stdin.readline def main(): N, x = map(int, input().split()) a_list = list(map(int, input().split())) ans = 0 for a in sorted(a_list): if a <= x: ans += 1 x -= a else: break if ans == N: print(ans - 1) else: print(ans) if __name__ == '__main__': main()
p02613
s120544705
Wrong Answer
# import sys;input = lambda : sys.stdin.readline() import collections d=collections.defaultdict(lambda:0) for _ in range(int(input())): s=input() d[s]+=1 print("AC X",d['AC']) print("WA X",d['WA']) print("TLE X",d["TLE"]) print("RE X",d['RE'])
p03612
s681760237
Wrong Answer
n = int(input()) p = list(map(int, input().split())) ans = 0 for i in range(n-1): if p[i]-1 == i: p[i], p[i+1] = p[i+1], p[i] ans += 1 print(ans)
p02939
s032546231
Accepted
s = input() t = '' a = ['-1'] for i in s: t += i if t != a[-1]: a += [t] t = '' print(len(a)-1)
p02719
s550668570
Accepted
n, k = map(int, input().split()) if k > n: tmp = n else: tmp = n % k if tmp > k / 2: tmp = k - tmp print(tmp)
p02761
s927009397
Accepted
# input N, M = map(int, input().split()) c = [] c_append = c.append for i in range(M): sm, cm = map(int, input().split()) c_append((sm, cm)) ans = -1 # check for i in range(1000): str_i = str(i) if N < len(str_i): break if N == len(str_i) and False not in [int(str_i[sm - 1]) == cm for sm, cm in c]: ans = i break print(ans)
p02873
s733191964
Accepted
S = input() N = len(S) + 1 A = [0]*N for i in range(N-1): if S[i] == "<": A[i+1] = max(A[i]+1, A[i+1]) for i in range(N-2, -1, -1): if S[i] == ">": A[i] = max(A[i], A[i+1]+1) print(sum(A))
p03695
s925507885
Accepted
n=int(input()) a=list(map(int,input().split())) a.sort() i=0 check=[0]*8 while i<n and a[i]<3200: a_i=a[i] for j in range(8): if check[j]==0 and a_i>=400*j and a_i<400*(j+1): check[j]=1 break i+=1 if sum(check)==0: ans_min=1 ans_max=n else: ans_min=sum(check) ans_max=ans_min+n-i print(ans_min,ans_max)
p03680
s094451492
Accepted
n= int(input()) a= [int(input()) for i in range(n)] c,s = 1,a[0] while s!=2 and c<n: c,s=c+1,a[s-1] print(c if c<n else -1)
p03943
s611203138
Wrong Answer
import copy a = list(map(int,input().split())) nokori = copy.copy(a) count = max(a) nokori.remove(count) if a[0] == a[1] == a[2]: print("NO") if int(nokori[0] + nokori[1]) == count: print("YES") else: print("NO")
p02790
s342950204
Wrong Answer
a, b = input().split() if (int(b) <= int(a)): print(b * int(a)); exit(0) else: print(a * int(a)); exit(0)
p03543
s615828175
Accepted
N = input() if N[0]==N[1]==N[2] or N[1]==N[2]==N[3]: print("Yes") else: print("No")
p03146
s591174410
Accepted
s = int(input()) a = [s] i = 0 while True: if a[i]%2==0: f = a[i]//2 else: f = 3*a[i]+1 if f not in a: a.append(f) i+=1 else: print(i+2) break
p02556
s999059296
Accepted
n=int(input()) plus=[] minus=[] for i in range(n): x,y=map(int,input().split()) plus.append(x+y) minus.append(x-y) print(max(max(plus)-min(plus),max(minus)-min(minus)))
p03317
s263095926
Wrong Answer
import math n, k = map(int,input().split()) a = list(map(int,input().split())) ans = math.ceil(n/(k-1)) print(ans)
p03493
s280682289
Accepted
print(input().count('1'))
p02789
s659950429
Accepted
N,M = map(int,input().split()) if(N==M):print('Yes') else:print('No')
p03557
s007287011
Accepted
import bisect N=int(input()) A=sorted(list(map(int,input().split()))) B=sorted(list(map(int,input().split()))) C=sorted(list(map(int,input().split()))) count=0 for i in B : a=bisect.bisect_left(A,i) c=bisect.bisect_right(C,i) p=a*(N-c) count+=p print(count)
p03861
s464412551
Accepted
a, b, x = map(int, input().split()) ans = b//x - (a-1)//x print(ans)
p02696
s110794431
Accepted
import math a, b, n = list(map(int, input().split())) x = min(b-1, n) print(math.floor(a * x / b) - a * math.floor(x / b))
p02576
s239823245
Wrong Answer
N, X, T = map(int, input().split()) time = int(N / X) * T if N%T==0: print(time) else: print(time+T)
p03721
s123757214
Accepted
# -*- coding: utf-8 -*- """ Created on Mon Sep 28 01:14:47 2020 @author: liang """ N, K = map(int,input().split()) A = list() for i in range(N): a, b = map(int,input().split()) A.append((a,b)) A.sort(key= lambda x:x[0]) tmp = 0 for i in range(N): a, b = A[i] tmp += b if tmp >= K: print(a) break
p03860
s669610866
Accepted
s = input() print("A"+s[8]+"C")
p02661
s442074759
Accepted
N=int(input()) A=[0]*N B=[0]*N for i in range(N): A[i],B[i]=map(int,input().split()) A.sort() B.sort() if N%2==1: print(abs(A[N//2]-B[N//2])+1) else: print(abs(A[N//2]+A[N//2-1]-B[N//2]-B[N//2-1])+1)
p03243
s706960882
Accepted
N = int(input()) for i in range(111, 1000, 111): if i >= N: print(i) break
p02777
s728267259
Accepted
s,a,u=open(0);i=u in s;print(int(a[:2])-1+i,int(a[2:])-i)
p02700
s769847552
Wrong Answer
A,B,C,D = map(int,input().split()) #print(A,B,C,D) def judge(A,B,C,D): for i in range(99): C = C-B A = A - D if C==0: return 1 elif A == 0: return 0 if judge(A,B,C,D)==1: print("Yes") else: print("No")
p04011
s001583177
Accepted
import sys lis = list() for line in sys.stdin : lis.append(int(line)) if (lis[0] - lis[1]) < 0 : print(lis[0] * lis[2]) else : sum = lis[1] * lis[2] + (lis[0] - lis[1]) * lis[3] print(sum)
p03380
s470802929
Accepted
import numpy as np n = int(input()) a = np.array(list(map(int, input().split()))) a.sort() ai = a.max() v, aj = 0, 0 for i in a[:-1]: tmp = i * (ai - i) if v < tmp: v = tmp aj = i # print(v, aj) print(ai) print(aj)
p03095
s938886055
Accepted
N = int(input()) S = input() char = set(list(S)) mod = 10**9+7 ans = 1 for c in char: ans *= S.count(c) + 1 ans %= mod ans -=1 print(ans)
p03162
s888208034
Accepted
N = int(input()) F = [tuple(map(int, input().split())) for _ in range(N)] DP = [0] * 3 for f in F: D = [0] * 3 S = {0, 1, 2} for i in range(3): S.remove(i) for s in S: D[i] = max(D[i], f[i] + DP[s]) S.add(i) DP = D print(max(DP))
p02598
s746362860
Accepted
N, K = map(int, input().split()) *A, = map(int, input().split()) def isOk(m): k = 0 for a in A: if a > m: k += a//m if a % m == 0: k -= 1 if k <= K: return True else: return False l, r = 10**19, 1 while abs(r-l) > 1: m = (l+r)//2 if isOk(m): l = m else: r = m if isOk(r): print(r) else: print(l)
p02833
s002654510
Accepted
n = int(input()) if n % 2 == 1: print('0') exit() ans = 0 mul5 = 10 while mul5 <= n: ans += n // mul5 mul5 *= 5 print(ans)
p02690
s230610502
Accepted
def main(): X=int(input()) for A in range(-1000,1000): for B in range(-1000,1000): if A**5-B**5==X: print(A,B) exit() main()
p03013
s228912402
Accepted
N, M = map(int, input().split()) A = [None]*M is_broken = [False] * (N+1) for i in range(M): A[i] = int(input()) is_broken[A[i]] = True dp = [0] * (N+1) dp[0] = 1 for i in range(1, N+1): if is_broken[i]: continue dp[i] = (dp[i-1] + dp[i-2]) % (10**9 + 7) print(dp[-1])
p02789
s560897661
Accepted
n, m = map(int, input().split()) if n == m: print('Yes') else: print('No')
p02711
s138469563
Accepted
n = list(input()) if '7' in n: print('Yes') else: print('No')
p03351
s445863872
Accepted
a, b, c, d = map(int, input().split()) if abs(a-c) <= d: print('Yes') elif abs(a-b) <= d and abs(b-c) <= d: print('Yes') else: print('No')
p03437
s230241322
Accepted
x,y = map(int,input().split()) if x%y == 0: print(-1) else: print(x)
p02696
s613041998
Wrong Answer
a,b,N=map(int,input().split()) d=[] for i in range(1,N+1): d.append(((a*i)//b)-(a*(i//b))) print(d[-1])
p03487
s187512456
Accepted
from collections import Counter N = int(input()) C = Counter(map(int, input().split())) ans = 0 for i in C: if C[i]>i: ans += C[i]-i elif C[i]<i: ans += C[i] print(ans)
p03435
s753102695
Accepted
c = [list(map(int, input().split())) for _ in range(3)] a = [0, 0, 0] b = [0, 0, 0] b[0] = c[0][0] - a[0] b[1] = c[0][1] - a[0] b[2] = c[0][2] - a[0] a[1] = c[1][0] - b[0] a[2] = c[2][0] - b[0] cnt = 0 for i in range(3): for j in range(3): if c[i][j] == a[i]+b[j]: cnt += 1 print('Yes' if cnt == 9 else 'No')
p02584
s412681462
Accepted
x, k, d = map(int, input().split()) p = (x + d * k) // (2 * d) def f(a): return abs(x + d * (k - 2 * a)) if p > k or p < 0: print(min(f(0), f(k))) else: print(min(f(p), f(p + 1)))
p02661
s966292695
Accepted
import sys input = lambda:sys.stdin.readline().strip() n = int(input()) a = [0] b = [0] for i in range(n): ai,bi = map(int,input().split()) a.append(ai) b.append(bi) a.sort() b.sort() if n&1: print(b[(n+1)//2]-a[(n+1)//2]+1) else: print((b[n//2]+b[(n//2)+1])-(a[n//2]+a[(n//2)+1])+1)
p02922
s444536189
Accepted
def main(): a,b=map(int,input().split()) p=b-a if b==1:print(0) elif p<=0:print(1) else: if p%(a-1)==0:print((p//(a-1))+1) else:print((p//(a-1))+2) main()
p02665
s543227428
Accepted
import sys N=int(input()) A=list(map(int,input().split())) if A[0]>=2: print(-1) sys.exit() if A[0]==1: left=0 else: left=1 ans=A[N] P=[1 for i in range(N+1)] for i in range(1,N+1): point=left*2 P[i]=point if point-A[i]<0: print(-1) sys.exit() left=point-A[i] root=A[N] for i in range(N,0,-1): root=min(P[i-1],root+A[i-1]) ans+=root print(ans)
p03680
s656946416
Wrong Answer
# coding: utf-8 N=int(input()) A=[] for i in range(N): A.append(int(input())) cnt=0 flg=False light=0 for i in range(N): light=A[light]-1 cnt+=1 if light==1: flg=True print(cnt) if not(flg): print(-1)
p02664
s269507928
Accepted
print(input().replace("?","D"))
p02996
s683759780
Accepted
def solve(): n = int(input()) tasks = [] for i in range(n): a, b = map(int,input().split()) tasks.append((b,a)) tasks.sort() t = 0 for task in tasks: t += task[1] if t > task[0]: return False return True print("Yes" if solve() else "No")
p02726
s467301436
Wrong Answer
N, X, Y = input().split() N = int(N) X = int(X) x = X - 1 Y = int(Y) y = Y -1 ans = [0] * (N-1) A = [[] * N for _ in range(N)] for i in range(N): for j in range(N-i): path = min(abs(x- i) +1 +abs(y-i-j),j) ans[path] += 1 for _ in range(len(ans)): if _ == 0: continue print(ans[_])
p02843
s323380669
Accepted
dp = [True] #i円の買い物ができるか x = int(input()) for i in range(99): dp.append(False) for i in range(100, x+1): if(i < 106): dp.append(True) else: if(dp[i-100] or dp[i-101] or dp[i-102] or dp[i-103] or dp[i-104] or dp[i-105]): dp.append(True) else: dp.append(False) if(dp[x]): print(1) else: print(0)
p02970
s240414732
Wrong Answer
n,d = map(int ,input().split()) a = 2*d+1 for i in range(n): if a*i > n: print(i) break
p02933
s978835812
Accepted
a = int(input()) s = str(input()) if(a >= 3200): print(s) else: print("red")
p03962
s401543008
Accepted
print(len(set(input().split())))
p02583
s029486950
Accepted
import itertools N = int(input()) L = list(map(int,input().split())) l_list = list(itertools.combinations(L, 3)) counter = 0 for n in l_list: i = n[0] j = n[1] k = n[2] if i != j and j != k and k != i: if (i < j + k) and (j < i + k) and (k < i + j): counter += 1 print(counter)
p03681
s422348089
Accepted
import sys import math n, m = map(int, input().split()) mod = 10 ** 9 + 7 if n == m: ans = math.factorial(n) % mod ans = (ans * math.factorial(m)) % mod ans = (ans * 2) % mod elif abs(n - m) >= 2: ans = 0 else: ans = math.factorial(n) % mod ans = (ans * math.factorial(m)) % mod print(ans)
p02861
s132060244
Wrong Answer
import math N=int(input()) x,y=[0]*N,[0]*N ans=0 for i in range(N): x[i],y[i]=map(int,input().split()) if i==0: pass else: ans+=math.sqrt(pow(x[i-1]-x[i],2)+pow(y[i-1]-y[i],2)) print(ans)
p02791
s883255235
Wrong Answer
from sys import stdin def main(): N=int(stdin.readline().strip()) A=[int(x) for x in stdin.readline().split()] j=0 ans=0 for i in range(1,len(A)): if A[j]>=A[i]: j+=1 else: break ans=i+1 print(min(ans+1,N)) main()
p02628
s605815644
Accepted
N, K = list(map(int, input().split())) p = list(map(int, input().split())) p = sorted(p) ans = 0 for i in range(K): ans += p[i] print(ans)
p02606
s051402613
Accepted
L,R,d = map(int,input().split()) ans = 0 for n in range(L,1+R): if n%d==0: ans+=1 print(ans)
p03331
s238859833
Accepted
N=int(input()) N_sum=[] for A in range(1,int(N/2)+1): B=N-A N_sum.append(sum(map(int,str(A)+str(B)))) print(min(N_sum))
p03329
s055192085
Wrong Answer
a = int(input()) lst_l = [6, 9] counter = 0 while a!=0: lst = [0, 0] for j in range(2): for i in range(0, 20): if a < lst_l[j]**i: break lst[j] = lst_l[j]**i a -= max(lst) counter += 1 print(counter)
p03944
s593752389
Accepted
w, h, n = map(int, input().split()) left = 0 right = w high = h low = 0 for i in range(n): x, y, a = map(int, input().split()) if a == 1: left = max(left, x) if a == 2: right = min(right, x) if a == 3: low = max(low, y) if a == 4: high = min(high, y) print(max(0, right - left) * max(0, high - low))
p03861
s722755815
Accepted
a, b, x = map(int, input().split()) print(b // x - (a - 1) // x)
p03107
s129629999
Wrong Answer
s=input() n=len(s) if len(set(s))==1: print(0) else: print(min(n,n-s.count('1'))*2)
p02987
s271792242
Accepted
S = list(input()) S.sort() if S[0] == S[1] and S[2] == S[3] and S[0] != S[2]: print("Yes") else: print("No")
p02823
s947509316
Wrong Answer
N,A,B = map(int,input().split()) dif = abs(A-B) if(dif%2 == 0): ans = dif//2 else: #A1_diff = A-1 B1_diff = B-1 AN_diff = N-A #BN_diff = N-B ans = min(B1_diff, AN_diff) print(ans)
p03645
s611376203
Wrong Answer
N,M = map(int,input().split()) goto_N = [0]*N from_1 = [0]*N for _ in range(M): a,b = map(int,input().split()) if a == 1: from_1[b] = 1 elif b == N: goto_N[a] = 1 for i in range(N): if goto_N[i] and from_1[i]: print("POSSIBLE") exit() print("INPOSSIBLE")
p02552
s411948833
Accepted
def main(): x = int(input()) print(x ^ 1) if __name__ == '__main__': main()
p03657
s078722097
Accepted
A, B = map(int, input().split()) ans = 'Impossible' if A % 3 == 0: ans = 'Possible' elif B % 3 == 0: ans = 'Possible' elif (A+B) % 3 == 0: ans = 'Possible' print(ans)
p03493
s792499972
Accepted
num = list(input()) output = 0 for i in num: if i =='1': output += 1 print(output)
p02787
s674893008
Accepted
# E - Crested Ibis vs Monster H, N = map(int, input().split()) AB = [] for i in range(N): a, b = map(int, input().split()) AB.append([a,b]) AB.sort() DP = [float('inf') for i in range(2*10**4 + 1)] DP[0] = 0 for i in range(H): for ab in AB: DP[i+ab[0]] = min(DP[i+ab[0]], DP[i] + ab[1]) print(min(DP[H:]))
p02707
s211108803
Wrong Answer
def main(): n = int(input()) a = list(map(int, input().split(' '))) buka = [0]*n print(a) for i in a: buka[i-1] += 1 for i in buka: print(i) if __name__ == "__main__": main()
p02730
s414567719
Wrong Answer
s=input() a=s[:len(s)//2] b=s[(len(s)//2)+1:] if a==reversed(a) and b==reversed(b): print('Yes') else: print('No')
p03639
s396356535
Accepted
def ii():return int(input()) def iim():return map(int,input().split()) def iil():return list(map(int,input().split())) def ism():return map(str,input().split()) def isl():return list(map(str,input().split())) n = ii() A = iil() odd = 0 even = 0 mulof4 = 0 for i in A: if i%2 == 1: odd += 1 elif i%4 == 2: even += 1 else: mulof4 += 1 if odd > mulof4+1: print('No') else: if odd < mulof4+1: print('Yes') else: print("Yes" if even == 0 else 'No')
p02996
s131399754
Wrong Answer
from collections import deque import sys input = sys.stdin.readline N = int(input()) A = deque() B = deque() time = 0 for i in range(N): a, b = map(int, input().split()) A.append(a) B.append(b) time += 0 if time > B[i]: print("No") sys.exit() print("Yes")
p02970
s181243911
Wrong Answer
N,D = map(int, input().split()) print(N//(2*D+1)+1)
p03327
s357717685
Accepted
import bisect, collections, copy, heapq, itertools, math, string, sys input = lambda: sys.stdin.readline().rstrip() sys.setrecursionlimit(10**7) INF = float('inf') def I(): return int(input()) def F(): return float(input()) def SS(): return input() def LI(): return [int(x) for x in input().split()] def LI_(): return [int(x)-1 for x in input().split()] def LF(): return [float(x) for x in input().split()] def LSS(): return input().split() def resolve(): N = I() if N <= 999: print('ABC') else: print('ABD') if __name__ == '__main__': resolve()
p03814
s457225092
Accepted
s=input() x=0 y=0 j=0 for i in range(len(s)): if j==0 and s[i]=="A": j+=1 x=i elif j==1 and s[i]=="Z": y=i print(y-x+1)
p02639
s671845989
Wrong Answer
x = list(map(int,input().split())) for i in range(5): if i == 0: print(i)
p02664
s879538996
Accepted
t = input() print(t.replace('?','D'))
p02780
s701140803
Accepted
n, k = map(int, input().split()) lis = list(map(int, input().split())) su = [0] * (n + 1) for i in range(n): su[i + 1] = su[i] + ((lis[i] + 1) / 2) res = 0 for j in range(n - k + 1): res = max(res, su[j + k] - su[j]) print('{:.12f}'.format(res))
p03605
s118700909
Accepted
n = input() if '9' in n: print('Yes') else: print('No')