peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
n,k = [int(x) for x in input().split()]
r,s,p = [int(x) for x in input().split()]
t = list(input())

for i in range(n-k):
    if t[k+i] == t[i]:
        t[k+i] = 0

print(t.count("r")*p + t.count("s")*r + t.count("p")*s)
# Judge status: Accepted
S = input()
T = input()
count = 0

for i in range(len(S)):
    if S[i] != T[i]:
        count += 1

print(count)
# Judge status: Accepted
s = input()
t = input()

sl = list(s)
tl = list(t)

from collections import Counter
sc = Counter(sl)
tc = Counter(tl)

sp =[]
tp =[]

alp = "abcdefghijklmnopqrstuvwxyz"

for i in alp:
    sp.append(sc[i])
    tp.append(tc[i])

sps =sorted(sp)
tps = sorted(tp)

for i,j in zip (sps,tps):
    if i ==j:
        pass
    else:
        print("No")
        exit()
print("Yes")
# Judge status: Accepted
S = input()
odd = S[::2]
even = S[1::2]
if not('L' in odd) and not('R' in even):
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
import numpy as np
n=int(input())
a=np.array([int(x) for x in input().split()])
x=[]
for i in a:
	s=sum((a-i)*(a-i))
	x.append(s)
print(min(x))
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
ans = 0

from collections import defaultdict
dd = defaultdict(int)
for key in a:
    dd[key] += 1
for key in dd.keys():
    #print(key,dd[key])
    if dd[key]>=key:
        ans += dd[key]-key
    else:
        ans += dd[key]
print(ans)
# Judge status: Accepted
import sys

s = sys.stdin.readline().rstrip()

def main():
    s1 = s[::2]
    s2 = s[1::2]
    res1 = s1.count('1') + s2.count('0')
    res2 = s1.count('0') + s2.count('1')
    return min(res1, res2)

if __name__ == '__main__':
    ans = main()
    print(ans)
# Judge status: Accepted
from sys import stdin
from sys import setrecursionlimit
setrecursionlimit(10 ** 7)

n,k = map(int,stdin.readline().rstrip().split())
a = list(map(int,stdin.readline().rstrip().split()))
a = [0]+a
bunki = 0
now = a[1]
lip = [1]
se = set()
while True:
    bunki += 1
    if now in se:
        break
    se.add(now)
    lip.append(now)
    now = a[now]

tenki = lip.index(now)
lis = lip[tenki:]
roop = bunki-tenki

if k < tenki: 
    print(lip[k])
    exit()
k -= tenki

print(lis[k%roop])
# Judge status: Accepted
a,b=input().split()
a=int(a)
b=int(b)

ans=a*b

if (a*b)%2!=0: #odd
    print('Odd')
else: #even
    print('Even')
# Judge status: Wrong Answer
n = input()
l = len(n)
n = int(n)

if n % 10 == 0:
  print((l - 1) * 9)
else:
  s = list(str(n))
  result = int(s[0]) - 1
  result += (l - 1) * 9
  
  print(result)
# Judge status: Accepted
n,m=map(int,input().split())
if n<m:
            ans=n+(m-n*2)//4
            print(ans)
elif 2*n>=m:
            ans=m//2
            print(ans)
# Judge status: Accepted
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [list(input()) for _ in range(n)]


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

if (b+W < a):
    print(a-(b+W))
elif (a+W < b):
    print(b-(a+W))
else:
    print(0)
# Judge status: Wrong Answer
n,k = map(int,input().split())
ans,cnt = 0,0
for i in range(1,n+1):
	while(i<k):
		i = i*2
		cnt += 1
		print(i,cnt)
	ans += (1/n)*(1/2)**cnt
	cnt = 0
print(ans)
# Judge status: Accepted
s=list(input())
t=list(input())

s="".join(sorted(s))
t="".join(sorted(t,reverse=True))

ans=sorted([s,t])

if ans[0] == s and s!=t:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
N, C, K = map(int, input().split())
T = sorted([int(input()) for i in range(N)])

