Harryxun/stf_run huggingface dataset:
from scipy.special import comb

def f2(n, k):
    return comb(n+k-1, k-1)

def f(n, k):
    if n < k:
        return 0
    if n == 0 and k == 0:
        return 1
    if k < 1:
        return 0

    return f2(n-k, k)


if __name__ == "__main__":
    N, K = map(int, input().split())

    blue = K
    red = N - K

    for i in range(1, K+1):
        blue = f(K, i)
        red = f2(N-K-(i-1), i+1)
        ans = blue * red
        print(int(ans % 1000000007))



### FIXED CODE ###

from scipy.misc import comb

def f2(n, k):
    return comb(n+k-1, k-1, exact=True)

def f(n, k):
    if n < k:
        return 0
    if n == 0 and k == 0:
        return 1
    if k < 1:
        return 0

    return f2(n-k, k)


if __name__ == "__main__":
    N, K = map(int, input().split())

    blue = K
    red = N - K

    for i in range(1, K+1):
        blue = f(K, i)
        red = f2(N-K-(i-1), i+1)
        ans = blue * red
        print(int(ans % 1000000007))
n,m = map(int,input().split())
ans = []

for i in range(m):
    s,c = map(int,input().split())
    li.append([s,c])

for i in range(10**(n-1),10**n):
    buf = str(i)
    flag = True
    for j in range(len(li)):
        if buf[li[j][0]-1] != str(li[j][1]):
            flag = False
    if flag:
        ans.append(buf)
        flag = True

ans.sort()
if ans:
    print(ans[0])
else:
    print(-1)


### FIXED CODE ###

n,m = map(int,input().split())
ans = []
li = []

for i in range(m):
    s,c = map(int,input().split())
    li.append([s,c])

if n == 1:
    for i in range(10):
        buf = str(i)
        flag = True
        for j in range(len(li)):
            if buf[li[j][0]-1] != str(li[j][1]):
                flag = False
        if flag:
            ans.append(buf)
            flag = True
else:
    for i in range(10**(n-1),10**n):
        buf = str(i)
        flag = True
        for j in range(len(li)):
            if buf[li[j][0]-1] != str(li[j][1]):
                flag = False
        if flag:
            ans.append(buf)
            flag = True

ans.sort()
if ans:
    print(ans[0])
else:
    print(-1)
N = int(input())
l = 100; r = 105
for i in range(5000):
    if l <= N <= r:
        print(1)
        break
    l += 100
    r += 105
print(0)

### FIXED CODE ###

a, b = [int(x) for x in input().split(" ")]
c, d = [int(x) for x in input().split(" ")]
print(0 if a == c else 1)
S=input()
n=len(str(S))
if n%2=1:
  count=0
  m=int((n-1)/2)
  for i in range(0,m):
    if S[i]!=S[n-i-1]:
      count+=1
else:
  count=0
  m=int(n/2)
  for i in range(0,m):
    if S[i]!=S[n-i-1]:
      count+=1
      
print(count)


  

### FIXED CODE ###

S=input()
n=len(str(S))
if n%2==1:
  count=0
  m=int((n-1)/2)
  for i in range(0,m):
    if S[i]!=S[n-i-1]:
      count+=1
else:
  count=0
  m=int(n/2)
  for i in range(0,m):
    if S[i]!=S[n-i-1]:
      count+=1
      
print(count)
import sys
import math

