Harryxun/stf_run huggingface dataset:
import time
import copy
from threading import Thread
import random

import threading


d = int(input())
c = list(map(int,input().split()))
s = []
day = [0 for i in range(26)]
for i in range(d):
    s.append(list(map(int,input().split())))
ans = 0
num = 1
index = []
for i in s:
    max_index = -1
    large = 0
    for j in range(26):
        if large < i[j]:
            large = i[j]
            if not max_index == -1:
                ans -= c[max_index]*(num-day[max_index])
            max_index = j
        else:
            ans -= c[j]*(num-day[j])
    day[max_index] = num
    ans += large
    index.append(max_index+1)
    num += 1
rec = {}
cnt = 0
while True:
    if cnt == 20:
        for i in index:
            print(i)
        break
    x = random.randint(0,25)
    y = random.randint(0,d-1)
    if (x,y) in rec:
        continue
    rec[(x,y)] = 0
    sub = copy.deepcopy(index)
    sub[y] = x
    sub_ans = 0
    num = 1
    day = [0 for i in range(26)]
    for i in range(d):
        t = sub[i]
        day[t] = num
        for j in range(26):
            if j == t:
                sub_ans += s[i][j]
            else:
                sub_ans -= c[j]*(num-day[j])
        num += 1
    #print(sub_ans,sub,ans,index)
    if sub_ans > ans:
        index = sub_ans
    cnt += 1

### FIXED CODE ###

d = int(input())
c = list(map(int,input().split()))
s = []
day = [0 for i in range(26)]
for i in range(d):
    s.append(list(map(int,input().split())))
ans = 0
for i in s:
    max_index = -1
    large = 0
    for j in range(26):
        if large < i[j]:
            large = i[j]
            if not max_index == -1:
                day[max_index] += 1
                ans -= c[max_index]
            max_index = j
        else:
            day[j] += 1
            ans -= c[j]
    day[max_index] = 0
    ans += large
    print(max_index+1)
import sys
sys.setrecursionlimit(500000)

def main():
    N, M = map(int, input().split())
    E = [[] for _ in range(N+1)]
    for u, v, s in zip(*[iter(map(int, sys.stdin.read().split()))]*3):
        E[u].append((v, s))
        E[v].append((u, s))

    V = [[None] * (N+1), [None] * (N+1)]

    def dfs(v=1, sign=1, val=0):
        V[sign][v] = val
        sign = 1 - sign
        for u, s in E[v]:
            if V[sign][u] is None:
                dfs(u, sign, s-val)

    dfs()

    mi, ma = 1, float("inf")
    for m, p in zip(V[0][1:], V[1][1:]):
        if m is not None and p is not None:
            mp = m - p
            if mp % 2 == 0:
                a = mp // 2
                mi = max(mi, a)
                ma = min(ma, a)
            else:
                ma = -1
        if p is not None:
            mi = max(mi, 1-p)
        if m is not None:
            ma = min(ma, m-1)

    ans = max(0, ma-mi+1)

    if ans==0:
        assert False

    if ans == 1:
        A = [-1] * (N+1)
        def check(v=1, val=ma):
            A[v] = val
            for u, s in E[v]:
                if A[u] == -1:
                    check(u, s - val)
                else:
                    if A[u] != s - val:
                        print(0)
                        exit()

        check()
        #print(A)
    print(ans)

main()


### FIXED CODE ###

import sys
sys.setrecursionlimit(500000)