nw = T[0]
bs = 1
ans = 1
for i in range(1, N):
    t = T[i]
    if bs == C:
        bs = 0
        nw = t
        ans += 1
    elif t-nw > K:
        bs = 0
        nw = t
        ans += 1
    else:
        bs += 1
else:
    if bs > 0:
        ans += 1

print(ans)
# Judge status: Wrong Answer
x=int(input())
print(int(x**(1/2))**2)
# Judge status: Accepted
n = int(input())

n = n%10

if n == 3:
    print("bon") 
elif n == 0 or n == 1 or n == 6 or n == 8:
    print("pon") 
else:
    print("hon")
# Judge status: Accepted
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, K = lr()
S = list(sr())
S[K-1] = S[K-1].lower()
print(''.join(S))
# Judge status: Accepted
x = int(input())

for k in range(1, 361):
    n = k*x/360
    if n%1 ==0:
        break
print(k)
# Judge status: Accepted
s = input()
n = len(s)

dp = [0] * (n + 1)
dp[1] = 1
dp[2] = dp[1] + (1 if s[0] != s[1] else 0)

for i in range(2, n):
    if s[i] != s[i-1]:
        dp[i+1] = dp[i] + 1
    else:
        dp[i+1] = dp[i-2] + 2
    

print(dp[n])
# Judge status: Accepted
S = input()
N = len(S)
S1 = S[0:(N-1)//2]
S2 = S[(N+3)//2-1:N+1]
print("Yes" if S == S[::-1] and S1 == S1[::-1] and S2 == S2[::-1] else "No")
# Judge status: Wrong Answer
list = []
list1 = []
list2 = []
list3 = []
list5 = []
list1 = input().split()
list2 = input().split()
list3 = input().split()
list.extend(list1)
list.extend(list2)
list.extend(list3)
n = int(input())
b = 1
for i in range(0,n):
    a = (input())
    list5.append(a)
for item in list5:
        for items in list:
            if items==item:
                print('Yes')
                b = 1
            break
if b!=1:
    print('No')
# Judge status: Accepted
N = int(input())
nums = {}
for i in range(N):
    n = int(input())
    if n in nums.keys():
        nums[n] += 1
    else:
        nums[n]=1
c = 0
for te in nums.values():
   if te % 2 == 1:
       c+=1
print(c)
# Judge status: Accepted
n = int(input())
high = list(map(int,input().split()))

a = []
count = 0

for x in range(n-1):
  if high[x]-high[x+1] >= 0 :
    count += 1
  else:
    a.append(count)
    count = 0
a.append(count)

print(max(a))
# Judge status: Accepted
w,h,x,y=map(int,input().split())
if x==w/2 and y==h/2:
    print(w*h/2,1)
else:
    print(w*h/2,0)
# Judge status: Accepted
N,M,K = map(int, input().split())

for n in range(N+1):
  for m in range(M+1):
    if n*M + m*N - 2*n*m == K:
      print('Yes')
      exit()
else:
  print('No')
# Judge status: Accepted
N=int(input())
print((N*(N+1))//2)
# Judge status: Wrong Answer
n=int(input())
p=[i for i in range(3,n+1,2)]
p=[2]+p
prime=[2]
std=[True]*(n+1)
for i in p:
  if std[i]:
    if i%prime[-1]!=0:
      prime.append(i)
      for j in range(n//i):
        std[i*j]=False
  else:
    continue
    
for i in range(n):
  t=n+i
  for j in prime:
    if t%j==0:
      break
  else:
    print(n+i)
    break
# Judge status: Accepted
s = [0,1,2,3]
s[int(input())] = 0
s[int(input())] = 0
print(sum(s))
# Judge status: Wrong Answer
n = int(input())
cnt = 0
for i in range(26):
    for j in range(16):
        if i * j == n:
            cnt += 1
if cnt >= 1:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
import math

N = int(input())
A = list(map(int, input().split()))
ans = A[0]

for a in A[1:]:
    ans = math.gcd(ans, a)
print(ans)
# Judge status: Wrong Answer
N = int(input())
As = [int(input()) for _ in range(N)]
from bisect import bisect_right

def LIS(L):
    dp = [L[0]]
    length = len(L)
    for i in range(1, length):
        a = L[i]
        if a <= dp[0]:
            dp.insert(0, a)
        else:
            dp[bisect_right(dp, a)-1] = a
    return dp

print(len(LIS(As)))
# Judge status: Accepted
N,X = list(map(int, input().split()))
x = sorted([X] + list(map(int, input().split())))

gaps = [b-a for a,b in zip(x, x[1:])]

from fractions import gcd
g1=gaps[0]
for g2 in gaps[1:]:
    g1 = gcd(g1, g2)

print(g1)
# Judge status: Accepted
n = int(input())
s = input()

if s[0:n//2] == s[n//2:n] :
  print('Yes')
else :
  print('No')
# Judge status: Accepted
N = int(input())

print((1000 - N % 1000)%1000)
# Judge status: Accepted
import math

h = int(input())
w = int(input())
n = int(input())
print(min(math.ceil(n / h), math.ceil(n / w)))
# Judge status: Accepted
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

from operator import itemgetter 
def main():
    N = int(readline())
    tasks = []
    for _ in range(N):
        a, b = map(int, readline().split())
        tasks.append((a, b))
    tasks.sort(key=itemgetter(1))
    time = 0
    for a, b in tasks:
        time += a
        if time > b:
            print('No')
            return  
    print('Yes')
if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
n=int(input())
c1,c2,c3,c4=0,0,0,0
for i in range(n):
  s=input()
  if(s=='AC'):
    c1+=1
  elif(s=='WA'):
    c2+=1
  elif(s=='TLE'):
    c3+=1
  else:
    c4+=1
print('AC X'+' '+str(c1))
print('WA X'+' '+str(c2))
print('TLE X'+' '+str(c3))
print('RE X'+' '+str(c4))
# Judge status: Accepted
from itertools import combinations_with_replacement
N,M,Q=map(int,input().split())
G=[]
for _ in range(Q):
  A,B,C,D=map(int,input().split())
  G.append([A,B,C,D])

max_score=0
for A in combinations_with_replacement(range(1,M+1),r=N):  
  score=0
  for a,b,c,d in G:
    if A[b-1]-A[a-1]==c:
      score+=d
    max_score=max(max_score,score)
print(max_score)
# Judge status: Accepted
x,try_k = map(int,input().split())

input_x = input().split()

list_a = [0]*x
list_b = [[] for i in range(x)]
for i in range(len(list_a)):
  list_a[i] = int(input_x[i])

for i in range(try_k):
  a,b = map(int,input().split())
  
  list_b[b-1].append(list_a[a-1])
  list_b[a-1].append(list_a[b-1])
  
#print(list_b)
count = 0
for i in range(x):
  if(len(list_b[i]) == 0):
     count += 1
     continue
  if(list_a[i] > max(list_b[i]) ):
    count += 1
print(count)
# Judge status: Accepted
N = int(input())
S = input()

count = 0
flag = False

for index, s in enumerate(S):
  if s == '(':
    flag = True
    count += 1

  if flag and s == ')' and count != 0:
    count -= 1

  if not flag:
    continue

if count > 0:
  S += ')' * count

count = 0
flag = False

for index, s in enumerate(S[::-1]):
  if s == ')':
    flag = True
    count += 1

  if flag and s == '(' and count != 0:
    count -= 1

  if not flag:
    continue

if count > 0:
  S = '(' * count + S

print(S)
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split()))
sm=sum(a)
i=0
han=0

while sm/2>han:
  if i==n-1:
    break
  han+=a[i]
  i+=1

print(abs(2*han-sm))
# Judge status: Wrong Answer
s = list(input())

for i in range(len(s)-2):
    adana = s[i:i+3]
    if adana[1] != "a" and adana[1] != "i" and adana[1] != "u" and adana[1] != "e" and adana[1] != "o":
        continue
    else:
        print("".join(adana))
        break
# Judge status: Wrong Answer
import bisect
n=int(input())
a=sorted(list(map(int,input().split())))
ind=bisect.bisect_left(a,0)


if ind==0 :
  print(sum(a))
  
elif ind==n:
  print(-sum(a)+2*a[-1])

elif ind%2==0 or a[ind]==0:

  print(-sum(a[:ind])+sum(a[ind:]))
else:
  print(-sum(a[:ind])+sum(a[ind:])-2*min(abs(a[ind]),abs(a[ind-1])))
# Judge status: Accepted
N = int(input())
s = input()
t = input()

for i in range(N):
    if s[i:] == t[:N-i]:
        break
else:
    i += 1
print(N + i)
# Judge status: Wrong Answer
N = int(input())
A = [input() for _ in range(N)]
pre = A[0]
for a in A[1:]:
  if A.count(pre) >= 2:
    print("No")
    exit()
  if pre[-1] == a[0]:
    pre = a
print("Yes")
# Judge status: Wrong Answer
n = int(input())
bonus = n % 15
bonus = (n - bonus) / 15
print((n * 800) - (bonus * 200))
# Judge status: Wrong Answer
a,b= map(int, input().split())
min = 100000000000000000000


if a== 0:
  print(a)
elif a <= b:
  while min > abs(a-b):
    min = abs(a-b)
    a   =abs(a-b)
elif a > b:
  a = a%b
  while min > abs(a-b):
    min = abs(a-b)
    a   =abs(a-b)
  
print(min)
# Judge status: Accepted
from collections import deque

k = int(input())

LL = [i for i in range(1, 10)]
LL = deque(LL)
for j in range(k):
    num = LL.popleft()
    amari = num % 10
    kouho = [amari - 1, amari, amari + 1]
    for nn in kouho:
        if nn >= 0 and nn < 10:
            LL.append(10 * num + nn)
print(num)
# Judge status: Wrong Answer
N = input()
T, A = map(int, input().split())
print(T)
temperatures = list(map(int, input().split()))

r = 50000000000000
results = ''

list = [T - t * 0.006 for t in temperatures]
for index, avg_temp in enumerate(list):      
    ondo_sa = A - avg_temp
    if r > abs(ondo_sa):
        r = ondo_sa
        results = index + 1
print(results)
# Judge status: Accepted
#! /usr/bin/env python3

import sys
import numpy as np
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

N, *A = map(int, read().split())

cnt = 0
acc = 0
for a in A:
    if a != 0:
        acc += a
    else:
        cnt += acc // 2
        acc = 0
cnt += acc // 2

print(cnt)
# Judge status: 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 < 1000000000000000000000):
        ans = lcm(ans, n)
print(int(ans))
# Judge status: Accepted
def N():
    return int(input())
def L():
    return list(map(int,input().split()))
def NL(n):
    return [list(map(int,input().split())) for i in range(n)]
mod = pow(10,9)+7
#import numpy
y = 100
x = N()
cnt = 0
while(1):
    cnt += 1
    y = (y*101)//100
    #print(y)
    if y >= x:
        print(cnt)
        break
# Judge status: Accepted
h, n = map(int,input().split())
a = list(map(int,input().split()))

sum_a = sum(a)

if sum_a < h:
    print('No')
else:
    print('Yes')
# Judge status: Wrong Answer
w,a,b = map(int,input().split())
#print(w,a,b)
if a+w == b:
  print(w)
elif a+w < b:
  print(b-(a+w))
elif a+w > b:
  print(0)
elif a == b:
  print(0)
# Judge status: Accepted
N, A, B = map(int, input().split())
OutPut = 0

for i in range(1,N+1):
  moji = str(i)    #文字列
  leng = len(moji) #文字長
  
  S = 0
  for j in range(leng):
    S += int(moji[j])
  
  if S >= A and S <= B:
    OutPut += i
    
print(OutPut)
# Judge status: Accepted
a, b, k = map(int, input().split())

a -= k
if a < 0:
    if b + a > 0:
        print(0, b+a)
    else:
        print(0, 0)
else:
    print(a, b)
# Judge status: Wrong Answer
import numpy as np
n = int(input())
a = np.array(list(map(int, input().split())))

a4 = len(a[a % 4 == 0])
a2n = len(a[a % 2 != 0])
a2 = len(a[a % 2 == 0])

print("Yes" if (a4 + 1 + a2 % 2) >= a2n+1 else "No")
# Judge status: Accepted
a, b = input().split()
n = int(a+b)
if (n**0.5).is_integer():
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
N,a,b = map(int, input().split())
ans = 0
for i in range(1,N+1):
  m = int(i/1000)
  n = int((i%1000)/100)
  j = int((i%100)/10)
  k = i%10
  sum = m + n + j + k 
  if a <= sum <= b:
    ans = ans + i

print(ans)
# Judge status: Wrong Answer
h = int(input())
w = int(input())
n = int(input())

if h>w:
	nBig = h
else:
    nBig = w
    
ans = int(n/nBig)+1

print(ans)
# Judge status: Accepted
n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

counter = 0
for i in range(n):
  d = min(A[i], B[i])
  A[i] -= d
  B[i] -= d
  counter += d
  d = min(A[i+1], B[i])
  A[i+1] -= d
  B[i] -= d
  counter += d
print(counter)
# Judge status: Accepted
# Problem A - Harmony

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

# initialization
K = A + B

# check
if K%2==0:
    K = K // 2
    print(K)
else:
    print("IMPOSSIBLE")
# Judge status: Accepted
import sys
n = int(input())
ls = [int(input()) for _ in range(n)]
mx = max(ls)
c = ls.count(mx)
new = ls[:]
new.remove(mx)
nx = max(new)
if c > 1:
    for _ in range(n):
        print(mx)
    sys.exit()
for i in ls:
    if i == mx:
        print(nx)
    else:
        print(mx)
# Judge status: Accepted
import numpy as np
 
mod = 10**9 + 7
 
N = int(input())
A = np.array(list(map(int, input().split())))
 
 
ans = 0
for n in range(len(bin(max(A)))):   
    n_1 = np.count_nonzero((A >> n)&1)   
    n_0 = N - n_1                       
    ans += ((2 ** n)*n_1*n_0) % mod

print(ans%mod)
# Judge status: Accepted
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    N = int(input())
    S = input()
    T = input()
    ans = N*2
    for i in range(N):
        s = S[i:]
        t = T[:N-i]
        if s == t:
            ans -= N-i
            break
    print(ans)

if __name__ == '__main__':
    main()
# Judge status: Accepted
a=list(input())
b=list(input())

if a==b[::-1]:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    n = int(readline())
    a = list(map(int, readline().split()))
    dp = [0] * 61
    for i in range(60, -1, -1):
        for v in a:
            dp[i] += v >> i & 1
    t = 0
    for i in range(61):
        t += dp[i] * (n - dp[i]) * pow(2, i)
        t %= mod
    print(t)


if __name__ == '__main__':
    solve()
# Judge status: Wrong Answer
r = int(input())
circle1 = r*r
circle2 = 1*1
a = circle1 / circle2
print(a)
# Judge status: Accepted
N=int(input())
dic={}
ans=0

for i in range(N):
    s=input()
    t=sorted(s)
    word="".join(t)

    if word in dic:
        dic[word]+=1
    else:
        dic[word]=1

for i in dic:
    ans+=dic[i]*(dic[i]-1)//2

print(ans)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
sa = set(a)
if len(a) == len(sa):
  print("YES")
else:
  print("NO")
# Judge status: Accepted
def Main(S):
    return "Yes" if 'A' in S and 'B' in S else "No"
    
def main():
    S = str(input())
    print(Main(S))

if __name__ == '__main__':
    main()
# Judge status: Accepted
n, m = map(int, input().split())
factors = [1, m]
sqrt = round(m ** 0.5 + 0.5)
for i in range(2, sqrt + 1):
    if not m % i:
        factors.append(i)
        factors.append(m // i)
factors = sorted(factors)
def search(l):
    for i in l:
        if i >= n:
            return m // i
print(search(factors))
# Judge status: Wrong Answer
x, y = map(int, input().split())
n = (4*x - y)/2
m = (y - 2*x)/2

if n > 0 and m > 0:

    if n == int(n) and m == int(m):
      print("Yes")
    else:
      print("No")
else:
    print("No")
# Judge status: Accepted
numerosStr = input().split(" ")
numero=[]
for j in numerosStr:
    numero.append(int(j))

if numero[0] >= 13:
    print(numero[1])
elif numero[0] >= 6 and numero[0] <=12:
    print(int(numero[1]/2))
elif numero[0]<=5:
    print(0)
# Judge status: Accepted
N,a=int(input()),1
while a*2<=N:a*=2
print(a)
# Judge status: Wrong Answer
S = str(input())
sam = ['A','C','G','T']
count = 0
for i in range(len(S)):
    if i == 0 and S[i] in sam:
        count+=1
    elif i > 0:
        if count == 0 and S[i] in sam:
            count+=1
        elif S[i] in sam and S[i-1] in sam:
            count+=1
        
print(count)
# Judge status: Accepted
#C
import math
a,b,h,m = map(int,input().split())
#時間t(hour)
t = h + m/60
#a,bの角度
a_theta = t * 30
b_theta = (t * 360) % 360

theta = abs(a_theta - b_theta)

c = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(theta)))

print(c)
# Judge status: Wrong Answer
N,K = map(int,input().split())
A = list(map(int,input().split()))

one = A.index(1)
i = one
ans = None
if one == 0 or one == N-1:
  ans = -(-(N-1) // (K-1))
else:
  left = -(-i // (K-1))
  right = -(-(N - i - 1 - (i % (K-1)))//(K-1))
  ans = left + right
  
print(ans)
# Judge status: Wrong Answer
x,y,z = map(int,input().split())
num = x//(y+z)
mod = x%(y+z)
if 0<=mod<=z:num-=1
print(num)
# Judge status: Wrong Answer
a, b = map(int,input().split())

ans = 1
outlet = 4

while outlet < b:
    outlet += a - 1
    ans += 1

print(ans)
# Judge status: Wrong Answer
fv = [[0 for i in range(2)] for j in range (26)]
for i in range (2):
    for c in input():
        fv[ord(c)-ord('a')][i] += 1
ans = 0
for i in range(26):
    ans += fv[i][0]-fv[i][1] if fv[i][0] > fv[i][1] else 0
print(ans)
# Judge status: Accepted
n, t = map(int, input().split())
# 経路の最小コスト
a = 10**19
for _ in range(n):
    c, tt = map(int, input().split())
    if t >= tt:
        a = min(c, a)
# 対象経路がない
if a == 10**19:
    print('TLE')
else:
    print(a)
# Judge status: Accepted
S = int(input())
pay = 1000
while S > pay:
    pay += 1000
else:
    print(pay - S)
# Judge status: Wrong Answer
s,t=input().split()
a,b=map(int,input().split())
u=input()

if u=="red":
    print(a-1,b)
else:
    print(a,b-1)
# Judge status: Accepted
N = int(input())
H = list(map(int, input().split()))

ans = 0
cnt = 0
for i in range(1, N):
  if H[i - 1] >= H[i]:
    cnt += 1
    ans = max(ans, cnt)
  else:
    cnt = 0
print(ans)
# Judge status: Wrong Answer
N, K = map(int, input().split())
D = input().split()
n = 1
i = 0
while i < 1:
  Ans = str(N * n)
  n += 1
  i = 1
  for ans in Ans:
    if ans in D:
      i = 0
print(Ans)
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))
A = [a%4 for a in A]
m = A.count(0)
P = 3+2*(m-1) if m>0 else 0
n = A.count(2)
Q = n-1 if n>0 else 0
print("Yes" if P+Q>=N else "No")
# Judge status: Accepted
import fractions
a, b, c, d = map(int, input().split())
a -= 1
lcm = c//fractions.gcd(c, d)*d
cnt = b//c + b//d - b//lcm - (a//c + a//d - a//lcm)
print(b-a-cnt)
# Judge status: Accepted
import math
n, k = map(int, input().split())
A = list(map(int, input().split()))

max_len = max(A)
def f(x):
    ans = 0
    for a in A:
        cut_num = math.ceil(a / x) - 1
        #print(a, cut_num, a / x)
        ans += cut_num
    if ans <= k:
        return True
    else:
        return False

left = 0.001
right = max_len
while right - left > 1:
    mid = (right + left) // 2
    if f(mid):
        right = mid
    else:
        left = mid
else:
    print(int(right))
# Judge status: Wrong Answer
n = int(input())
l = list(map(int,input().split()))
a = []
if n % 2 == 0:
  a = l[::-2]+l[0::2]
else:
  a = l[::-2]+l[1::2]
print(a)
# Judge status: Accepted
import numpy as np

N = int(input())

ARR = []
for i in range(N):
    ARR.append(int(input()))


def calculate(n,arr):
    arr = sorted(arr)
    arr = np.array(arr)


    total = np.sum(arr)

    indexes = np.where(arr % 10 != 0)

    if total % 10 != 0:
        print(total)
        return

    if indexes[0].__len__() == 0:
        print(0)
        return


    print(total - arr[indexes[0][0]])
    return


calculate(N,ARR)
# Judge status: Wrong Answer
n, k = map(int, input().split())
a = list(map(int, input().split()))

hyoten = 1
mae = 1
for i in range(n-k+1):
    mae = hyoten
    hyoten = 1
    for j in range(i, i+k):
        hyoten *= a[j]
    if mae == 1:
        continue
    else:
        if hyoten > mae:
            print("Yes")
        else:
            print("No")
# Judge status: Accepted
def resolve():
    a, b, k = map(int, input().split())
    if a+k-1 >= b-k+1:
        for i in range(a, b+1):
            print(i)
    else:
        for i in range(a, a+k):
            print(i)
        for i in range(b-k+1, b+1):
            print(i)
resolve()
# Judge status: Accepted
n = int(input())
w = list(map(int, input().split()))

sum_w = []
sum = 0
for i in range(n):
    sum += w[i]
    sum_w.append(sum)

diff  = sum
for i in range(n):
    if diff < abs(sum - 2*sum_w[i]):
        break
    else:
        diff = abs(sum - 2*sum_w[i])
print(diff)
# Judge status: Accepted
N, K = map(int, input().split())
h = list(map(int, input().split()))

dp = [float("inf") for _ in range(N)]

def cost(n, m):
  return abs(h[n] - h[m])

dp[0] = 0

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

print(dp[-1])
# Judge status: Accepted
N = int(input())
S = list(input())
arr_R = []
arr_G = []
arr_B = []

for idx,s in enumerate(S):
  if s=="R":
    arr_R.append(idx+1)
  elif s=="G":
    arr_G.append(idx+1)
  else:
    arr_B.append(idx+1)

ans = len(arr_R)*len(arr_G)*len(arr_B)
omit = 0

for i in range(N):
  for j in range(i+1,N):
    k = 2*j-i
    if k<N:
      if not (S[i]==S[j] or S[j]==S[k] or S[k]==S[i]):
        omit += 1
print(ans-omit)
# Judge status: Accepted
a=int(input())
s=str(input())

if a>=3200:
  print(s)
else:
  print('red')
# Judge status: Wrong Answer
*s, t = map(int, input().split())
s.sort()
for i in range(s[0],s[1]):
  if i == t:
    print("Yes")
print("No")