def add_ball(idx):
    add_list = [idx]
    if idx > 1:
        for j in range(2, int(math.sqrt(idx))+1):
            if idx%j == 0:
                add_list.append(j)
                if j != idx//i:
                    add_list.append(idx//j)
    for k in add_list:
        b_list[k-1] = (b_list[k-1]+1)%2

if __name__ == "__main__":
    input = sys.stdin.readline

    n = int(input())
    a_list = list(map(int, input().split()))
    b_list = [0] * n
    for i, a in enumerate(a_list[::-1]):
        if a != b_list[-i-1]:
            add_ball(n-i)
    ball_sum = sum(b_list)
    ball_list = [i+1 for i, b in enumerate(b_list) if b == 1]
    print(ball_sum)
    if ball_sum > 0:
        print(' '.join(map(str, ball_list)))


### FIXED CODE ###

import sys
import math

def add_ball(idx):
    add_list = []
    for j in range(1, int(math.sqrt(idx))+1):
        if idx%j == 0:
            add_list.append(j)
            if j != idx//j:
                add_list.append(idx//j)
    for k in add_list:
        b_list[k] += 1

if __name__ == "__main__":
    input = sys.stdin.readline

    n = int(input())
    a_list = list(map(int, input().split()))
    b_list = [0] * (n+1)
    cnt = 0
    ans_list = []
    for a, i in zip(reversed(a_list), range(n, 0, -1)):
        if a != b_list[i]%2:
            cnt += 1
            ans_list.append(i)
            add_ball(i)
    ans_list.sort()
    print(cnt)
    if cnt > 0:
        print(' '.join(map(str, ans_list)))
a, b, k = map(int, input().split())

ans = 0

if (a < b):
    li = [i for i in range(b+1) if (a % i == 0 && b % i == 0 && i != 0)]
    ans = li[k-1]
else:
    li = [i for i in range(a+1) if (a % i == 0 && b % i == 0 && i != 0)]
    ans = li[k-1]

print(ans)

### FIXED CODE ###

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

ans = 0

lista = list(range(a+1))
aa = lista.pop(0)

listb = list(range(b+1))
bb = listb.pop(0)

if (a < b):
    li = [i for i in lista if a % i == 0 and b % i == 0]
    li = sorted(li, reverse=True)
    ans = li[k-1]
else:
    li = [i for i in listb if a % i == 0 and b % i == 0]
    li = sorted(li, reverse=True)
    ans = li[k-1]

print(ans)
#!/usr/bin/env python
import sys

sys.setrecursionlimit(10000)


matrix = []
vec = [[1,0],[-1,0],[0,1],[0,-1]]
visited =[]

def dfs(x,y,fruit):
  visited.append((x,y))
  for v in vec:
    nx = x + v[0]
    ny = y + v[1]
    if not (nx,ny) in visited and nx in xrange(w) and ny in xrange(h):
      if matrix[ny][nx] == fruit:
        dfs(nx,ny,fruit)



while True:
  h,w = map(int,raw_input().rstrip().split(" "))
  if h == 0 and w == 0:
    break
  matrix = []
  visited = []
  ans = 0
  for i in xrange(h):
    s = raw_input().rstrip()
    matrix.append(list(s))
  for i in xrange(h):
    for j in xrange(w):
      if not (j,i) in visited:
        dfs(j,i,matrix[i][j])
        ans+=1
  print ans

### FIXED CODE ###

#!/usr/bin/env python
import sys

sys.setrecursionlimit(20000)

matrix = []
vec = [[1,0],[-1,0],[0,1],[0,-1]]
visited =[]
h = 0
w = 0

def dfs(x,y,fruit):
  #visited.append((x,y))
  visited[y][x] = 1
  for v in vec:
    nx = x + v[0]
    ny = y + v[1]
    if nx in xrange(w) and ny in xrange(h):
      if visited[ny][nx]==0 and matrix[ny][nx] == fruit:
        dfs(nx,ny,fruit)
  return 0


while True:
  h,w = map(int,raw_input().split())
  if h == 0 and w == 0:
    break
#  print h,w
  matrix = []
  visited = []
  ans = 0
  for i in xrange(h):
    s = raw_input().rstrip()
    matrix.append(list(s))
    visited.append([0]*w)
  for i in xrange(h):
    for j in xrange(w):
      #if not (j,i) in visited:
      if visited[i][j] == 0:
        dfs(j,i,matrix[i][j])
        ans+=1
  print ans
import math
N, X = map(int,input().split())
x = list(map(int,input().split()))
for i in range(N):
  x[i] = abs(x[i]-X)
if N != 1:
  print(math.gcd(x))
else:
  print(x[0])

### FIXED CODE ###

import fractions
N, X = map(int, input().split())
x = list(map(int, input().split()))
tmp = abs(x[0] - X)
for i in range(1,N):
  tmp = fractions.gcd(tmp,abs(x[i]-X))
print(tmp)
S = str(input())
n = 0
m = 0
if S[n]!='h':
  while S[n]!='h':
    n+=1
    m+=1
while len(S) > n:
    if n+m % 2 == 1 and S[n] != 'i':
        print('No')
        exit()
    elif n+m % 2 == 0 and S[n] != 'h':
        print('No')
        exit()
    n += 1

print('Yes')

### FIXED CODE ###

#N=int(input())
#N,M=map(int, input().split())
#L=list(map(int, input().split()))
S = str(input())
if len(S)%2==1:
  print('No')
  exit()
n = 0
while len(S) > n:
    if n % 2 == 1 and S[n] != 'i':
        print('No')
        exit()
    elif n % 2 == 0 and S[n] != 'h':
        print('No')
        exit()
    n += 1

print('Yes')
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

res = 0
for i in range(n):
    res = max(res, a[:i+1]+b[i:])
    
print(res)

### FIXED CODE ###

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

res = 0
for i in range(n):
    res = max(res, sum(a[:i+1])+sum(b[i:]))
    
print(res)
N=int(input())
A=int(input())
B=int(input())
t1=N*A
t2=N*B
if t1<t2:
      tmin=t1
      print(tmin)
else:
      tmin=t2
      print(tmin)
      


### FIXED CODE ###

n,a,b=map(int,input().split())
if(n*a>=b):
    print(b)
else:
    print(n*a)
def main():
    input = input()
    #input = 76500
    if 0 <= input < 86400:
        hour = input % 3600
        minute = hour % 60
        seconde = minute % 60
        #print("{0}:{1}:{2}".format(h, m, s))
        print("{0}:{1}:{2}".format(hour,minute,seconde))

if __name__ == "__main__":
    print("main start!")
    main()
    print("main end!")ute,seconde)

### FIXED CODE ###

input = int(input())
if 0 <= input < 86400:
    hour = input / 3600
    minute = (input / 60) % 60
    second = input % 60
    print("%d:%d:%d" % (hour,minute,second))
import math
from functools import reduce

n, X = map(int, input().split())
x = [int(i) - X for i in input().split()]

print(reduce(math.gcd, x))


### FIXED CODE ###

from fractions import gcd

n, X = map(int, input().split())
x = list(map(int, input().split()))

z = list(map(lambda i: abs(X - i), x))
ans = z[0]
for i in range(1, n):
   ans = gcd(ans, z[i])
print(ans)
def dfs_f(now, kyori):
    kyori_f[now] = kyori
    # 今いる頂点から行ける頂点を順に next に入れてループ
    for next in g[now]:
        # 行ったことがない、白く塗られていない
        if not memo_f[next] and next != n - 1:
            memo_f[next] = True
            dfs_f(next, kyori + 1)

def dfs_s(now, kyori):
    kyori_s[now] = kyori
    # 今いる頂点から行ける頂点を順に next に入れてループ
    for next in g[now]:
        # 行ったことがない、黒く塗られていない
        if not memo_s[next] and next != 0:
            memo_s[next] = True
            dfs_s(next, kyori + 1)


n = int(input())
g = [[] * n for i in range(n)]
for i in range(n - 1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    g[a].append(b)
    g[b].append(a)

# フェネック
memo_f = [False for i in range(n)]  # 訪れたことがあるか
kyori_f = [float("inf") for i in range(n)]  # 始点からの距離
memo_f[0] = True
dfs_f(0, 0)

# すぬけ
memo_s = [False for i in range(n)]  # 訪れたことがあるか
kyori_s = [float("inf") for i in range(n)]  # 始点からの距離
memo_s[n - 1] = True
dfs_s(n - 1, 0)

black = 0
white = 0
for i in range(n):
    if kyori_f[i] < kyori_s[i]:
        black += 1
    else:
        white += 1

if black > white:
    print("Fennec")
else:
    print("Snuke")

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)


def dfs_f(now, kyori):
    kyori_f[now] = kyori
    # 今いる頂点から行ける頂点を順に next に入れてループ
    for next in g[now]:
        # 行ったことがない、白く塗られていない
        if not memo_f[next] and next != n - 1:
            memo_f[next] = True
            dfs_f(next, kyori + 1)


def dfs_s(now, kyori):
    kyori_s[now] = kyori
    # 今いる頂点から行ける頂点を順に next に入れてループ
    for next in g[now]:
        # 行ったことがない、黒く塗られていない
        if not memo_s[next] and next != 0:
            memo_s[next] = True
            dfs_s(next, kyori + 1)


n = int(input())
g = [[] * n for i in range(n)]
for i in range(n - 1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    g[a].append(b)
    g[b].append(a)

# フェネック
memo_f = [False for i in range(n)]  # 訪れたことがあるか
kyori_f = [float("inf") for i in range(n)]  # 始点からの距離
memo_f[0] = True
dfs_f(0, 0)

# すぬけ
memo_s = [False for i in range(n)]  # 訪れたことがあるか
kyori_s = [float("inf") for i in range(n)]  # 始点からの距離
memo_s[n - 1] = True
dfs_s(n - 1, 0)

black = 0
white = 0
for i in range(n):
    if kyori_f[i] <= kyori_s[i]:
        black += 1
    else:
        white += 1

if black > white:
    print("Fennec")
else:
    print("Snuke")
#create environment
import numpy as pd
num = 1
i = 1
k = 1
df = pd.DataFrame()
count_num = 0
f = lambda x: (x**2)

#input1 N D (numeric)
N, D = map(int, input().split())
#input2
for l in (1, N):
  a = map(int, input().split())
  if a is none:
    break
  df[l] = a

#for num > 2:
#  a = map(int, input().split())
#  if a is none:
#    break
#  df[i] = a
#  i = i + 1

# make combination
df_new = df.T
#a_new = a.T
print(df_new)
for i in range(0, len(df_new.index)):
  for j in range(k, len(df_new.index)):
    print_str = str(i) + '-' + str(j)
    print(print_str)
    k = k + 1
    df_new_ij = df_new.loc[[i,j],:]
    obj_num = np.sqrt(df_new_ij.apply(f).cumsum().iloc[1,:].cumsum()[len(df['a'])-1])
    
    if obj_num == round(obj_num):
      count_num = count_num + 1

print(count_num)






### FIXED CODE ###

import math
n, d = map(int, input().split())
x = []
ans=0
for i in range(n):
        o = list(map(int, input().split()))
        x += [o]
for i in range(n):
        for j in range(i+1,n):
                dis_net = 0
                dis=0
                for u in range(d):
                        dis += (x[i][u] - x[j][u])** 2
                dis_net = math.sqrt(dis)
                if dis_net % 1 == 0 and dis_net>=1:
                        ans += 1
print(ans)
from operator import itemgetter

N = int(input())


A = []
for i in range(N - 1):
    A.append([int(i) for i in input().split()])
A.sort(key = itemgetter(0))

B = []
for row in A:
    B.append(sorted(row))
B.sort(key = itemgetter(0))

link_list = [[] for i in range(N)]
for row in B:
    link_list[row[0] - 1].append(row[1] - 1)
edge_color = dict()

def DFS_color(node, pre_color):
    target_list = link_list[node]
    color = 1
    if target_list == []:
        pass
    else:
        for ko_node in target_list:
            if pre_color == color:
                color += 1
            edge_color[node, ko_node] = color 
            DFS_color(ko_node, color)
            color += 1

DFS_color(0, 0)

print(max(edge_color.values()))
for node1, node2 in B:
    print(edge_color[node1 - 1, node2 - 1])

### FIXED CODE ###

from operator import itemgetter
import sys
sys.setrecursionlimit(10**7)

N = int(input())


A = []
for i in range(N - 1):
    A.append([int(i)-1 for i in input().split()])

B = []
for row in A:
    B.append(sorted(row))
B.sort(key = itemgetter(0))

link_list = [[] for i in range(N)]
for row in B:
    link_list[row[0]].append(row[1])
    link_list[row[1]].append(row[0])
edge_color = dict()
marker = [0] * N


def DFS_color(node, pre_color):
    target_list = link_list[node]
    color = 1
    for ko_node in target_list:
        if marker[ko_node] == 0:
            if pre_color == color:
                color += 1
            edge_color[node, ko_node] = color
            edge_color[ko_node, node] = color 
            marker[ko_node] = 1
            DFS_color(ko_node, color)
            color += 1
        else:
            pass

marker[0] = 1
DFS_color(0, 0)

print(max(edge_color.values()))
for node1, node2 in A:
    print(edge_color[node1, node2])
from sys import stdin
from fractions import gcd

def lcm(x, y):
    return (x * y) // gcd(x, y)

a, b, c, d = (int(x) for x in stdin.readline().rstrip().split())

lcm = lcm(c, d)

total = b - (a - 1)
mc = b // c - (a - 1) // c
md = b // d - (a - 1) // d
mlcm = b // e - (a - 1) // e

print(total - (mc + md - mlcm))

### FIXED CODE ###

from sys import stdin
from fractions import gcd

def lcm(x, y):
    return (x * y) // gcd(x, y)

a, b, c, d = (int(x) for x in stdin.readline().rstrip().split())

lcm = lcm(c, d)

total = b - (a - 1)
mc = b // c - (a - 1) // c
md = b // d - (a - 1) // d
mlcm = b // lcm - (a - 1) // lcm

print(total - (mc + md - mlcm))
S = str(input())
K = int(input())

ans = 1
index = 0
for j in range(len(S)):
    if S[j] != '1':
        ans = int(s[j])
        index = j
        break

if ans == 1:
    print(ans)
elif index < K-1:
    print(ans)
else:
    print(1)
        

### FIXED CODE ###

S = str(input())
K = int(input())

ans = 1
index = 0
for j in range(len(S)):
    if S[j] != '1':
        ans = int(S[j])
        index = j
        break

if ans == 1:
    print(ans)
elif index > K-1:
    print(1)
else:
    print(ans)
n=int(input())

if n >= 100000:
    print(90909)
elif n >= 10000:
    print(n-9090)
elif n >= 1000:
    print(909)
elif n >= 100:
    print(n-90)
elif n >= 10:
    print(9)
else:
    print(n)



### FIXED CODE ###

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

if c-a+b > 0:
    print(c-a+b)
else:
    print(0)
import itertools

N, C = map(int, input().split())
D = []
for _ in range(C):
    D.append(list(map(int, input().split())))
c = []
for _ in range(N):
    c.append(list(map(lambda x: int(x) - 1, input().split())))

diff_by_pos_color_pair = [[0 for _ in range(C)] for _ in range(3)]
for i in range(N):
    for j in range(N):
        pos = (i + j) % 3
        for color in range(C):
            diff_by_pos_color_pair[pos][color] += D[c[i][j]][color]


min_diff = float("inf")
for ccs in itertools.permutations(range(C), 3):
    diff = 0
    for pos, color in enumerate(ccs):
        diff += diff_by_pos_color_pair[pos][ccs[color]]
    min_diff = min(min_diff, diff)

print(min_diff)


### FIXED CODE ###

import itertools

N, C = map(int, input().split())
# N, C = 500, 30

D = []
for _ in range(C):
    D.append(list(map(int, input().split())))
    # D.append([100] * C)

diff_by_pos_color_pair = [[0 for _ in range(C)] for _ in range(3)]
for i in range(N):
    for j, color_from in enumerate(map(lambda x: int(x) - 1, input().split())):
        # for j, color_from in enumerate([0] * N):
        pos = (i + j) % 3
        for color_to in range(C):
            diff_by_pos_color_pair[pos][color_to] += D[color_from][color_to]


min_diff = float("inf")
for ccs in itertools.permutations(range(C), 3):
    diff = 0
    for pos, color in enumerate(ccs):
        diff += diff_by_pos_color_pair[pos][color]
    min_diff = min(min_diff, diff)

print(min_diff)
if X<t:
  print(0)
else:
  print(X-t)

### FIXED CODE ###

X,t=map(int, input().split())
if X<t:
  print(0)
else:
  print(X-t)
from heapq import heappush, heappop, heapify, heapreplace
from collections import defaultdict


class Solution:
    def main(self):
        N, M =map(int, input().split())
        self.A = set()
        for _ in range(M):
            self.A.add(int(input()))
        self.memo = {0: 1}
        res = self.rec(N)
        print(res%1000000007)

    def rec(self, n):
        if n in self.A or n < 0:
            return 0
        elif n in self.memo:
            return self.memo[n]
        else:
            val = self.rec(n-1) + self.rec(n-2)
            self.memo[n] = val
            return val


if __name__ == '__main__':
    Solution().main()

### FIXED CODE ###

from heapq import heappush, heappop, heapify, heapreplace
from collections import defaultdict


class Solution:
    def main_old(self):
        N, M = map(int, input().split())
        self.memo = {}
        for _ in range(M):
            a = int(input())
            self.memo[a] = 0
        res = self.rec(N)
        print(res)

    def main(self):
        N, M = map(int, input().split())
        A = set()
        for _ in range(M):
            A.add(int(input()))
        dp = [0] * (N+1)
        dp[0] = 1
        for i in range(0, N+1):
            # print(dp)
            if i+1 <= N and i+1 not in A:
                dp[i+1] += dp[i]
                dp[i + 1] %= 1000000007
            if i+2 <= N and i+2 not in A:
                dp[i+2] += dp[i]
                dp[i + 2] %= 1000000007
        print(dp[N])

    def rec(self, n):
        if n < 0:
            return 0
        elif n == 0:
            return 1
        elif n in self.memo:
            return self.memo[n]
        else:
            val = (self.rec(n-1) + self.rec(n-2)) %1000000007
            self.memo[n] = val
            return val


if __name__ == '__main__':
    Solution().main()
def main():
    import sys
    input = sys.stdin.readline

    AB = input().split(" ")
    A = int(AB[0])
    B = int(AB[1])
    if (A + B) % 2 == 1:
        res = 'IMPOSSIBLE'
    elif:
        res = int((A + B) / 2)
    print(res)

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    import sys
    input = sys.stdin.readline

    AB = input().split(" ")
    A = int(AB[0])
    B = int(AB[1])
    if (A + B) % 2 == 1:
        res = 'IMPOSSIBLE'
    else:
        res = int((A + B) / 2)
    print(res)

if __name__ == '__main__':
    main()
s = str(input())
s_ = list(s)
for i in range(len(s)):
  if i==0 and s_[i]=='?' and s_[i+1]=='D':
      s_[i]='P'
  elif i==0 and s_[i]=='?' and s_[i+1]=='P':
      s_[i]='D'
  elif s_[i]=='?' and s[i-1]=='P':
    s_[i]='D'
  elif s_[i]=='?' and s[i-1]=='D':
    if s_[i+1]=='D' or s_[i+1]=='?':
      s_[i]='P'
      s_[i+1]='D'
    else:
      s_[i]='D'
    
S = "".join(s_)
print(S)

### FIXED CODE ###

s = str(input())
s_ = list(s)
for i in range(len(s)):
  if s_[i]=='?':
    s_[i]='D'
S = "".join(s_)
print(S)
重複なimport sys
import math


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n = inint()
L = inintl()

ans = 0

for i in range(n):
    for j in range(n):
        for k in range(n):
            if i < j < k and (L[i]+L[j] > L[k] and L[j]+L[k] > L[i] and L[k]+L[i] > L[j]) and (L[i] != L[j] and L[i] != L[k] and L[j] != L[k]):
                ans += 1

print(ans)


### FIXED CODE ###

import sys
import math


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n = inint()
L = inintl()

ans = 0

for i in range(n):
    for j in range(n):
        for k in range(n):
            if i < j < k and (L[i]+L[j] > L[k] and L[j]+L[k] > L[i] and L[k]+L[i] > L[j]) and (L[i] != L[j] and L[i] != L[k] and L[j] != L[k]):
                ans += 1

print(ans)
n,l=map(int.input().split())
c=[]
for i in range(n):
  c.append(input())
c.sort()
print("".join(c))

### FIXED CODE ###

n,l=map(int,input().split())
c=[]
for i in range(n):
  c.append(input())
c.sort()
print("".join(c))
s = time.time()
X = int(input())
if X < 100:
    print(0)
else:
    item = [100, 101, 102, 103, 104, 105]
    dp = [[False for _ in range(X//100+10)] for _ in range(X+10)]
    dp[0][0] = True
    dp[100][1] = True
    dp[101][1] = True
    dp[103][1] = True
    dp[102][1] = True
    dp[105][1] = True
    for x in range(200, X+1):
        for n in range(2, x//100+1):
            for i in item:
                if dp[x-i][n-1]:
                    dp[x][n] = True
                    if x == X:
                        break
    if True in dp[X]:
        print(1)
    else:
        print(0)
f = time.time()
print(f-s)

### FIXED CODE ###

X = int(input())
dp = [False for _ in range(X+1)]
dp[0] = True
for x in range(X+1):
    if x > 99:
        item = [100, 101, 102, 103, 104, 105]
        for i in item:
            if dp[x-i]:
                dp[x] = True
if dp[X]:
    print(1)
else:
    print(0)
def main():
  n = int(input())
  mod = 10**9+7
  a = []
  for i in range(n):
    a.extend(list(map(int,input().split())))
  dp = [0]*(1<<n)
  dp[0] = 1
  for S in range((1<<n)-1):
    k = bin(S).count("1")*n
    t = dp[S]
    for i in range(n):
      if a[k+i]:
        dp[S|1<<i] = (dp[S|1<<i]+t)%mod
  print(dp[(1<<n)-1])
main()

### FIXED CODE ###

N = int(input())
stage = list(map(int, input().split(" ")))

INF = float('inf')
DP = [INF for i in range(N)]

for i in range(N):
    if i == 1:
        DP[i] = abs(stage[i] - stage[i-1])
    elif i == 2:
        DP[i] = min(abs(stage[i] - stage[i-2]), DP[i-1] + abs(stage[i] - stage[i-2]))
    else:
        DP[i] = min(DP[i-1] + abs(stage[i] - stage[i-1]), DP[i-2] + abs(stage[i] - stage[i-2]))

print(DP[N-1])
a,b = map(int,input.split())
print(a + b)


### FIXED CODE ###

a,b = map(int,input().split())
print(a + b)
from collections import Counter


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

C=Counter(S).most_common()
L=len(C)

D=[]

D.append(C[0][0])

for i in range(1,L):
    if C[0][1]==C[i][1]:
        D.append(C[i][0])
D.sort()

for i in range(L):
    print(D[i])

### FIXED CODE ###


from collections import Counter


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

C=Counter(S).most_common()
L=len(C)

D=[]

D.append(C[0][0])

for i in range(1,L):
    if C[0][1]==C[i][1]:
        D.append(C[i][0])
D.sort()
M=len(D)

for i in range(M):
    print(D[i])