Harryxun/stf_run huggingface dataset:
import numpy as np
l,r = map(int, input().split())
if ((l-1//2019)<(r//2019))|(((l-1//673)<(r//673))&((l-1//3)<(r//3))):
  print(0)
else:
  arr1 = np.array(range(l,r+1))
  arr2 = np.array(range(l,r+1)).reshape(r-l+1,1)
  arr = arr1*arr2%2019
  for i in range(r-l+1):
    arr[i][i] = 2019
  print(np.min(arr))

### FIXED CODE ###

import numpy as np
l,r = map(int, input().split())
if ((l//2019)<(r//2019)):
  print(0)
else:
  arr1 = np.array(range(l,r+1))
  arr2 = np.array(range(l,r+1)).reshape(r-l+1,1)
  arr = arr1*arr2%2019 + (np.identity(r-l+1)*2019)
  print(int(np.min(arr)))
# YouTube2
from collections import defaultdict

def main():
    def dfs(u):
        if dis[u] > 0:
            return dis[u]
        if dis[u] == 0:
            return -1
        dis[u] = 0
        res = 1
        for v in to[u]:
            tmp = dfs(v) + 1
            if tmp == 0: return -1
            res = max(res, tmp)
        dis[u] = res
        return res

    to = defaultdict(list)
    n = int(input())
    a = [list(map(lambda x: int(x) - 1, input().split())) for _ in range(n)]
    all_game = n * (n - 1) // 2
    dis = [-1] * all_game
    game = [[0] * n for _ in range(n)]
    u = 0
    for i in range(n - 1):
        for j in range(i + 1, n):
            game[i][j] = game[j][i] = u
            u += 1

    for i in range(n):
        j = a[i][0]
        pre = game[i][j]
        for gi in range(1, n - 1):
            j = a[i][gi]
            to[pre].append(game[i][j])
            pre = game[i][j]
#    print(to)

    for i in range(all_game):
        if dfs(i) == -1:
            print(-1)
            exit()
#    print(dis)
    print(max(dis))

main()


### FIXED CODE ###

# YouTube1

def main():
    n = int(input())
    a = [list(map(lambda x: int(x) - 1, input().split()))[::-1] for _ in range(n)]
    #    print(a)
    gam = []  # １日のgames
    # 初期化
    for i in range(n):
        ii = a[i][-1]
        if ii < i: continue
        if a[ii][-1] == i:
            gam.append([i, ii])
    days = 0
    fin = [False] * n
    fin_cnt = 0
    #    print(gam)
    while 1:
        days += 1
        pla = []  # 今日試合があったplayers
        for i, ii in gam:
            a[i].pop()
            a[ii].pop()
            pla.append(i)
            pla.append(ii)
        gam = []
        dec = set()
        for i in pla:
            if fin[i]: continue
            if not a[i]:
                fin[i] = True
                fin_cnt += 1
                if fin_cnt == n:
                    print(days)
                    exit()
                continue
            if i in dec: continue
            ii = a[i][-1]
            if a[ii][-1] == i:
                gam.append([i, ii])
                dec.add(ii)
        if not gam:
            print(-1)
            exit()

main()
a,b=map(int, input())
print(max(a-b*2,0))

### FIXED CODE ###

a, b = map(int, input().split())
print(max(a-b*2, 0))
S = input()

hoge = ['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']

hoge2 = list(S)

differlen = len((set(hoge) ^ set(hoge2)))

differ2 = set(hoge) ^ set(hoge3)
differ3 = sorted(differ2)




if differlen == 0:
    print("None")
else:
    print(differ3[0])

### FIXED CODE ###

S = input()

hoge = ['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']

hoge2 = list(S)

differlen = len((set(hoge) ^ set(hoge2)))

differ2 = set(hoge) ^ set(hoge2)
differ3 = sorted(differ2)




if differlen == 0:
    print("None")
else:
    print(differ3[0])
import numpy as np
ans = []
H, W = map(int, input().split())
S = []
S.append('.'*(W+2))
for i in range(H):
    S.append('.'+input() + '.')
S.append('.'*(W+2))

for y in range(1, H+1):
    for x in range(1, W+1):
        if S[y][x] == '.':
            cnt = S[y][x-1].count('#')+S[y][x+1].count('#')+S[y-1][x-1:x+2].count('#')+S[y+1][x-1:x+2].count('#')
            ans.append(cnt)
        else:
            ans.append('#')
np_ans = np.array(ans)
re_ans = np.reshape(np_ans, (H, W))
for i in re_ans:
    print(''.join(i))

### FIXED CODE ###

def solve():
    H, W = map(int, input().split())
    a = [list("."+input()+".") for _ in [0]*H]
    a.insert(0, list("."*(W+2)))
    a.append(list("."*(W+2)))
    result = []
 
    for y in range(1, H+1):
        for x in range(1, W+1):
            if a[y][x] == "#":
                result.append("#")
            else:
                result.append(str((a[y-1][x-1:x+2]+a[y][x-1:x+2]+a[y+1][x-1:x+2]).count("#")))
        result.append("\n")
 
    print("".join(result))
 
 
if __name__ == "__main__":
    solve()
n = int(raw_input())
p1 = complex(0,0)
p2 = complex(100,0)
 
for e in koch(p1,p2,n):
    print e.real,e.imagimport math, cmath
 
def koch(p1, p2, n):
    if n == 0:
        return [p1, p2]
     
    rad60 = math.pi/3
    v1 = (p2 - p1)/3
    v2 = cmath.rect(abs(v1), cmath.phase(v1)+rad60)
    q1 = p1 + v1
    q2 = q1 + v2
    q3 = q1 + v1
    if n == 1:
        return [p1,q1,q2,q3,p2]
    else:
        x1 = koch(p1,q1,n-1)[:-1]
        x2 = koch(q1,q2,n-1)[:-1]
        x3 = koch(q2,q3,n-1)[:-1]
        x4 = koch(q3,p2,n-1)
        x = x1 + x2 + x3 + x4
    return x

### FIXED CODE ###

import math, cmath
 
def koch(v1, v2, n):
    if n == 0:
        return [v1, v2]
     
    rad60 = math.pi/3
    u1 = (v2 - v1)/3
    u2 = cmath.rect(abs(u1), cmath.phase(u1)+rad60)
    q1 = v1 + u1
    q2 = q1 + u2
    q3 = q1 + u1
    if n == 1:
        return [v1,q1,q2,q3,v2]
    else:
        x1 = koch(v1,q1,n-1)[:-1]
        x2 = koch(q1,q2,n-1)[:-1]
        x3 = koch(q2,q3,n-1)[:-1]
        x4 = koch(q3,v2,n-1)
        x = x1 + x2 + x3 + x4
    return x
 
n = int(raw_input())
v1 = complex(0,0)
v2 = complex(100,0)
 
for e in koch(v1,v2,n):
    print e.real,e.imag
import sys
x,k,d=map(int,input().split())

x=abs(x)

if k*d<=x:
    print(x-k*d)
    sys.exit()

if k>=x:

    
else:
    print(x%d)

### FIXED CODE ###

import sys
x,k,d=map(int,input().split())

x=abs(x)

a=x//d

if a>=k:
    ans=x-k*d

elif (k-a)%2==0:
    ans=x-d*a

else:
    ans=x-d*a-d

print(abs(ans))
a,b,c=map(int,input().split())
k=int(input())
for i in range(k):
    if a>b:
        b=b*2
        if b>c:
            c=c*2


if a<b and b<c:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

s=int(input())
if 400<=s<=599:
    print('8')
elif 600<=s<=799:
    print('7')
elif 800<=s<=999:
    print('6')
elif 1000<=s<=1199:
    print('5')
elif 1200<=s<=1399:
    print('4')
elif 1400<=s<=1599:
    print('3')
elif 1600<=s<=1799:
    print('2')
elif 1800<=s<=1999:
    print('1')
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<deque>
#include<stack>
#include<cmath>
using namespace std;
#define rep(i,n) rep2(i,0,n)
#define rep2(i,m,n) for(int i=m;i<(n);i++)
#define All(v) (v).begin(),(v).end()
using ll = long long;
const ll mod = 1000000007;
const ll INF = 100000000000000000LL;
int main(){
    int n, k;
    cin >> n >> k;
    int l[100];
    rep(i, n) cin >> l[i];
    sort(l, l + n, greater<int>());
    int res = 0;
    rep(i, k) res += l[i];
    cout << res << endl;
}

### FIXED CODE ###

n,k = map(int,input().split())
x = list(map(int,input().split()))
x = sorted(x)
ans = 0
for i in range(k):
    ans += x[-i-1]
print(ans)
k = int(input())
l = len(str(k))
A = [str(i) for i in range(10)]
ans = [i+1 for i in range(9)]

def dfs(num,l):
    if len(num) >= l:
        ans.append(int(num))
    else:
        for i in A:
            if abs(int(num[-1])-int(i)) < 2:
                dfs(num + i,l)
for i in A:
    dfs(i,l)
ans = sorted(ans)
#print(ans)
print(ans[k+1])

### FIXED CODE ###

from collections import deque

K=int(input())

def bfs(k):
    queue = deque()
    for i in range(1, 10):#1~9までをqueueに追加しておく
        queue.append(i)
    cnt = 1
    
    while queue:
        x = queue.popleft()#左から取り出すと、自動的に小さい順から取り出せる
        if cnt == k:
            return x
        cnt += 1 #これまでのルンルン数の数
        last = x%10 #末尾の数字
        if last > 0:
            queue.append(x*10+last-1)#x-1⇒x⇒x+1の順にを末尾に追加すると順番になる。0と9に注意
        queue.append(x*10+last)
        if last < 9:
            queue.append(x*10+last+1)
            
print(bfs(K))
k = int(input().split())
a, b = map(int, input().split())

ans = 0
for i in range(a,b):
    if i%k == 0:
        ans += 1
    else:
        ans += 0
if ans >= 1:
    print("OK")
else:
    print("NG")

### FIXED CODE ###

k = int(input())
a, b = map(int, input().split())

ans = 0
if a == b:
    if a%k == 0:
        ans += 1
    else:
        ans += 0
else:
    for i in range(a,b + 1):
        if i%k == 0:
            ans += 1
        else:
            ans += 0
if ans >= 1:
    print("OK")
else:
    print("NG")
from collections import defaultdict
from bisect import *
def solve():
  	mod = 10**9+7
    d = defaultdict(lambda: [])
    N = int(input())
    for i in range(N):
        a = int(input())
        d[a].append(i)
    selist = []
    for l in d.values():
        for i in range(len(l)-1):
            if l[i+1]-1>l[i]:
                selist.append([l[i],l[i+1]-1])
    start_sort = sorted(selist)
    e_ind = {}
    for i,(s,e) in enumerate(start_sort):
        e_ind[e] = i
    ends = list(e_ind.keys())
    ends.sort()
    dp = [0]*(len(selist)+1)
    for i in range(1,len(selist)+1):
        dp[i] = dp[i-1]+1
        ind = bisect_left(ends,selist[i-1][0])
        if ind>0:
            j = e_ind[ends[ind-1]]
            dp[i] += dp[j+1]
            dp[i] %= mod
    ans = dp[-1]+1
    ans %= mod
    return ans
print(solve())

### FIXED CODE ###

from collections import defaultdict
from bisect import *
def solve():
    mod = 10**9+7
    d = defaultdict(lambda: [])
    N = int(input())
    for i in range(N):
        a = int(input())
        d[a].append(i)
    selist = []
    ends = [-1]
    for l in d.values():
        for i in range(len(l)-1):
            if l[i+1]-1>l[i]:
                selist.append([l[i],l[i+1]])
                ends.append(l[i+1])
    selist = [[-1,-1]]+sorted(selist,key=lambda x:x[1])
    # s_ind = {}
    # for i,(s,e) in enumerate(selist):
        # e_ind[e] = i
    # ends = list(e_ind.keys())
    ends.sort()
    dp = [0]*(len(selist))
    for i in range(1,len(selist)):
        dp[i] = dp[i-1]+1
        ind = bisect_right(ends,selist[i][0])
        dp[i] += dp[ind-1]
    ans = dp[-1]+1
    ans %= mod
    return ans
print(solve())
from collections import Counter

def gcd(a, b):
    while b: a, b = b, a % b
    return abs(a)

MOD = 1000000007

def main():
    N = int(input())
    d = {}
    d[(1,0)] = (0,0)

    for i in range(N):
      a,b = (int(x) for x in input().split())
      g = gcd(a,b)
      a = a//g
      b = b//g
      if a*b<0:
        a = -abs(a)
        b = abs(b)
      elif a*b > 0:
        a = abs(a)
        b = abs(b)
      
      if a*b == 0:
        if b==0: d[(1,0)] = (d[(1,0)]+1,d[(1,0)])
        elif a==0: d[(1,0)] = (d[(1,0)],d[(1,0)]+1)
      else:
        if (a,b) in d: d[(a,b)] = (d[(a,b)][0]+1,d[(a,b)][1])
        elif (b, -a) in d: d[(b,-a)] = (d[(b,-a)][0],d[(b,-a)][1]+1)
        elif (-b, a) in d: d[(-b,a)] = (d[(-b,a)][0],d[(-b,a)][1]+1)
        else: d[(a,b)] = (1,0)
    
    ans = 1
    for i, j in d.values():
      ans *= (pow(2,i,MOD) + pow(2,j,MOD) - 1)
      ans %= MOD

    print(ans-1)

if __name__ == '__main__':
    main()


### FIXED CODE ###

from collections import Counter

def gcd(a, b):
    while b: a, b = b, a % b
    return abs(a)

MOD = 1000000007

# 2 WA
def main():
    N = int(input())
    d = {}
    d[(1,0)] = (0,0)
    z = 0
    for i in range(N):
      a,b = (int(x) for x in input().split())
      g = gcd(a,b)
      if g != 0:
        a = a//g
        b = b//g
        if a*b<0: a = -abs(a)
        elif a*b>0: a = abs(a)
      b = abs(b)
      
      if a*b==0:
        if a==b==0: z+=1
        elif b==0: d[(1,0)] = (d[(1,0)][0]+1,d[(1,0)][1])
        elif a==0: d[(1,0)] = (d[(1,0)][0],  d[(1,0)][1]+1)
      else:
        if (a,b) in d: d[(a,b)] = (d[(a,b)][0]+1,d[(a,b)][1])
        elif (b, -a) in d: d[(b,-a)] = (d[(b,-a)][0], d[(b,-a)][1]+1)
        elif (-b, a) in d: d[(-b,a)] = (d[(-b,a)][0], d[(-b,a)][1]+1)
        else: d[(a,b)] = (1,0)
    
    ans = 1
    for i, j in d.values():
      ans *= (pow(2,i,MOD) + pow(2,j,MOD) - 1)
      ans %= MOD

    print((ans-1+z)%MOD)

if __name__ == '__main__':
    main()
a = int(input())
b = int(input())
c = int(input())
print((a+b)*h//2)

### FIXED CODE ###

a = int(input())
b = int(input())
h = int(input())
print((a+b)*h//2)
from itertools import product

h, w = map(int, input().split())
s = [list(input()) for i in range(h)]
visited = []

def dfs(p):
    if s[p[1]][p[0]] == '.':
        return None

    temp = [1 if s[p[0]+x][p[1]+y] == '#' else 0 for (y, x) in [[1, 0], [0, 1], [0, -1], [-1, 0]]
            if 0 <= x+p[0] < len(s[0]) and 0 <= y+p[1] < len(s)]
    if sum(temp) <= 0:
        print('No')
        exit(0)


for i in range(len(s)):
    for j in range(len(s[0])):
        dfs([j, i])
print('Yes')


### FIXED CODE ###

from itertools import product

h, w = map(int, input().split())
s = [list(input()) for i in range(h)]
visited = []

def dfs(p):
    if s[p[0]][p[1]] == '.':  # p[0]gatate , p[1] gayoko
        return None

    temp = [1 if s[p[0]+y][p[1]+x] == '#' else 0 for (x, y) in [[1, 0], [0, 1], [0, -1], [-1, 0]] if 0 <= y+p[0] < h and 0 <= x+p[1] < w]
    if sum(temp) <= 0:
        print('No')
        exit(0)


for i in range(len(s)):
    for j in range(len(s[0])):
        dfs([i, j])
print('Yes')
N,W = map(int, input().strip().split(" "))
oj = []
for i in range(N):
    tmp = list(map(int, input().strip().split(" ")))
    oj.append(tmp)

dp = [0] * (W+1)
for i in range(W+1):
    dp[i] = oj[0][1] if oj[0][0] <= i else 0

for i in range(1,N):
    for j in range(W,-1,-1):
        if j < oj[i][0]:
            dp[j] = dp[j]
        else:
            dp[j] = max(dp[j], dp[j-oj[i][0]] + oj[i][1])
print(max(dp))


### FIXED CODE ###

N,W = map(int, input().strip().split(" "))
oj = []
for i in range(N):
    tmp = list(map(int, input().strip().split(" ")))
    oj.append(tmp)

#dp = [0] * (W+1)
M = 100 * 1001
dp = [10**10] * M

dp[oj[0][1]] = oj[0][0]

for i in range(1,N):
    for j in range(M, -1, -1):
        if j + oj[i][1] < M:
            dp[j + oj[i][1]] = min(dp[j + oj[i][1]], dp[j] + oj[i][0])
    dp[oj[i][1]] = min(dp[oj[i][1]], oj[i][0])

v = 0
for i in range(M):
    if dp[i] <= W:
        v = i
print(v)
def main():
  import sys
  input = sys.stdin.readline
  n,m=map(int,input().split())
  sc=[list(map(int,input().split())) for _ in range(m)]
  sc=sorted(sc,key=lambda x: (x[0],x[1]))
  l=[0.0]*n
  if n==1:
    if sc[0][1]==sc[-1][1]:
      print(sc[0][1])
      exit()
    else:
      print(-1)
      exit()
  for i in range(len(sc)):
    if type(l[sc[i][0]-1])==float:
      l[sc[i][0]-1]=sc[i][1]
    else:
      if l[sc[i][0]-1]!=sc[i][1]:
        print(-1)
        exit()
  if len(''.join([str(int(i)) for i in l]))==n and int(''.join([str(int(i)) for i in l]))>=pow(10,n-1):
    print(int(''.join([str(int(i)) for i in l])))
  else:
    print(-1)
  
if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
  import sys
  input = sys.stdin.readline
  n,m=map(int,input().split())
  if m==0:
    if n==1:
      print(0)
      exit()
    else:
      print(pow(10,n-1))
      exit()
  sc=[list(map(int,input().split())) for _ in range(m)]
  sc=list(map(list, set(map(tuple, sc))))
  sc=sorted(sc,key=lambda x: (x[0],x[1]))
  if len(sc)>n:
    print(-1)
    exit()
  l=['0']*n
  l[0]='1'
  if n==1:
    if sc[0][0]==1:
      print(sc[0][1])
      exit()
    else:
      print(-1)
      exit()
  for i in range(len(sc)):
    if type(l[sc[i][0]-1])==str:
      l[sc[i][0]-1]=sc[i][1]
    else:
      if l[sc[i][0]-1]!=sc[i][1]:
        print(-1)
        exit()
  if len(''.join([str(int(i)) for i in l]))==n and int(''.join([str(int(i)) for i in l]))>=pow(10,n-1):
    print(int(''.join([str(int(i)) for i in l])))
  else:
    print(-1)
  
if __name__ == '__main__':
    main()
# coding: utf-8
n = int(input())
a = list(map(int, input().split()))

tmp = 0
for i in a:
    tmp += 1 / a

print(tmp)


### FIXED CODE ###

# coding: utf-8
n = int(input())
a = list(map(int, input().split()))

tmp = 0
for i in a:
    tmp += 1 / i

print(1 / tmp)
# -*- coding: utf-8 -*-
"""
Created on Sat May 26 12:16:54 2018
DPL-1A Rec Call Revised
@author: maezawa
"""

n, m = list(map(int, input().split()))
c = list(map(int, input().split()))
c.sort(reverse=True)
dp = [float('inf') for _ in range(n+1)]
dp[0] = 0
#print(n,m)
#print(c)
#print(*dp, sep='\n')

def min_number(nn):
    if dp[nn] != float('inf'):
        return dp[nn]
    temp = []
    for i in range(m):
        if nn < c[i]:
            continue
        else:
            temp.append(min_number(nn-c[i])+1)
    dp[nn] = min(temp)
    return dp[nn]

print(min_number(n))


### FIXED CODE ###

n, m = list(map(int, input().split()))
c = list(map(int, input().split()))
    
dp = [0] * (n+1)
for i in range(1, n+1):
    dp[i] = min([dp[i - c[j]]+1 for j in range(m) if i-c[j]>=0])

print(dp[n])
n = int(input())
c = []
not_c = []
chosen = set()
ans = 0
for i in range(n):
	a, b = map(int, input().split())
	not_c.append([max(a, b), i])
	c.append([min(a, b), i])
	ans += min(a, b)
	if a < b:
		chosen.add("a")
	elif a > b:
		chosen.add("b")

if len(chosen) < 2:
	print(ans)
else:
	c = sorted(c, reverse=True)
	not_c = sorted(not_c)
	#print(c, not_c)
	#used_c = [False] * n
	#used_n = [False] * n

	if c[0][1] != not_c[0][1]:
		ans = ans - c[0][0] + not_c[0][0]
		c_cur = 1
		not_cur = 1
	else:
		ans = min(ans - c[1][0] + not_c[0][0], ans - c[0][0] + not_c[1][0])
		if ans - c[1][0] + not_c[0][0] <= ans - c[0][0] + not_c[1][0]:
			c_cur = 2
			not_cur = 1
		else:
			c_cur = 1
			not_c = 2
	if c_cur < n and not_cur < n:
		while c[c_cur][0] > not_c[not_cur][0]:
			if c[c_cur][1] != not_c[not_cur][1]:
				ans = ans - c[c_cur][0] + not_c[not_cur][0]
				c_cur += 1
				not_cur += 1
			elif c_cur == n - 1 or not_cur == n - 1:
				break
			else:
				ans = min(ans - c[c_cur+1][0] + not_c[not_cur][0], ans - c[c_cur][0] + not_c[not_cur+1][0])
				if ans - c[c_cur+1][0] + not_c[not_cur][0] <= ans - c[c_cur][0] + not_c[not_cur+1][0]:
					c_cur += 2
					not_cur += 1
				else:
					c_cur += 1
					not_cur += 2
			if c_cur >= n or not_cur >= n:
				break
	print(ans)


### FIXED CODE ###

n = int(input())
c = []
not_c = []
chosen = set()
ans = 0
for i in range(n):
	a, b = map(int, input().split())
	not_c.append([max(a, b), i])
	c.append([min(a, b), i])
	ans += min(a, b)
	if a < b:
		chosen.add("a")
	elif a > b:
		chosen.add("b")

if len(chosen) < 2:
	print(ans)
else:
	c = sorted(c, reverse=True)
	not_c = sorted(not_c)
	#print(c, not_c)
	#used_c = [False] * n
	#used_n = [False] * n

	if c[0][1] != not_c[0][1]:
		ans = ans - c[0][0] + not_c[0][0]
		c_cur = 1
		not_cur = 1
	else:
		ans = min(ans - c[1][0] + not_c[0][0], ans - c[0][0] + not_c[1][0])
		if ans - c[1][0] + not_c[0][0] <= ans - c[0][0] + not_c[1][0]:
			c_cur = 2
			not_cur = 1
		else:
			c_cur = 1
			not_cur = 2
	if c_cur < n and not_cur < n:
		while c[c_cur][0] > not_c[not_cur][0]:
			if c[c_cur][1] != not_c[not_cur][1]:
				ans = ans - c[c_cur][0] + not_c[not_cur][0]
				c_cur += 1
				not_cur += 1
			elif c_cur == n - 1 or not_cur == n - 1:
				break
			else:
				ans = min(ans - c[c_cur+1][0] + not_c[not_cur][0], ans - c[c_cur][0] + not_c[not_cur+1][0])
				if ans - c[c_cur+1][0] + not_c[not_cur][0] <= ans - c[c_cur][0] + not_c[not_cur+1][0]:
					c_cur += 2
					not_cur += 1
				else:
					c_cur += 1
					not_cur += 2
			if c_cur >= n or not_cur >= n:
				break
	print(ans)
N,K = map(int, input().split())
p=list(map(int,input().split()))

final_answer=0
for i in range(N-K+1):
    ans=0
    for j in  range(i,i+K):
        ans+=(0.5*(p[j]+1))
        if ans>=final_ans:
            final_ans=ans

print(final_ans)

### FIXED CODE ###

from itertools import accumulate

N,K = map(int, input().split())
p=list(map(int,input().split()))

q=[0]+p
q=list(accumulate(q)) 

ans=[]
for i in range(N-K+1):
    ans.append(((q[i+K]-q[i])+K)*0.5)

print(max(ans))
A = int(input())
B = int(input())
print("{} {}".format((A - 1)(B - 1)))

### FIXED CODE ###

l = list(map(int, input().split()))
print((l[0] - 1 ) * (l[1] - 1))
A,B,C = map(int,(input()))

if A + B >= C:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

A,B,C = map(int,input().split())

if A + B >= C:
    print('Yes')
else:
    print('No')
a,b.c=map(int,input().split())
L=[a,b,c]
L.sort()
if L[0]==L[2]:
  print(1)
elif　L[0]<L[1]<L[2]:
  print(3)
else:
  print(2)

### FIXED CODE ###

a,b,c=map(int,input().split())
if a==b==c:
  print(1)
elif a==b or b==c or c==a:
  print(2)
else:
  print(3)
import math

a=int(input())
li = list(map(int,input().split()))
cnt = li[0]
for i in li:
    cnt = math.gcd(cnt, i)
print(cnt)

### FIXED CODE ###

import fractions

a=int(input())
li = list(map(int,input().split()))
cnt = li[0]
for i in li:
    cnt = fractions.gcd(cnt, i)
print(cnt)
import sys
input = lambda: sys.stdin.readline().rstrip()

n= int(input())
a=list(input())

v=a.count('1')

ans=[0]*n
A=[0]*n
# n以下の残り回数を記録
for i in range(v+1):
    x=i
    cnt=0
    while x>0:
        cnt+=1
        r = 0
        for j in range(19):
            if (x>>j)&1:
                r+=1
            if x>>j==0:
                break
        x=x%r
    ans[i]=cnt


# 各桁をv＋１で割ったあまり
q = [0]*n
# 各桁をv-1で割ったあまり
r = [0]*n
for i in range(n):
    if a[i]=='1':
        if v!=0:
            q[i] = pow(2, n-i-1,v+1)
        if v!=1:
            r[i] += pow(2, n-i-1,v-1)
qq=sum(q)
rr=sum(r)

for i in range(n):
    if a[i]=='1':
        if v!=1:
            z = rr - pow(2,n-i-1,v-1)
            cnt = z % (v - 1)
            A[i] = 1 + ans[cnt]
    else:
        z=qq+pow(2,n-i-1,v+1)
        cnt=z%(v+1)
        A[i]=1+ans[cnt]

for i in A:
    print(i)

### FIXED CODE ###

import sys
input = lambda: sys.stdin.readline().rstrip()

n= int(input())
a=list(input())

v=a.count('1')

ans=[0]*n
A=[0]*n
# n以下の残り回数を記録
for i in range(n):
    x=i
    cnt=0
    while x>0:
        cnt+=1
        r = 0
        for j in range(19):
            if (x>>j)&1:
                r+=1
            if x>>j==0:
                break
        x=x%r
    ans[i]=cnt

# 各桁をv＋１で割ったあまり
q = [0]*n
# 各桁をv-1で割ったあまり
r = [0]*n
for i in range(n):
    if a[i]=='1':
        if v!=0:
            q[i] = pow(2, n-i-1,v+1) 
        if v!=1:
            r[i] += pow(2, n-i-1,v-1) 
qq=sum(q)
rr=sum(r)

for i in range(n):
    if a[i]=='1':
        if v!=1:
            z = rr - pow(2,n-i-1,v-1)
            cnt = z % (v - 1)
            A[i] = 1 + ans[cnt]
    else:
        z=qq+pow(2,n-i-1,v+1)
        cnt=z%(v+1)
        A[i]=1+ans[cnt]

for i in A:
    print(i)
# B
a, b = map(int, input().split())
s = input()
n = len(s)
nums = list(range(10))
point = 0
flag = 'Yes'

while (0<=point<=n-1):
    if point == a:
        if s[point] != '-':
            flag = 'No'
    else:
        if int(s[point]) not in nums:
            flag = 'No'
    point += 1
print(flag)

### FIXED CODE ###

a, b = map(int, input().split())
s = input()

if (s[a]=='-' and s.count('-')==1):
    print('Yes')
else:
    print('No')
s = str(input())
i = 0
ch = "keyence"
while len(s) > 7:
    if s[i] != ch[i]:
        s = s[:i] + s[i+1:]
    else:
        i += 1
if s == ch:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

s = str(input())
n = len(s) - 7
for i in range(n,len(s)):
    if s[:i-n] + s[i:] == "keyence":
        print("YES")
        exit()
print("NO")