def main():
    N, M = map(int, input().split())
    E = [[] for _ in range(N+1)]
    for u, v, s in zip(*[iter(map(int, sys.stdin.read().split()))]*3):
        E[u].append((v, s))
        E[v].append((u, s))

    V = [[None] * (N+1), [None] * (N+1)]

    def dfs(v=1, sign=1, val=0):
        V[sign][v] = val
        sign = 1 - sign
        for u, s in E[v]:
            if V[sign][u] is None:
                dfs(u, sign, s-val)
            else:
                if V[sign][u] != s-val:
                    print(0)
                    exit()

    dfs()

    mi, ma = 1, float("inf")
    for m, p in zip(V[0][1:], V[1][1:]):
        if m is not None and p is not None:
            mp = m - p
            if mp % 2 == 0:
                a = mp // 2
                mi = max(mi, a)
                ma = min(ma, a)
            else:
                ma = -1
        if p is not None:
            mi = max(mi, 1-p)
        if m is not None:
            ma = min(ma, m-1)

    ans = max(0, ma-mi+1)

    # if ans == 1:
    #     A = [-1] * (N+1)
    #     def check(v=1, val=ma):
    #         A[v] = val
    #         for u, s in E[v]:
    #             if A[u] == -1:
    #                 check(u, s - val)
    #             else:
    #                 if A[u] != s - val:
    #                     print(0)
    #                     exit()
    #
    #     check()
        #print(A)
    print(ans)

main()
#A
S = input()
T = input()
Slist = list(S)
Tlist = list(T)
count = 0
for k in range len(Slist):
    if Slist[k] == Tlist[k]:
        count += 1
if count == len(Slist):
    print('Yes')
else:
    print('No')

### FIXED CODE ###

#A
S = input()
T = input()
Slist = list(S)
Tlist = list(T)
count = 0
for k in range (len(Slist)):
    if Slist[k] == Tlist[k]:
        count += 1
if count == len(Slist):
    print('Yes')
else:
    print('No')
a, b = map(int, input().split())
# 整数 N 個 (改行区切り)
#N = [int(input()) for i in range(N)]
# 整数 N 個 (スペース区切り)
#N = list(map(int, input().split()))
# 整数 (縦 H 横 W の行列)
#A = [list(map(int, input().split())) for i in range(H)]

if a % 2 == 1 and b % 2 == 1:
  print("Odd")
  else:
    print("Even")

### FIXED CODE ###

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

if a%2==0 or b%2==0:
  print("Even")
else:
  print("Odd")
import sys
input = sys.stdin.readline
import itertools

N, M = map(int, input().split())
ab = [list(map(int, input().split())) for n in range(N)]
branch = [[False]* N for n in range(N)]

for m in range(M):
  a = ab[m][0] - 1
  b = ab[m][1] -1 
  branch[a][b] = True
  branch[b][a] = True

ans = 0
pattern = list(itertools.permutations(range(1, N+1),N))
for l in pattern:
  if l[0] != 1:
    continue
  for n in range(N):
    if n == N - 1:
      ans += 1
      break
    p = l[n] -1
    np = l[n+1] -1
    if not(branch[p][np]):
      break

print(ans)

### FIXED CODE ###

import sys
input = sys.stdin.readline
import itertools

N, M = map(int, input().split())
ab = [list(map(int, input().split())) for n in range(M)]
branch = [[False]* N for n in range(N)]

for m in range(M):
  a = ab[m][0] - 1
  b = ab[m][1] -1 
  branch[a][b] = True
  branch[b][a] = True

ans = 0
pattern = itertools.permutations(range(1, N+1),N)
for l in pattern:
  if l[0] != 1:
    continue
  for n in range(N):
    if n == N - 1:
      ans += 1
      break
    p = l[n] -1
    np = l[n+1] -1
    if not(branch[p][np]):
      break

print(ans)
#! python3
# coding:utf-8
 
def main():
    n = int(input())
    ans = [0 for _ in range(n)]
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq < n+1:
                    ans[eq]+=1

    for i in ans:
        print(i)    

if __name__ == "__main__":
    main() 

### FIXED CODE ###

#! python3
# coding:utf-8
 
def main():
    n = int(input())
    ans = [0 for _ in range(n)]
    for x in range(1,100):
        for y in range(1,100):
            for z in range(1,100):
                eq = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if eq < n+1:
                    ans[eq-1]+=1
    for i in ans:   
        print(i)

if __name__ == "__main__":
    main()
a, b = input().split()

