Harryxun/stf_run huggingface dataset:
A,B,C,D,E,F = map(int,input().split())
M = []
S = []
 
for a in range(1+F//100):
    for b in range(1+F//100):
        if 100*(a*A+b*B)<=F:
            M.append(100*(a*A+b*B))

for c in range(1+F//C):
    for d in range(1+F//D):
        if c*C+d*D<=F:
            S.append(c*C+d*D)

M=list(set(M))
S=list(set(S))
M.sort()
S.sort()
#print(M,S)

x = 0
for m in M:
  for s in S:
    if m != 0 and s != 0 and m+s <= F:
      sol = 100 * s / m
      if sol > x and sol <= E:
        x = sol
        X,Y = m+s,s
      
print(X,Y)

### FIXED CODE ###

A,B,C,D,E,F = map(int,input().split())
W = []
S = []

# 100A,100B の水
for a in range(1 + F // 100):
    for b in range(1 + F // 100):
        water = 100 * (a * A + b * B)
        if 0 < water <= F:
            W.append(water)

# c,d の砂糖
for c in range(1 + F // C):
    for d in range(1 + F // D):
        sugar = c * C + d * D
        if sugar <= F:
            S.append(sugar)

W = list(set(W))
S = list(set(S))

x = -1
for w in W:
    for s in S:
        if w + s <= F:
            sol = 100 * s / w
            if x < sol <= E:
                x = sol
                X, Y = w + s, s

print(X,Y)
N, M = map(int, input().split())
d=[[] for i in range(N)]
for i in range(M):
    b, c = map(int, input().split())
    for j in range(N):
        if b == j:
            d[j-1].append(c-1)
        if c == j:
            d[j-1].append(b-1)
while True:
    count = 0
    for i in range(N):
        if len(d[i]) == 1:
            d[d[i]-1].remove(i)
            d[i]=[]
            count += 1
        if count == 0:
            break
        a+=count
print(a)

### FIXED CODE ###

n,m=map(int,input().split())
l=[[] for _ in range(n)]
for _ in range(m):
    a,b=map(int,input().split())
    l[a-1].append(b-1)
    l[b-1].append(a-1)
a=0
while 1:
    x=0
    for i in range(n):
        if len(l[i])==1:
            l[l[i][0]].remove(i)
            l[i]=[]
            x+=1
    if x==0:break
    a+=x
print(a)
from math import gcd

a, b = map(int, input().split())
g = gcd(a, b)
ans = set([1])
for i in range(2, 1000000):
    while g % i == 0:
        g = g // i
        ans.add(i)

print(len(ans))

### FIXED CODE ###

def gcd(a : int, b: int):
    if b == 0:
        return a
    else:
        return gcd(b, a % b)

a, b = map(int, input().split())
g = gcd(a, b)
ans = set([1])
for i in range(2, 1000000):
    while g % i == 0:
        g = g // i
        ans.add(i)
if g > 1:
    ans.add(g)

print(len(ans))
N,R = map(int, input().split() )
if N >= 10 :
    print( R ) 
else :
    print( R + 100*( 10 -N )
    

### FIXED CODE ###

N,R = map(int,input().split())
if N < 10 :
    print( R + 100*(10 - N) )
else :
    print( R )
A = int(input())
B = int(input())

cnt = 1
num = A

if num < B:
  while num < B:
    num = num + (A - 1)
    cnt += 1
  
print(cnt)

### FIXED CODE ###

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

cnt = 1
num = A

if num < B:
  while num < B:
    num = num + (A - 1)
    cnt += 1
elif B == 1:
  cnt = 0
  
print(cnt)
from math import gcd
a, b, c, d = map(int, input().split())
"""
ans: (B-A) - {Cの倍数の個数＋Dの倍数の個数 - CDの倍数の個数}
"""
def count(t):
    amari = a % t
    return (b - a - amari ) // t
print( b-a - (count(c) + count(d) - count(c*d)))


### FIXED CODE ###

from fractions import gcd
a, b, c, d = map(int, input().split())
"""
ans: B以下の整数から条件を満たす個数　 - A-1以下の整数から条件を満たす個数
X以下の整数から条件： X - X//c -X//d + X//lcm(c,d)
"""
def count(X, t):
    return X//t
cd = c * d // gcd(c, d)
b_under = b - count(b, c) - count(b, d) + count(b, cd)
a_under = a-1 - count(a-1, c) - count(a-1, d) + count(a-1, cd)

print( b_under - a_under )
def main():
    r, c, k = map(int, input().split())
    d = [[0]*c for _ in [0]*r]
    for _ in range(k):
        t1, t2, t3 = map(int, input().split())
        d[t1-1][t2-1] = t3
    dp = [[0]*4 for _ in [0]*c]
    dp[0][1] = d[0][0]
    for x in range(r-1):
        d2 = d[x]
        dp2 = [[0]*4 for _ in [0]*c]
        for y in range(c-1):
            d3 = d2[y+1]
            for z in range(3):
                dp[y+1][z+1] = max(dp[y+1][z+1], dp[y][z]+d3)
            for z in range(4):
                dp[y+1][z] = max(dp[y+1][z], dp[y][z])
        d2 = d[x+1]
        for y in range(c):
            dp2[y][1] = max(dp2[y][1], max(dp[y])+d2[y])
            dp2[y][0] = max(dp2[y][0], max(dp[y]))
        dp = dp2
    for y in range(c-1):
        d3 = d2[y+1]
        for z in range(3):
            dp[y+1][z+1] = max(dp[y+1][z+1], dp[y][z]+d3)
        for z in range(4):
            dp[y+1][z] = max(dp[y+1][z], dp[y][z])
    print(max(dp[c-1]))


main()


### FIXED CODE ###

def main():
    r, c, k = map(int, input().split())
    d = [[0]*c for _ in [0]*r]
    for _ in range(k):
        t1, t2, t3 = map(int, input().split())
        d[t1-1][t2-1] = t3
    dp = [[0]*4 for _ in [0]*c]
    dp[0][1] = d[0][0]
    for x in range(r):
        dp2 = [[0]*4 for _ in [0]*c]
        for y in range(c):
            for z in range(4):
                if y != c-1:
                    if z != 3:
                        dp[y+1][z+1] = max(dp[y+1]
                                           [z+1], dp[y][z]+d[x][y+1])
                    dp[y+1][z] = max(dp[y+1][z], dp[y][z])
            if x != r-1:
                dp2[y][1] = max(dp2[y][1],
                                max(dp[y])+d[x+1][y])
                dp2[y][0] = max(dp2[y][0], max(dp[y]))
        if x != r-1:
            dp = dp2
    print(max(dp[c-1]))


main()
n,m = [int(i) for i in input().split()]
A=[]
b=[]
for i in range(m):
	A.append([int(j) for j in input().split()])
for i in range(m):
	b.append(int(input()))
for i in range(n):
	s = 0
	for j in range(m):
		s+=A[i][j]*b[j]
	print(s)

### FIXED CODE ###

a,b=map(int,input().split())
A=[]
B=[]
for i in range(a):
	A.append([int(j) for j in input().split()])

for i in range(b):
	B.append(int(input()))


for i in range(a):
	s=0
	for j in range(b):
		s+=A[i][j]*B[j]
	print(s)
import numpy as np
INF = 10 ** 18
H, N = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(N)]
dp = [INF for i in range(H + 1)]

dp[0] = 0

for i in range(N):
    for j in range(H):
        if j - ab[i][0] + 1 >= 0:
            dp[j + 1] = min(dp[j + 1], dp[j - ab[i][0] + 1] + ab[i][1])
        else:
            dp[j + 1] = min(dp[j + 1], dp[0] + ab[i][1])

print(dp[-1])

### FIXED CODE ###

INF = 10 ** 18
H, N = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(N)]
dp = [INF for i in range(H + 1)]

dp[0] = 0

for i in range(N):
    for j in range(H):
        if j - ab[i][0] + 1 >= 0:
            dp[j + 1] = min(dp[j + 1], dp[j - ab[i][0] + 1] + ab[i][1])
        else:
            dp[j + 1] = min(dp[j + 1], dp[0] + ab[i][1])

print(dp[-1])
N = str(input())
enc = 0

for char in list(N):
  if char == "7":
    enc +=1
    
if enc >= 1:
  return "Yes"
else:
  return "No"

### FIXED CODE ###

N = str(input())
enc = 0

for char in list(N):
  if char == "7":
    enc += 1
    
if enc >= 1:
  print("Yes") 
else:
  print("No")
n=raw_input()
if n[1]=n[2]=n[3]=n[4] or n[1]=n[2]=n[3]!=n[4] or n[2]=n[3]=n[4]!=n[1]:
  print "Yes"
else:
  print "No"

### FIXED CODE ###

n=raw_input()
if n[0]==n[1]==n[2]==n[3] or n[0]==n[1]==n[2] or n[1]==n[2]==n[3]:
  print "Yes"
else:
  print "No"
k=int(input())
l=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

print(l[k])

### FIXED CODE ###

k=int(input())
l=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

print(l[k-1])
a,b = [int(input()) for _ in range(2)]
print(a*b)

### FIXED CODE ###

a,b = [int(i) for i in input().split()]
print(a*b)
N, M = map(int, input().split())

allL = 1
allR = N
for L, R in map(int, input().split()) in range(M):
  allL = max(allL, L)
  allR = min(allR, R)

print(max(allR - allL + 1, 0))


### FIXED CODE ###

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

allL = 1
allR = N
for L, R in (map(int, input().split()) for _ in range(M)):
  allL = max(allL, L)
  allR = min(allR, R)

print(max(allR - allL + 1, 0))
import numpy as np
n,w=map(int,input().split())
wv=[]
for _ in range(n):
      wv.append(list(map(int,input().split())))

# dp[j]:重さの総和がj以下となるように選択した時の最大
dp=np.zeros(w+1)
for i in range(n):
      # i+1個目までの商品の中から選ぶときのdpを計算する
      # i+1個目の計算をするときはdpはi個目までの商品の中から選んだ時のdpとなっている
      # i=0 ->dp=zeros
      w_=wv[i][0]
      v_=wv[i][1]
      # dp[w_:]:i+1個目の商品を加えられるのはこの部分のみ。
      # dp[w_:]:i+1個目の商品を加えないパターン
      # dp[:-w_]+v_:i+1個目の商品を加えたパターン。商品の重さだけwを減らした時の最大価値に商品の価値をプラスしている。
      dp[w_:] = np.maximum(dp[w_:], dp[:-w_] + v_)
print(int(dp[-1]))


### FIXED CODE ###

import numpy as np
n,w=map(int,input().split())
wv=[]
for _ in range(n):
      wv.append(list(map(int,input().split())))
# dp[i]:価値の総和をちょうどiにできる最小の重さ総和
# dp[i]=w+1となる価値総和iにはできない。
# 求めるのはdp[i]<=wとなる最大のi
dp=np.full(10**5+1,w+1) # ndarray(1000,1000,...,1000])
dp[0]=0
# 10**5:viの総和の最大
for i in range(n):
      w_=wv[i][0]
      v_=wv[i][1]
      # i番目までの商品を取るか取らないかの全ての組み合わせをためすことができる。
      dp[v_:]=np.minimum(dp[v_:], dp[:-v_]+w_)
print(np.where(dp<=w)[0][-1])
l = map(int,raw_input().split())
L = sorted(l,key=int)
print L[0],L[1],L[2]

### FIXED CODE ###

l=list(map(int,input().split()))
L=sorted(l)
print(L[0],L[1],L[2])
sa, sb, sc = [input() for i in range(3)]
sa, sb, sc = list(sa),list(sb),list(sc)

i = sa.pop(0)

while True : 
    if i =='a':
        if lem(sa) ==0:
            print(sa)
            exit()    
        i = sa.pop(0)

    if i =='b':
        if lem(sb) ==0:
            print(sb)
            exit()    
        i = sb.pop(0)

    if i =='c':
        if lem(sc) ==0:
            print(sc)
            exit()    
        i = sc.pop(0)
        

### FIXED CODE ###

# 入力
SA=list(input())
SB=list(input())
SC=list(input())

# 次に捨てる人（初期値は'A')
x='a'

while True:
  if x=='a':
    # リストの要素が0ならば終了する
    if len(SA)==0:
      print('A')
      exit()

    # 先頭要素を除去してxに代入
    x=SA[0]
    SA.remove(x)
  elif x=='b':
    # リストの要素が0ならば終了する
    if len(SB)==0:
      print('B')
      exit()

    # 先頭要素を除去してxに代入
    x=SB[0]
    SB.remove(x)
  else:
    # リストの要素が0ならば終了する
    if len(SC)==0:
      print('C')
      exit()

    # 先頭要素を除去してxに代入
    x=SC[0]
    SC.remove(x)
import math
from fractions import gcd
 
def number_calc(A,B,x):
  	if A%x == 0:
      left = A//x
    else:
      left = A//x + 1
    right = B//x
    res = max(right-left+1,0)
    return res
 
A,B,C,D = map(int,input().split())
 
ans = B-A+1
ans -=number_calc(A,B,C)
ans -=number_calc(A,B,D)
lcm = (C*D)//gcd(C,D)
ans +=number_calc(A,B,lcm)
 
print(ans)

### FIXED CODE ###

import math
from fractions import gcd


A,B,C,D = map(int,input().split())
lcm = C//gcd(C,D)*D
ans = B - B//C - B//D + B//lcm
a = A-1
ans -= a - a//C - a//D + a//lcm 

print(ans)
n=int(input())
if n==1:
    print('Hello World')
elif n==2:
    a,b=(int(x) for x in input().split())
    print(int(a + b))

### FIXED CODE ###

n=int(input())
if n==1:
    print('Hello World')
elif n==2:
    a=int(input())
    b=int(input())
    print(int(a + b))
N,M = map(int,input().split())
D = [[] for i in range(M)]
for i in range(N):
    A,B = map(int,input().split())
    if A <= M:
        D[A-1].append(B)
count = 0
Tax = []
for i in range(M):
    for j in D[i]:
        bisect.insort_left(Tax,j)
    if not Tax:
        continue
    count += Tax.pop()
print(count)

### FIXED CODE ###

A,B = map(int,input().split())
C = max(A+B,A-B)
print(max(A*B,C))
N = int(input)
A = list(map(int, input().split()))

f = True
cnt = 0
while(f):
  for i in range(N):
    if A[i]%2 == 0:
      A[i] = A[i]//2
      continue
    f = False
  if f:
    cnt += 1

print(cnt)


### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))

f = True
cnt = 0
while(f):
	for i in range(N):
		if A[i]%2 == 0:
			A[i] = A[i]//2
		else:
			f = False
			break
	if f:
		cnt += 1

print(cnt)
N = int(input())
a = [int(x) for x in input().split()]

A = a[0]
asum = [A]
if A == 0:
    ansp,ansm,tempp,tempm = 1,1,1,-1
elif A < 0:
    ansp,ansm,tempp,tempm = -A + 1, 0, -A + 1, 0
else:
    ansp,ansm,tempp,tempm = 0, A2 + 1, 0, -A2 - 1

for i in range(1,N):
    A = asum[i-1] + a[i]
    asum += [A]

    A1 = A + tempp
    if A1 == 0:
        ansp += 1
        tempp += ((i%2)*2-1)
    elif i%2==0 and A1 < 0:
        ansp += -A1 + 1
        tempp += -A1 + 1
    elif i%2!=0 and A1 > 0:
        ansp += A1 + 1
        tempp += -A1 - 1

    A2 = A + tempm
    if A2 == 0:
        ansm += 1
        tempm += -((i%2)*2-1)
    elif i%2!=0 and A2 < 0:
        ansm += -A2 + 1
        tempm += -A2 + 1
    elif i%2==0 and A2 > 0:
        ansm += A2 + 1
        tempm += -A2 - 1

print(min(ansp,ansm))

### FIXED CODE ###

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

A = a[0]
asum = [A]
if A == 0:
    ansp,ansm,tempp,tempm = 1,1,1,-1
elif A < 0:
    ansp,ansm,tempp,tempm = -A + 1, 0, -A + 1, 0
else:
    ansp,ansm,tempp,tempm = 0, A + 1, 0, -A - 1

for i in range(1,N):
    A = asum[i-1] + a[i]
    asum += [A]

    A1 = A + tempp
    if A1 == 0:
        ansp += 1
        tempp += ((i%2)*2-1)
    elif i%2==0 and A1 < 0:
        ansp += -A1 + 1
        tempp += -A1 + 1
    elif i%2!=0 and A1 > 0:
        ansp += A1 + 1
        tempp += -A1 - 1

    A2 = A + tempm
    if A2 == 0:
        ansm += 1
        tempm += -((i%2)*2-1)
    elif i%2!=0 and A2 < 0:
        ansm += -A2 + 1
        tempm += -A2 + 1
    elif i%2==0 and A2 > 0:
        ansm += A2 + 1
        tempm += -A2 - 1

print(min(ansp,ansm))
N=map(int,input().split())
count=0
for i in N:
  if N[i]%2!=0
  	count+=1
  else:
    pass
print(count//len(N))

### FIXED CODE ###

N = int(input())
count = 0
 
for i in range(1,N+1):
    if i % 2 == 1:
        count += 1

print(count/N)
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<numeric>
#include<cmath>
#include<stdio.h>
//#include<array>

#define rep(i,n) for(int i=0;i<(n);i++)
#define LL long long int


using namespace std;

int main(void){
    LL a,b,c,d;
    cin >> a>>b>>c>>d;

    LL ans=0;
    

    LL C =b/c-a/c;
    LL D= b/d-a/d;
      /* 
    for(int i =a; i<b; i++){

        if(i%c!=0 && i%d!=0){
            ans++;
        }

    }*/
    /* vector<LL> lista(C);
    int h=0;
    for(LL i =a/c,h=0;i<b/c;h++,i++){
        lista[h]=i*a;
        cout<<lista[h]<< " " << h<< " " << i<< " " << i*a<<endl;
    }
    LL x;
  
    LL j=0;
    LL EX=0;
   for(LL i =a/d;i<b/d;i++){
        x=i*b;
         while(x>lista[j] )j++;
        cout<<x<< " " << lista[j]<< " " << h<< " " << j<<endl;
        if(lista[j]==x)EX++;
        if( h>j)break;

   }*/

    cout <<b-a+1-(C+D)<<endl;
    return 0;
}

### FIXED CODE ###

def gcd(x,y):
    if x<y:
        x,y=y,x
    if y==0:
        return x
    c=x%y
    return gcd(y,c)   
def lcm( x, y):
    return (x*y)//gcd(x,y)
a,b,c,d=map(int,input().split())
C =b//c-(-(-a//c))
D= b//d-(-(-a//d))
EX=  lcm(c,d)
EX=b//EX+(-a//EX)
print(b-a-(C+D)+EX)
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

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

E = lcm(C, D)
count_A = (A - 1) - (A - 1)//C - (A - 1)//D + (A - 1)//E
count_B = B - B//C - B//D + B//E

print(count_B - count_A)

### FIXED CODE ###

# C問題
import fractions
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

A, B, C, D = map(int, input().split())
E = lcm(C, D)
ac = A // C
bc = B // C
ad = A // D
bd = B // D
ae = A // E
be = B // E
if A % C == 0:
    ac -= 1
if A % D == 0:
    ad -= 1
if A % E == 0:
    ae -= 1
xx = bc - ac + bd - ad
yy = be - ae
print(B - A + 1 - xx + yy)
n, m = map(int, raw_input().split())
c = map(int, raw_input().split())

t = [float('inf') for i in range(n+1)]
t[0] = 0

for i in range(n):
    if c[i] > n:
        break
    else:
        for j in range(c[i], n+1):
            t[j] = min([t[j], t[j-c[i]]+1])
print t[n]

### FIXED CODE ###

n, m = map(int, raw_input().split())
c = map(int, raw_input().split())

t = [float('inf') for i in range(n+1)]
t[0] = 0

for i in range(m):
    if c[i] > n:
        break
    else:
        for j in range(c[i], n+1):
            t[j] = min([t[j], t[j-c[i]]+1])
print t[n]
# -*- coding: utf-8 -*-

import sys
from collections import Counter

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

def fermat(x, y, MOD): return x * pow(y, MOD-2, MOD) % MOD

def factorize(num: int) -> dict:
    """ 素因数分解 """
    from math import sqrt
    from collections import Counter

    d = Counter()
    # 終点はルート切り捨て+1
    for i in range(2, int(sqrt(num))+1):
        # 素因数分解：小さい方から割れるだけ割って素数をカウント
        while num % i == 0:
            num //= i
            d[i] += 1
        # 1まで分解したら終了
        if num == 1:
            break
    # 最後に残ったnumは素数(ただし1^1は1^0なので数に入れない)
    if num != 1:
        d[num] += 1
    return d

def mul(C1, C2):
    return C1 + C2

def div(C1, C2):
    return C1 - C2

def gcd(C1, C2):
    return C1 & C2

def lcm(C1, C2):
    return C1 | C2

N = INT()
A = LIST()

# 素因数の状態で全体のLCMを出す
A2 = [factorize(a) for a in A]

raise Exception
l2 = Counter()
for a in A2:
    l2 = lcm(l2, a)

# 通常の値に戻す
l = 1
for k, v in l2.items():
    l *= pow(k, v, MOD)
    l %= MOD

ans = 0
for a in A:
    ans += fermat(l, a, MOD)
    ans %= MOD
print(ans)


### FIXED CODE ###

# -*- coding: utf-8 -*-

import sys
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

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

N = INT()
A = LIST()

l = 1
for a in A:
    l = lcm(l, a)

ans = 0
for i, a in enumerate(A):
    ans += l // a
print(ans%MOD)
s=list(str(input()))
li=["A","C","G","T"]
ans=0
x=[]
for i in range(0,len(s)):
  if s[i] in li:
    ans+=1
    x.append(ans)
  else:
    ans=0
        
print(max(x))

### FIXED CODE ###

s=list(str(input()))
li=["A","C","G","T"]
ans=0
x=[0]
for i in range(0,len(s)):
  if s[i] in li:
    ans+=1
    x.append(ans)
  else:
    ans=0
        
print(max(x))
def f(k):
    if k == 0:
        return [0,0]
    elif k == 1:
        return [2,0]
    elif k == 2:
        return [2,1]
    else:
        return [k//2, k-k//2]
def solve(k):
    a = f(k)
    print(len(a))
    print(" ".join(map(str, a))
solve(k=int(input()))

### FIXED CODE ###

def f(k):
    n = 50
    a = [k//n + n-1] * n
    for i in range(k%n):
        for j in range(n):
            if i == j:
                a[j] += n
            else:
                a[j] -= 1
    return a

def solve(k):
    a = f(k)
    print(len(a))
    print(" ".join(map(str, a)))

solve(k=int(input()))
from dicimal import Decimal
a,b,c=map(Decimal,input().split())
if (a.sqrt()+b.sqrt())<c.sqrt():
  print("Yes")
else:
  print("No")

### FIXED CODE ###

from decimal import Decimal
a,b,c=map(Decimal,input().split())
if (a.sqrt()+b.sqrt())<c.sqrt():
  print("Yes")
else:
  print("No")
S = input()
T = input()

tmp = np.zeros(len(T))

i=0
flg=True

while flg:
    for j in range(i, len(T)):
        if T[i:j+1] in S:
            tmp[i] = j
    i = i + int(tmp[i])
    if i >= len(T)-1:
        flg=False

print(int(np.max(tmp)))

### FIXED CODE ###

S=input()
T=input()
ls=len(S)
lt=len(T)
ans=lt
for i in range(0,ls-lt+1):
    a=0
    for j in range(lt):
        if S[i+j]==T[j]:
            a+=1
    ans=min(ans,lt-a)
print(ans)
N, A, B = map(int, input().split())
res = 0
for i in range(N+1):
    if A <= sum([int(s) for s in str(i)]) <= B:
        res += i
print(res)

### FIXED CODE ###

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

if a + b > c + d:
    print('Left')
elif a + b == c + d:
    print('Balanced')
else:
    print('Right')
n,T = list(map(int,input().split()))
ans = 10000
for i in range(n):
  c,t = map(int,input().split())
  if(t<=T):
    ans=min(ans,c)
  else:
    None
if(ans = 10000):
  print("TLE")
else:
  print(ans)


### FIXED CODE ###

N,T = map(int,input().split())
a = []
for i in range(N):
  c,t = map(int,input().split())
  if(t<=T):
    a.append(c)
if(len(a)==0):
  print("TLE")
else:
  a.sort()
  print(a[0])
import numpy as np
import collections as cl
n=int(input())
l=np.asarray(list(map(int,input().split())))
rng=np.arange(n)
i=np.tile(rng,(n**2,1)).T.ravel()
j=np.tile(np.tile(rng.copy(),(n,1)).ravel(),(n,1)).T.ravel()
k=np.tile(rng.copy(),(n**2,1)).ravel()
tmp=(l[i]<l[j]+l[k])*(l[j]<l[i]+l[k])*(l[k]<l[i]+l[j])*(i!=j)*(i!=k)*(j!=k)
tmp=np.asarray(np.where(tmp.reshape(n,n,n))).T.astype(str)
tmp.sort(axis=-1)
ans=[]
for t in tmp:
    ans.append(t[0]+t[1]+t[2])
print(len(cl.Counter(ans)))

### FIXED CODE ###

from bisect import bisect_left
 
n = int(input())
l = sorted(list(map(int,input().split())))

ans = 0
for i in range(n-2):
    for j in range(i+1,n-1):
        k = bisect_left(l,l[i]+l[j])
        ans += k - j - 1

print(ans)
n=int(input())
for i in range(1,10):
	if n % i ==0 and n//i <=9:
    	print("Yes")
    	break
else:
	print("No")

### FIXED CODE ###

n=int(input())
for i in range(1,10):
	if n % i ==0 and n//i <=9:
		print("Yes")
		break
else:
	print("No")
H,N =map(int,input().split()) 
dp = [[0] * (H+1) for i in range(N)]
A,B = splitintinput()
for j in range(1, H+1):
    dp[0][j] = B * int((j+A-1)/A)

for i in range(1,N):
    A,B = map(int,input().split())
    for j in range(1, A+1):
        dp[i][j] = min(dp[i-1][j], B)
    for j in range(A+1, H+1):
        dp[i][j] = min(dp[i-1][j], dp[i][j-A] + B)

print(dp[N-1][H])


### FIXED CODE ###

H,N =map(int,input().split()) 
dp = [[0] * (10001) for i in range(1001)]
A,B = map(int,input().split()) 
for j in range(1, H+1):
    dp[0][j] = B * int((j+A-1)/A)

for i in range(1,N):
    A,B = map(int,input().split())
    for j in range(1, A+1):
        dp[i][j] = min(dp[i-1][j], B)
    for j in range(A+1, H+1):
        dp[i][j] = min(dp[i-1][j], dp[i][j-A] + B)

print(dp[N-1][H])
def main()
    x, y =[int(i) for i in input().split()]
    while y != 0 :
        x, y = y, x%y
    print(x)

if __name__ == '__main__':
    def main()

### FIXED CODE ###

def main() :
    x, y = [int(i) for i in input().split()]
    while y != 0 :
        x, y = y, x%y

    print(x)

if __name__ == '__main__':
    main()
n = int(input())
h = map(int, input().split())
sum = 0
max = 0
for i in range(n):
    if max <= h[i]:
        sum　+= 1
        max = h[i]
print(sum)
        
    

### FIXED CODE ###

n = int(input())
h = list(map(int, input().split()))
sum = 0
m = 0
for i in h:
    if m <= i:
        sum += 1
        m = i
print(sum)