a = int(a)
b_unchi = b.split(".")
b_int = int(b_unchi[0])
b_float = int(b_unchi[1])
bbb = b_int * 100 + b_float
s = a * b
print(s // 100)

### FIXED CODE ###

a, b = input().split()

a = int(a)
b_unchi = b.split(".")
b_int = int(b_unchi[0])
b_float = int(b_unchi[1])
bbb = b_int * 100 + b_float
s = a * bbb
print(s // 100)
import copy
n,h=map(int,input().split())
ab=[list(map(int,input().split()),_) for _ in range(n)]
ab1=copy.copy(ab)
if n==1:print((h-ab[0][1])//ab[0][0]+2)
else:
    ab1.sort()
    ma=ab1[-1][0]
    l=[]
    for i in range(n):
        if ab1[i][0]==ma:l.append(ab1[i])
    l.sort()
    ak=ab.pop(l[0][2])
    ab.sort(key=lambda x:x[1])
    ac=0
    for i in range(1,n):
        if ak[0]>ab[-i][1]:
            h-=ak[0]
            ac+=1
        else:
            h-=ab[-i][1]
            ac+=1
        if h<=0:
            print(ac)
            exit()
    if h<=ak[1]:
        print(ac+1)
    else:
        ac+=((h-ak[1])//ak[0])+1
        print(ac)

### FIXED CODE ###

import copy
n,h=map(int,input().split())
ab=[list(map(int,input().split())) for _ in range(n)]
for i in range(n):
    ab[i].append(i)
ab1=copy.copy(ab)
if n==1 and (h-ab[0][1])%ab[0][0]==0:
    print((h-ab[0][1])//ab[0][0]+1)
elif n==1 and (h-ab[0][1])%ab[0][0]!=0:
    print((h-ab[0][1])//ab[0][0]+2)
else:
    ab1.sort()
    ma=ab1[-1][0]
    l=[]
    for i in range(n):
        if ab1[i][0]==ma:l.append(ab1[i])
    l.sort()
    ak=ab.pop(l[0][2])
    ab.sort(key=lambda x:x[1])
    ac=0
    for i in range(1,n):
        if ak[1]>=h:
            h-=ak[1]
            ac+=1
        elif ak[0]>ab[-i][1]:
            h-=ak[0]
            ac+=1
        else:
            h-=ab[-i][1]
            ac+=1
        if h<=0:
            print(ac)
            exit()
    if h<=ak[1]:
        print(ac+1)
    else:
        if (h-ak[1])%ak[0]==0:
            ac+=((h-ak[1])//ak[0])+1
        else:ac+=((h-ak[1])//ak[0])+2
        print(ac)
# -*- coding: utf-8 -*-
num = input()
if num % 2 == 0:
  print(num // 2)
else:
  print(num // 2 + 1)

### FIXED CODE ###

# -*- coding: utf-8 -*-
num = input()
if int(num) % 2 == 0:
  print(int(num) // 2)
else:
  print(int(num) // 2 + 1)
n, k = map(int, input().split())
if n == 0:
    print(0)
else:
    x = abs(n - k)
    a = n % x
    b = abs(a - k)
    print(min(a, b))


### FIXED CODE ###

n, k = map(int, input().split())
if n == 0 or n == k:
    print(0)
else:
    a = abs(n % k)
    b = abs(a - k)
    print(min(a, b))
a,b,n = map(int, input().split())
M = [0]*b
for x in range(0,b):
    M[x] = int(a*x/b) - a*int(x/b)

print(max(M))

### FIXED CODE ###

a,b,n = map(int, input().split())
m = min(n,b-1)
print(int(a*m/b)-a*int(m/b))
# a < b
def gcd(a,b):
    if b % a == 0:
        return a
    return gcd(b % a, a)

def lcm(a,b):
    return int(a*b/gcd(a,b))

N = int(input())
T = [int(input()) for _ in range(N)] 
T = sorted(T)

ret = 1
for t in T:
    ret = lcm(ret, t)
print(ret)

### FIXED CODE ###

# a < b
def gcd(a,b):
    if b % a == 0:
        return a
    return gcd(b % a, a)

def lcm(a,b):
    return a*b//gcd(a,b)

N = int(input())
T = [int(input()) for _ in range(N)] 
T = sorted(T)

ret = 1
for t in T:
    ret = lcm(ret, t)
print(ret)
s=raw_input()
month=int(S[5:7])
if month>=5:
  print "TBD"
else:
  print "HeiSei"
  

### FIXED CODE ###

S=raw_input()
month=int(S[5:7])
if month>=5:
  print "TBD"
else:
  print "Heisei"
n = int(input())

xyh = [list(map(int, input().split())) for i in range(n)]
if xyh[0][2]:
    x,y,h = xyh[0]
if xyh[1][2]:
    x,y,h = xyh[1]
for i in range(101):
    for j in range(101):
        k = h + abs(i - x) + abs(j - y)
        if all(h == max(k - abs(i - x) - abs(j - y), 0) for x, y, h in xyh):
            print(i, j, k)

### FIXED CODE ###

n = int(input())

xyh = [list(map(int, input().split())) for i in range(n)]
if xyh[0][2]:
    x,y,h = xyh[0]
if xyh[1][2]:
    x,y,h = xyh[1]
if xyh[-1][2]:
    x,y,h = xyh[-1]
for i in range(101):
    for j in range(101):
        k = h + abs(i - x) + abs(j - y)
        if all(h == max(k - abs(i - x) - abs(j - y), 0) for x, y, h in xyh):
            print(i, j, k)
import numpy as np
N = int(input())
A = list(map(int, input().split()))
A = np.array(A)
B = np.array([1]*N)
indices = [*range(len(A))]
sorted_indices = sorted(indices, key=lambda i: A[i])
#for i in range(1, N+1):
#    B.append(A.index(i)+1)
#print(B)
sorted_indices = sorted_indices + B

print(*sorted_indices)

### FIXED CODE ###

#import numpy as np
N = int(input())
A = list(map(int, input().split()))
#A = np.array(A)
B = [0]*N
#indices = [*range(len(A))]
#sorted_indices = sorted(indices, key=lambda i: A[i])
#for i in range(1, N+1):
#    B.append(A.index(i)+1)
#print(B)
#sorted_indices = sorted_indices + B
for i in range(N):
    B[A[i]-1] = i + 1
print(*B)
#print(*sorted_indices)
n,m=map(int,input().split())
l=[]
def nibutan(x,l):
    low=0
    high=len(l)-1
    while low<=high:
      mid=(low+high)//2
      guess=l[mid]
      if guess==x:
         return True
      elif guess>x:
          high=mid-1
      elif guess<x:
          low=mid+1
    return False
for i in range(m):
  l.append(int(input()))
l1=[0 for i in range(n)]
if 1 in l:
  l1[0]=0
else:
  l1[0]=1
if 2 in l:
  l1[1]=0
elif 1 in l:
  l1[1]=1
else:
  l1[1]=2

if n>=3:
  for i in range(3,n+1): 
    if nibutan(i,l):
      pass
    else:
      l1[i-1]=(l1[i-2]+l1[i-3])%(((10**9)+7))
print(l1[n-1])

### FIXED CODE ###

n,m=map(int,input().split())
l=[]
def nibutan(x,l):
    low=0
    high=len(l)-1
    while low<=high:
      mid=(low+high)//2
      guess=l[mid]
      if guess==x:
         return True
      elif guess>x:
          high=mid-1
      elif guess<x:
          low=mid+1
    return False
if m==0:
  pass
else:
  for i in range(m):
    l.append(int(input()))
l1=[0 for i in range(n+1)]
if 1 in l:
  l1[0]=0
else:
  l1[0]=1

if 2 in l:
  l1[1]=0
elif 1 in l:
  l1[1]=1
else:
  l1[1]=2

if n>=3:
  for i in range(3,n+1): 
    if nibutan(i,l):
      pass
    else:
      l1[i-1]=(l1[i-2]+l1[i-3])%(((10**9)+7))
print(l1[n-1])
from math import pi
r=(int, import())
print("{0:.5f} {1:.5f}".format(pi*r*r, 2*pi*r))

### FIXED CODE ###

from math import pi
r=float(input())
print("{0:.5f} {1:.5f}".format(pi*r*r, 2*pi*r))
S = input()
T = input()
cnt_list = []

for j in range(len(S)-len(T)):
  sub_S  =  S[j:(j+len(S))]
  for k in range(len(T)-1):
    cnt = 0
    if T[k] != sub_S[k]:
      cnt += 1
    cnt_list.append(cnt)

print(min(cnt_list))
  

### FIXED CODE ###

S = input()
T = input()
cnt_list = []

for i in range(len(S)-len(T)+1):
  sub_S = S[i:i+len(T)]
  cnt = 0
  for j in range(len(T)):
    if sub_S[j] != T[j]:
      cnt += 1
  cnt_list.append(cnt)
print(min(cnt_list))
A, B, K = map(int, input().split())
ans = list(range(A, B + 1))
for num in ans:
    if num < min(ans) + K or num > max(ans) - K:
        print(num)


### FIXED CODE ###

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

x = b - a
if x < 2 * k:
    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)
a = 2
b = 10
print(2a + 2b)


### FIXED CODE ###

a,b = [int(x) for x in input().split()]

s = a*b

p = 2*a+2*b

print(s,p)
N = int(input())
eni_B = 0
end_A = 0
both = 0
count = 0

for i in range(N):
    s = list(input())
    if s[0] == 'B':
        eni_B += 1
    if s[-1] == 'A':
        end_A += 1
    if s[0] == 'B' and s[-1] == 'A':
        eni_B -= 1
        end_A -= 1
        both += 1
    for j in range(len(s)-1):
        if s[j] == 'A':
            if s[j+1] == 'B':
                count += 1


if end_A != 0 or eni_B != 0:
    count = count + min(end_A,eni_B) + both
    print(count)
else :
    print(count)

### FIXED CODE ###

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

print(N-K+1)
import math
words = lambda t : list(map(t, input().split()))
a,b,x = words(int)

k = x / (a*a)
if k*2 == b:
    print(45)
elif k*2 < b:
    print(90 - math.degrees(math.atan(2*x/(a*b*b))))
else:
    p = ((a*b)- (x/a)) / (a/2)
    print(90 - math.degrees(math.atan(a/p)))


### FIXED CODE ###

import math
words = lambda t : list(map(t, input().split()))
a,b,x = words(int)

k = x / (a*a)
if k == b:
    print(0)
elif k*2 == b:
    print(45)
elif k*2 < b:
    print(90 - math.degrees(math.atan(2*x/(a*b*b))))
else:
    p = ((a*b)- (x/a)) / (a/2)
    print(90 - math.degrees(math.atan(a/p)))
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
sys.setrecursionlimit(10**7)
from pprint import pprint as pp
from pprint import pformat as pf

import math
#from sortedcontainers import SortedList, SortedDict, SortedSet # no in atcoder
import bisect


if __name__ == '__main__':
    any_haver = set()
    num_nusuke, num_treat_type = list(map(int, input().split()))
    d_for_loop = int(input())
    for i in range(d_for_loop):
        treat_haver = list(map(int, input().split()))
        for nusuke_id in treat_haver:
            any_haver.add(nusuke_id)
    # check
    count_not_have = 0
    for nusuke_id in range(1, num_nusuke + 1):
        #print('nusuke_id') # debug
        #print(nusuke_id) # debug
        if nusuke_id not in any_haver:
            count_not_have += 1
    #print('count_not_have') # debug
    #print(count_not_have) # debug
    print(count_not_have)



    #print('\33[32m' + 'end' + '\033[0m') # debug


### FIXED CODE ###

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
sys.setrecursionlimit(10**7)
from pprint import pprint as pp
from pprint import pformat as pf

import math
#from sortedcontainers import SortedList, SortedDict, SortedSet # no in atcoder
import bisect


if __name__ == '__main__':
    any_haver = set()
    num_nusuke, num_treat_type = list(map(int, input().split()))
    for i in range(num_treat_type):
        _ = int(input())
        treat_haver = list(map(int, input().split()))
        for nusuke_id in treat_haver:
            any_haver.add(nusuke_id)
    # check
    count_not_have = 0
    for nusuke_id in range(1, num_nusuke + 1):
        #print('nusuke_id') # debug
        #print(nusuke_id) # debug
        if nusuke_id not in any_haver:
            count_not_have += 1
    #print('count_not_have') # debug
    #print(count_not_have) # debug
    print(count_not_have)



    #print('\33[32m' + 'end' + '\033[0m') # debug
c = input()
if c in ['a', 'i', 'u', 'e', 'o']:
  print('vowel')
else
  print('consonant')


### FIXED CODE ###

c = input()
if c in ['a', 'i', 'u', 'e', 'o']:
	print('vowel')
else:
 	print('consonant')
def read_pair():
    return map(int, input().strip().split())

# Read graph
N, M = read_pair()
adj = [[] for x in range(N)]
for i in range(M):
    x, y = read_pair()
    adj[x - 1].append(y - 1)

memo = [None] * N

def longest_path(x, memo):
    if memo[x] is not None:
        return memo[x]

    result = 0
    for y in adj[x]:
        result = max(result, 1 + longest_path(y, memo))
    memo[x] = result
    return result

result = 0
for x in range(N):
    result = max(result, longest_path(x, memo))
print(result)


### FIXED CODE ###

from collections import deque

def read_pair():
    return map(int, input().strip().split())

# Read graph
N, M = read_pair()
adj = [[] for x in range(N)]
rev = [[] for y in range(N)]

outdegree = [0] * N
for i in range(M):
    x, y = read_pair()

    # Use 0-indexed labels
    x -= 1
    y -= 1

    adj[x].append(y)
    rev[y].append(x)
    outdegree[x] += 1

maxpath = [0] * N
q = deque()

for x in range(N):
    if outdegree[x] == 0:
        q.append(x)

while q:
    x = q.popleft()
    for y in adj[x]:
        maxpath[x] = max(maxpath[x], 1 + maxpath[y])
    for z in rev[x]:
        outdegree[z] -= 1
        if outdegree[z] == 0:
            q.append(z)

print(max(maxpath))
N,X = map(int, input().split())
def myabs(i):
    return abs(i-X)
xlis = list(map(myabs, map(int, input().split())))

from fractions import gcd

res = xlis[0]
for i in xlis:
    if i%res == 0:
        continue
    res = gcd(i,res)

print(res)

### FIXED CODE ###

A,B = map(int,input().split())
if A%2==1 and B%2==1:
  print('Yes')
else:
  print('No')
i = list(map(int, input().split())) 
j = list(map(int, input().split())) 

lis=[]
for i in range (i[0]):
    tendata=[i+1,j[i],0]
    lis.append(tendata)

for i in range(i[1]):
    miti = list(map(int, input().split()))
    if ((lis[miti[0]-1][1]) > (lis[miti[1]][1])):
        lis[miti[0]-1][2] = (lis[miti[0]-1][2]+100)
        lis[miti[1]-1][2] = (lis[miti[1]-1][2]+2)

    elif ((lis[miti[0]-1][1]) < (lis[miti[1]][1])):
        lis[miti[1]-1][2] = (lis[miti[1]-1][2]+100)
        lis[miti[0]-1][2] = (lis[miti[0]-1][2]+2)


print(lis)

### FIXED CODE ###



i = list(map(int, input().split())) 
j = list(map(int, input().split())) 

lis=[]
ans = 0
for a in range (i[0]):
    tendata=[a+1,j[a],0]
    lis.append(tendata)

for b in range(i[1]):
    miti = list(map(int, input().split()))
    if ((lis[miti[0]-1][1]) > (lis[miti[1]-1][1])):
        lis[miti[1]-1][2] = 1
    
    elif ((lis[miti[0]-1][1]) == (lis[miti[1]-1][1])):
        lis[miti[1]-1][2] = 1
        lis[miti[0]-1][2] = 1

    else:
        lis[miti[0]-1][2] = 1

for c in  lis:
    if not (c[2] == 1 ):
        ans = ans+1

print(ans)
import numpy as np
def main():
    ttt = []
    n = int(input())
    e = [list(map(int, input().split())) for i in range(n)]
    #e = [[int(i) for i in input().split()] for i in range(int(input()))]
    #n = 3
    #e = [[21,-11],[81234,94124,52141]]
    for j in range(n):
        t = e[0][0] - e[1][j]*0.006
        tt = abs(e[0][1] - t)
        ttt.append(tt)
    ttt = np.array(ttt)
    print(np.argmin(ttt)+1)
main()

### FIXED CODE ###

import numpy as np
def main():
    ttt = []
    n = int(input())
    N, M = map(int, input().split())
    e = list(map(int, input().split()))
    #e = [[int(i) for i in input().split()] for i in range(int(input()))]
    #n = 3
    #e = [[21,-11],[81234,94124,52141
    for j in range(n):
        t = N - e[j]*0.006
        tt = abs(M - t)
        ttt.append(tt)
    ttt = np.array(ttt)
    print(np.argmin(ttt)+1)
main()
n=int(input(())
v=[int(x) for x in input().split()]
c=[int(x) for x in input().split()]
s=0
for i in range(n):
  if v[i]>c[i]:
    s+=v[i]-c[i]
print(s)

### FIXED CODE ###

n=int(input())
v=[int(x) for x in input().split()]
c=[int(x) for x in input().split()]
s=0
for i in range(n):
  d=v[i]-c[i]
  if d>0:
    s+=d
print(s)
import math

a,b,c,d = map(int,input().split())
tn = b-a+1

cn = (b//c)-(a-1)//c
dn = (b//d)-(a-1)//d
cd = (c*d)//math.gcd(c, d)
cdn = (b//cd)-(a-1)//cd

print(tn-cn-dn+cdn)

### FIXED CODE ###

import fractions

a,b,c,d = map(int,input().split())
tn = b-a+1

cn = (b//c)-(a-1)//c
dn = (b//d)-(a-1)//d
cd = (c*d)//fractions.gcd(c, d)
cdn = (b//cd)-(a-1)//cd

print(tn-cn-dn+cdn)
k =int(input())
a, b = map(int, input().split())

for i in range(a, b):
    if(i%k==0):
        break

if(break):   
    print("OK")
else:
    print("NG")

### FIXED CODE ###

k =int(input())
a, b = map(int, input().split())
 
for i in range(a, b+1):
    if (i % k == 0):
        print("OK")
        break
else:
    print("NG")
n=int(input())
p=sorted(list(map(int,input().split())))
s=[]
m = 10**6+1
a=[True for _ in range(m)]
prev = 0
flag = True
for x in p:
    if prev == x:
        if flag:
            s.pop()
            flag = False
        continue
    if a[x]:
        s.append(x)
    i = 2
    y = i*x
    while y<m:
        a[y] = False
        i+=1
        y = i*x
    prev=x
    flag = True

print(len(s))

### FIXED CODE ###

n=int(input())
p=sorted(list(map(int,input().split())))
s=set()
m = 10**6+1
a=[True for _ in range(m)]
prev = 0
for x in p:
    if prev == x:
        s.discard(x)
        continue
    if a[x]:
        s.add(x)
    i = 2
    y = i*x
    while y<m:
        a[y] = False
        i+=1
        y = i*x
    prev=x

print(len(s))
a,b,c,d=,ap(int,input().split())
print(max(a*b, c*d))

### FIXED CODE ###

a,b,c,d=map(int,input().split())
print(max(a*b, c*d))
print(int(int(input())*int(input())))

### FIXED CODE ###

r = int(input())
print(r*r)
import math
N = int(input())
for i in range(int(math.sqrt(N)), 0, -1):
  if N / i == int(N / i):
      print(int(N / i + i - 2))
      sys.exit()

### FIXED CODE ###

import sys
import numpy as np
N = int(input())
for i in range(int(np.sqrt(N)), 0, -1):
  if N / i == int(N / i):
      print(int(N / i + i - 2))
      sys.exit()
print(N - 1)