Harryxun/stf_run huggingface dataset:
from itertools import combinations
inf = input().split()
N = int(inf[0])
K = int(inf[1])
if K > (N-1)*(N-2)//2:
  print(-1)
else:
  if K==(N-1)*(N-2)//2:
    for i in range(2,N+1):
      print(1,i)
  else:
    ls = [i for i in range(1,N+1)]
    ls = list(combinations(ls,2))
    dic = {x:0 for x in ls}
    for i in range(2,N+1):
      dic[(1,i)] = 1
    m = (N-1)*(N-2)//2
    rem = []
    while m>K:
      for x in ls:
        if dic[x]==0:
          rem += [x]
          dic[x]=1
          m-=1
          continue
  ans = [i for i in dic.keys() if i not in rem]
  for x in ans:
    print(x[0], x[1])

### FIXED CODE ###

from itertools import combinations
inf = input().split()
N = int(inf[0])
K = int(inf[1])
if K > (N-1)*(N-2)//2:
  print(-1)
else:
  if K==(N-1)*(N-2)//2:
    print(N-1)
    for i in range(2,N+1):
      print(1,i)
  else:
    ls = [i for i in range(1,N+1)]
    ls = list(combinations(ls,2))
    dic = {x:0 for x in ls}
    for i in range(2,N+1):
      dic[(1,i)] = 1
    m = (N-1)*(N-2)//2
    while m>K:
      for x in ls:
        if dic[x]==0:
          dic[x]=1
          m-=1
          break
    ans = [i for i in dic.keys() if dic[i]==1]
    print(len(ans))
    for x in ans:
      print(x[0], x[1])
s = list(input())
ans = 0
n = len(s)
for i in range(len(s)):
  if s[i] != s[n-i]:
    ans += 1
print(ans)

### FIXED CODE ###

s = list(input())
ans = 0
n = len(s)-1
for i in range(len(s)):
  if s[i] != s[n-i]:
    ans += 1
print(int(ans/2))
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

inter_A = (A//10)*10 + 10
inter_B = (B//10)*10 + 10
inter_C = (C//10)*10 + 10
inter_D = (D//10)*10 + 10
inter_E = (E//10)*10 + 10

first_A = A + inter_B + inter_C + inter_D + inter_E
first_B = inter_A + B + inter_C + inter_D + inter_E
first_C = inter_A + inter_B + C + inter_D + inter_E
first_D = inter_A + inter_B + inter_C + D + inter_E
first_E = inter_A + inter_B + inter_C + inter_D + E
print(min[first_A, first_B, first_C, first_D, first_E])

### FIXED CODE ###

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
 
inter_A = (A//10)*10 if A%10 == 0 else (A//10)*10 + 10
inter_B = (B//10)*10 if B%10 == 0 else (B//10)*10 + 10
inter_C = (C//10)*10 if C%10 == 0 else (C//10)*10 + 10
inter_D = (D//10)*10 if D%10 == 0 else (D//10)*10 + 10
inter_E = (E//10)*10 if E%10 == 0 else (E//10)*10 + 10
 
first_A = A + inter_B + inter_C + inter_D + inter_E
first_B = inter_A + B + inter_C + inter_D + inter_E
first_C = inter_A + inter_B + C + inter_D + inter_E
first_D = inter_A + inter_B + inter_C + D + inter_E
first_E = inter_A + inter_B + inter_C + inter_D + E
print(min([first_A, first_B, first_C, first_D, first_E]))
d = int(input())
if d == 25:
	print('Christmas')
elif d == 24:
	print('Christmas Eve')
elif d == 23:
	print('Christmas Eve Eve')
else d == 22:
	print('Christmas Eve Eve Eve')


### FIXED CODE ###

d = int(input())
if d == 25:
	print("Christmas")
elif d == 24:
	print("Christmas Eve")
elif d == 23:
	print("Christmas Eve Eve")
else:
	print("Christmas Eve Eve Eve")
a=int(input())
a.rempve("/","")
print("Heisei" if a<=2019430 else "TBD")

### FIXED CODE ###

a=input()
print("Heisei" if int(a.replace("/", ""))<=20190430 else "TBD")
w,h,x,y = map(int, input().split())

c_x = w/2
c_y = h/2

if x = c_x and y = c_y:
  print(w*h/2, 1)
else:
  print(w*h/2, 0)


### FIXED CODE ###

w,h,x,y = map(int, input().split())

c_x = w/2
c_y = h/2

if x == c_x and y == c_y:
  print(w*h/2, 1)
else:
  print(w*h/2, 0)
from sys import stdin
s1 = (stdin.readline().rstrip())
s2 = int(stdin.readline().rstrip())
if s1 == s2[::-1]:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

from sys import stdin
s1 = (stdin.readline().rstrip())
s2 = (stdin.readline().rstrip())
if s1 == s2[::-1]:
    print("YES")
else:
    print("NO")
N, M = map(int, input().split())
matrix=[[0]*N for i in range(N)]
for i in range(M):
    a, b = map(int, input().split())
    matrix[a-1][b-1]=1
    matrix[b-1][a-1]=1
import itertools 
count=0
for i in itertools.permulations(range(N)):
    if i[0]==0:
        for j in range(N-1):
            result=1
            result*=matrix[i[j]][i[j+1]]
            if result==1:
                count+=1
    else:
        break
print(count)
    

### FIXED CODE ###


import itertools

N, M = map(int, input().split())
adj_matrix = [[0]* N for _ in range(N)]

for i in range(M): #隣接行列
    a, b = map(int, input().split())
    adj_matrix[a-1][b-1] = 1
    adj_matrix[b-1][a-1] = 1

cnt = 0

for each in itertools.permutations(range(N)):
    if each[0] != 0:
        break
    factor = 1
    for i in range(N-1):
        factor *= adj_matrix[each[i]][each[i+1]]
    cnt += factor

print(cnt)
a,b,c=map(int,input(),split())

if c>=a and b<=a:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

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

if c>=a and c<=b:
  print("Yes")
else:
  print("No")
n=int(input())
l=list(map(int,input().split()))
cnt=0
for i in range(n):
  c=0
  while l[i]%2==0:
    l[i]=l[i]//2
      c+=1
  cnt+=c
print(cnt)

### FIXED CODE ###

n=int(input())
l=list(map(int,input().split()))
cnt=0
for i in range(n):
  c=0
  while l[i]%2==0:
    l[i]=l[i]//2
    c+=1
  cnt+=c
print(cnt)
n=int(input())
string=""

while n!=0:
    if n%2==1:
        string="1"+string
        n=n-1
    else:
        string="0"+string
    n=n/(-2)
if n==0:
    string="0"+string
    
print(string)

### FIXED CODE ###

n,k=(int(i) for i in input().split())
if n%k==0:
    print(0)
else:
    print(1)
while 1:
	N = map(int,raw_input().split())
	if sum(N) == 0: break
	md,gg,go = N[0]+N[3],N[1]+N[4],N[2]+N[5]
	mn = min(md,gg,go)
	ans = 0
	for i in range(max(0,w-2),w):
		ans = max(ans,i+(md-i)/3+(gg-i)/3+(go-i)/3)
	print ans

### FIXED CODE ###

while 1:
	N = map(int,raw_input().split())
	if sum(N) == 0: break
	a,b,c = N[0]+N[3],N[1]+N[4],N[2]+N[5]
	m = min(a,b,c)
	ans = 0
	for i in range(max(0,m-2),m+1):
		ans = max(ans,i+(a-i)/3+(b-i)/3+(c-i)/3)
	print ans
import sys

read= sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
MOD = 1000000007
sys.setrecursionlimit(10**7)

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

res = 0

in_i = 0
de_i = 0
i = 0
while i <= N-1:
    for j in range(i+1,N):
        if A[j] >= A[j-1]:continue
        else:
            break

    in_i = j
    for j in range(i+1,N):
        if A[j] <= A[j-1]:continue
        else:
            break
    de_i = j

    i = max(de_i,in_i)
    res+=1
print(i)

print(res)



### FIXED CODE ###

import sys

read= sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
MOD = 1000000007
sys.setrecursionlimit(10**7)

#N,*A = map(int,read().split())
N = int(input())
l = list(map(int,input().split()))

#最初の状態分を加算するため、1からカウント
ans = 1

S = 0 #現在の状態 増加 or 減少 or 初期化

for i in range(1,N):
    X = l[i] - l[i-1]

    X = 0 if X == 0 else 1 if X > 0 else -1

    #同じ値の時l[i] == l[i-1]
    if X == 0:
        continue

    #Stateが初期のときは現在の状態に更新
    elif S == 0:
        S = X

    #Stateが違うときは答えに加算して、Stateを初期値に
    elif S != X:
        ans += 1
        S = 0

print(ans)
N=int(read_input())
P=[int(x) for x in read_input().split()]

N_J=list(range(1,N+1))
ans='NO'
for i in range(N):
    for j in range(N):
        P_temp=P.copy()
        p_i=P[i]
        p_j=P[j]

        P_temp[i]=p_j
        P_temp[j]=p_i
        
        if P_temp==N_J:
            ans='YES'
            
print(ans)

### FIXED CODE ###

N=int(input())
P=[int(x) for x in input().split()]
 
N_J=list(range(1,N+1))
ans='NO'
for i in range(N):
    for j in range(N):
        P_temp=P.copy()
        p_i=P[i]
        p_j=P[j]
 
        P_temp[i]=p_j
        P_temp[j]=p_i
        
        if P_temp==N_J:
            ans='YES'
print(ans)
n = input()
x = (n - 1) // 111 + 1
print(x * 111)


### FIXED CODE ###

n = int(input())
x = (n - 1) // 111 + 1
print(x * 111)
from bisect import bisect_left, bisect_right
N, K = map(int, input().split())
A = sorted(list(map(int, input().split())))

negative_end = bisect_left(A, 0)
positive_start = bisect_right(A, 0)

positive_cnt = N - positive_start
negative_cnt = negative_end
zero_cnt = N - (positive_cnt + negative_cnt)

negative_pairs_cnt = positive_cnt * negative_cnt
zero_pairs_cnt = zero_cnt * (positive_cnt + negative_cnt) + (zero_cnt * (zero_cnt - 1) // 2)

if K <= negative_pairs_cnt:
    # にぶたん: X以下になるペアがK個以上あるか？
    ok, ng = 0, -10 ** 18
    while abs(ok - ng) > 1:
        X = (ok + ng) // 2
        or_higher_cnt, r = 0, positive_cnt
        for l in range(negative_end):
            while (r < N) and (A[l] * A[r] > X):
                r += 1
            or_higher_cnt += positive_cnt - (r - positive_start)
        if or_higher_cnt >= K:
            ok = X
        else:
            ng = X

    print(ok)

elif K <= negative_pairs_cnt + zero_pairs_cnt:
    print(0)

else:
    print(1 / 0)
    # # にぶたん: X以下になるペアがK個以上あるか？
    # K -= (negative_pairs_cnt + zero_pairs_cnt)
    # ok, ng = 10 ** 18, 0
    # while abs(ok - ng) > 1:
    #     X = (ok + ng) // 2
    #     or_higher_cnt = 0
    #     continue_flg = False
    # print(ok)


### FIXED CODE ###

from bisect import bisect_left, bisect_right
N, K = map(int, input().split())
A = sorted(list(map(int, input().split())))

negative_end = bisect_left(A, 0)
positive_start = bisect_right(A, 0)

positive_cnt = N - positive_start
negative_cnt = negative_end
zero_cnt = N - (positive_cnt + negative_cnt)

negative_pairs_cnt = positive_cnt * negative_cnt
zero_pairs_cnt = zero_cnt * (positive_cnt + negative_cnt) + (zero_cnt * (zero_cnt - 1) // 2)

if K <= negative_pairs_cnt:
    # にぶたん: X以下になるペアがK個以上あるか？
    ok, ng = 0, -10 ** 18
    while abs(ok - ng) > 1:
        X = (ok + ng) // 2
        or_higher_cnt, r = 0, positive_start
        for l in range(negative_end):
            while (r < N) and (A[l] * A[r] > X):
                r += 1
            or_higher_cnt += positive_cnt - (r - positive_start)

        if or_higher_cnt >= K:
            ok = X
        else:
            ng = X

    print(ok)

elif K <= negative_pairs_cnt + zero_pairs_cnt:
    print(0)

else:
    # にぶたん: X以下になるペアがK個以上あるか？
    K -= (negative_pairs_cnt + zero_pairs_cnt)
    ok, ng = 10 ** 18, 0
    while abs(ok - ng) > 1:
        X = (ok + ng) // 2
        or_higher_cnt = 0

        r = N - 1
        for l in range(positive_start, N):
            while (r < N) and (A[l] * A[r] > X) and (l < r):
                r -= 1
            or_higher_cnt += max(0, r - l)

        l = 0
        for r in range(negative_end - 1, -1, -1):
            while (l < N) and (A[l] * A[r] > X) and (l < r):
                l += 1

            or_higher_cnt += max(0, r - l)

        if or_higher_cnt >= K:
            ok = X
        else:
            ng = X

    print(ok)
# coding: utf-8

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

p.sort()

sep = []
for i in range(0,n-1):
    if(p[i] > a):
        sep.append(i)
        break
for i in range(sep[0],n-1):
    if(p[i] > b):
        sep.append(i)
        break

q1 = len(p[0:sep[0]])
q2 = len(p[sep[0]:sep[1]])
q3 = len(p[sep[1]:n])


#print("{}, {}, {}".format(q1,q2,q3))
print(min(q1,q2,q3))

### FIXED CODE ###

# coding: utf-8

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

p.sort()

cnt = [0,0,0]

for i in range(0,n):
    if(p[i] <= a):
        cnt[0]+=1
    elif(a < p[i] <= b):
        cnt[1]+=1
    else:
        cnt[2]+=1

#print(cnt)
print(min(cnt))
//https://qiita.com/minemine0505/items/9aeae0f651f19f2ac1e2
N = int(input())
S = input()
min = S[1:N].count("E") #最小値を保存しておく
now = S[1:N].count("E") #i-1 を見ているときのそっぽ向いてる子の数

for i in range (1,N):
    if S[i-1] == "E" and S[i] == "E":
        now -= 1
    if S[i-1] == "W" and S[i] == "W":
        now += 1
    if now < min:
        min = now
print(min)

### FIXED CODE ###

#https://qiita.com/minemine0505/items/9aeae0f651f19f2ac1e2
N = int(input())
S = input()
min = S[1:N].count("E") #最小値を保存しておく
now = S[1:N].count("E") #i-1 を見ているときのそっぽ向いてる子の数

for i in range (1,N):
    if S[i-1] == "E" and S[i] == "E":
        now -= 1
    if S[i-1] == "W" and S[i] == "W":
        now += 1
    if now < min:
        min = now
print(min)
year, month, day = map(int, input().split("/"))

if year<2019:
  print("Heisei")
elif year == 2019 && month<5:
  print(Heisei)
else:
  print("TBD")

### FIXED CODE ###

year, month, day = map(int, input().split("/"))

if year<2019:
  print("Heisei")
elif year == 2019 and month<5:
  print("Heisei")
else:
  print("TBD")
N = int(input())
B = list(map(int,input().split()))
A = []
A.append(B[0])
A.append(B[0])
for i in range(1, N - 2):
  if B[i] < A[i]:
    A[i] = B[i]
  A.append(B[i])

if N > 2:
  A.append(B[-1])
print(sum(A))

### FIXED CODE ###

print(int(input()) ** 3)
n = int(input())
l = [int(input()) _ for in range(n)]
l.sort()
c = 1
t = l[0]
for i in l[1:]:
  if t == i:
    c += 1
  else:
    ans += c%2
    c = 1
    t = i
print(ans)
  

### FIXED CODE ###

n = int(input())
l = [int(input()) for _ in range(n)]
l.sort()
c = 1
ans = 0
for i in range(1, n):
  if l[i-1] == l[i]:
    c += 1
  else:
    ans += c%2
    c = 1
if c != 1:
  ans += c%2
else:
  ans += 1
print(ans)
print('number of days of summer vacation: ')
N = int(input())
print('number of summer assignments: ')
M = int(input())

for i in range(M):
    Ai = int(input())
    N = N - Ai

if N >= 0:
    print(N)
else:
    N = -1
    print(N)

### FIXED CODE ###

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

ans = N - sum(A)

if ans < 0:
    print(-1)
else:
    print(ans)
import sys

def solve():
    input = sys.stdin.readline
    N = int(input())
    playlist = dict()
    time = [0] * (N + 1)
    for i in range(N):
        s, t = map(str, input().split())
        playlist[s] = i
        time[i + 1] = time[i] + int(t)
    print(time[N] - time[playlist[input()] + 1])


    return 0

if __name__ == "__main__":
    solve()

### FIXED CODE ###

import sys

def solve():
    N = int(input())
    playlist = dict()
    time = [0] * (N + 1)
    for i in range(N):
        s, t = map(str, input().split())
        playlist[s] = i
        time[i + 1] = time[i] + int(t)
    w = input()

    print(time[N] - time[playlist[w] + 1])


    return 0

if __name__ == "__main__":
    solve()
def gcd(a, b):
	if a < b:
		tmp = a
		a = b
		b = tmp
	
	r = a % b
	while r != 0:
		a = b
		b = r
		r = a % b

	return b

if __name__ == '__main__':
	l = list(map(int, input().split()))
	x = l[0]
	y = l[1]

	ans = gcd(x, y)
	print(ans)

### FIXED CODE ###

def gcd(a, b):
	if a < b:
		tmp = a
		a = b
		b = tmp
	
	r = a % b
	while r != 0:
		a = b
		b = r
		r = a % b

	return b

if __name__ == '__main__':
	l = list(map(int, input().split()))
	x = l[0]
	y = l[1]

	ans = gcd(x, y)
	print(ans)
N, A = map(int, input().split())
n = 0
def pick(list, num):
    4yu
for i in range(N):
    x = int(input().split())
    if x != A:
        L.append(int(input().split())-A)
    else:
        n += 1
L.sort()






### FIXED CODE ###

import math
N, x = map(int, input().split())
L = [int(x) for x in input().split()]
ans = 0
for i in range(1,N):
    if L[i-1] + L[i] > x:
        if L[i-1] > x:
            ans += L[i-1] - x
            ans += L[i]
            L[i] = 0
        else:
            ans += L[i] + L[i-1] - x
            L[i] = x - L[i-1]
print(ans)
n=int(input())
l=[2,1]
if n>2:
    for i in range(2,n+1):
        li=l[i-1]+l[i-2]
        l.append(li)
    print(l[n])
else:
    print(l[n])

### FIXED CODE ###

n=int(input())
l=[2,1]
if n>1:
    for i in range(2,n+1):
        li=l[i-1]+l[i-2]
        l.append(li)
    print(l[n])
else:
    print(l[n])
n = int(input())
nums = list(map(int, input().split()))

nums1 = nums[0::2]
nums2 = nums[1::2]

bug1 = [0] * 100000
bug2 = [0] * 100000

for num in nums1:
    bug1[num] += 1

for num in nums2:
    bug2[num] += 1

max_v_1 = max(bug1)
max_i_1 = bug1.index(max_v_1)
max_v_2 = max(bug2)
max_i_2 = bug2.index(max_v_2)

if max_i_1 == max_i_2:
    bug1[max_i_1] = 0
    bug2[max_i_2] = 0
    sec_max_v_1 = max(bug1)
    sec_max_v_2 = max(bug2)
    print(n - min(max_v_1, max_v_2) - max(sec_max_v_1, sec_max_v_2))
else:
    print(n - max_v_1 - max_v_2)

### FIXED CODE ###

n = int(input())
nums = list(map(int, input().split()))

nums1 = nums[0::2]
nums2 = nums[1::2]

bug1 = [0] * 1000000
bug2 = [0] * 1000000

for num in nums1:
    bug1[num] += 1

for num in nums2:
    bug2[num] += 1

max_v_1 = max(bug1)
max_i_1 = bug1.index(max_v_1)
max_v_2 = max(bug2)
max_i_2 = bug2.index(max_v_2)

if max_i_1 == max_i_2:
    bug1[max_i_1] = 0
    bug2[max_i_2] = 0
    sec_max_v_1 = max(bug1)
    sec_max_v_2 = max(bug2)
    print(n - min(max_v_1, max_v_2) - max(sec_max_v_1, sec_max_v_2))
else:
    print(n - max_v_1 - max_v_2)
n = int(input())
h = list(map(int,input().split()))
flag = 1
for i in range(1,n):
  if h[i] < h[i-1]:
    flag = 0
    break
  if h[i] > h[i-1]:
    h[i] -= 1
if flag == 1:
  print('Yes')
else:
  prinr('No')

### FIXED CODE ###

n = int(input())
h = list(map(int,input().split()))
h.append(0)
flag = 1
for i in range(n):
  if h[i] < h[i-1]:
    flag = 0
    break
  elif h[i] == h[i-1]:
    pass
  else:
    h[i] -= 1
if flag == 1:
  print('Yes')
else:
  print('No')
n=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
ans=A[0]
for i in range(n-1):
  ans+=B[A[i-1]]
  if A[i]+1==A[i+1]:
    ans+=C[i]
print(ans)


### FIXED CODE ###

n=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
ans=B[A[0]-1]
for i in range(1,n):
  ans+=B[A[i]-1]
  if A[i-1]+1==A[i]:
    ans+=C[A[i-1]-1]
print(ans)
s = input()
t = input()
count=0
for i in len(s):
  if s[i] == t[i]:
    count+=1
print(count)

### FIXED CODE ###

s = input()
t = input()
count=0
for (i,j) in zip(s,t):
  if i != j:
    count+=1
print(count)
from functools import reduce
from math import gcd
n,x =map(int,input().split())
if n==1:
    c = abs(int(input())-x)
    print(c)
else:
    lis = list(map(int,input().split()))
    for i in range(n):
        lis[i] = abs(lis[i]-x)
    print(reduce(gcd,lis))

### FIXED CODE ###

from functools import reduce
from fractions import gcd
N,X=map(int,input().split())
x=[abs(X-int(i)) for i in input().split()]
print(reduce(gcd,x))
MOD = 998244353


def solve(s, k):
    one_count = []
    ones = 0
    for st in s:
        if st == "1":
            ones += 1
        else:
            one_count.append(ones)
            ones = 0
    one_count.append(ones)
    s = sum(one_count)
    m = len(one_count)
    dp = [[[0] * s for _ in range(s)] for __ in range(m + 1)]
    dp[0][0][0] = 1
    for i in range(m):
        c = one_count[i]
        for j in range(s):
            for p in range(s):
                dp[i][j][p] %= MOD
                for q in range(s - max(j, p)):
                    dp[i + 1][j + q][p + q] += dp[i][j][p]
                for q in range(-c, 0):
                    if j + q >= 0:
                        dp[i + 1][j + q][p] += dp[i][j][p]

    # print(dp)
    res = sum([dp[m][0][p] for p in range(min(k + 1, s))])
    # print(res)
    return res % MOD


def main():
    s, k_ = input().split()
    k = int(k_)
    res = solve(s, k)
    print(res)


def test():
    assert solve("0101", 1) == 4
    assert solve("01100110", 2) == 14
    assert solve("1101010010101101110111100011011111011000111101110101010010101010101", 20) == 113434815


if __name__ == "__main__":
    test()
    main()


### FIXED CODE ###

MOD = 998244353


def solve(s, k):
    one_count = []
    ones = 0
    for st in s:
        if st == "1":
            ones += 1
        else:
            one_count.append(ones)
            ones = 0
    one_count.append(ones)
    ss = sum(one_count)
    # print(ss)
    m = len(one_count)
    dp = [[[0] * (ss + 1) for _ in range(ss + 1)] for __ in range(m + 1)]
    dp[0][0][0] = 1
    for i in range(m):
        c = one_count[i]
        for j in range(ss + 1):
            for p in range(ss + 1):
                dp[i][j][p] %= MOD
                for q in range(ss + 1 - max(j, p)):
                    dp[i + 1][j + q][p + q] += dp[i][j][p]
                for q in range(-c, 0):
                    if j + q >= 0:
                        dp[i + 1][j + q][p] += dp[i][j][p]

    # print(dp)
    res = sum([dp[m][0][p] for p in range(min(k + 1, ss + 1))])
    # print(res)
    return res % MOD


def main():
    s, k_ = input().split()
    k = int(k_)
    res = solve(s, k)
    print(res)


def test():
    assert solve("0101", 1) == 4
    assert solve("01100110", 2) == 14
    assert solve("1101010010101101110111100011011111011000111101110101010010101010101", 20) == 113434815


if __name__ == "__main__":
    test()
    main()
N=int(input())

a=[0]*10**4
count=0
for x in range(1,(N+1)):
     for y in range(1,(N+1)):
         for z in range(1,(N+1)):
             n=(x+y+z)**2-(x*y+y*z+z*x)
             a[n]+=1

for n in range(1+N+1):
    print(a[n])







### FIXED CODE ###

N=int(input())

a=[0]*10**4

for x in range(1,100):
     for y in range(1,100):
         for z in range(1,100):
             n=(x+y+z)**2-(x*y+y*z+z*x)
             if n<=10000:
                 a[n-1]+=1

for n in range(N):
    print(a[n])
n = int(input())
A = list(map(int, input().split()))
A.sort()
B = list(set(A))
if len(B) >= 4:
  print('No')
else:
  if B[-1] == 0:
    print('Yes')
  elif A.count(0) == n/3 and len(B) == 2:
    print('Yes')
  elif B[0]^B[1]^B[2] == 0 and A.count(B[0]) == A.count(B[1]) == n/3:
    print('Yes')
  else:
    print('No')

### FIXED CODE ###

n = int(input())
A = list(map(int, input().split()))
A.sort()
B = list(set(A))
if len(B) >= 4:
  print('No')
else:
  if B[-1] == 0:
    print('Yes')
  elif A.count(0) == n/3 and len(B) == 2:
    print('Yes')
  elif len(B) == 3 and B[0]^B[1]^B[2] == 0 and A.count(B[0]) == A.count(B[1]) == n/3:
    print('Yes')
  else:
    print('No')
import math


def prime_factorization(n):
    result = []

    N = n
    x = 2
    while x <= math.sqrt(N):
        if n % x == 0:
            result.append(x)
            n = n / x

        x += 1

    if n != 1:
       result.append(n)

    if result.count(result[-1]) > 1:
      result.pop(-1)
        
    return result


N = int(input())

result = prime_factorization(N)

print(len(result))



### FIXED CODE ###

import math
from collections import Counter



def prime_factorization(num):
    """
    素因数分解
    ;param num 素因数分解したい数字
    ;return result {素因数: 回数, ・・・}
    """

    result = dict()

    N = num

    x = 2
    while x <= int(math.sqrt(num)) + 1:
        if (num % x) == 0:
            count = 0
            while (num % x) == 0:
                count += 1
                num = num / x

            result[x] = count

        x += 1

    if num != 1:
        result[num] = 1

    if result == []:
        result[N] = 1

    return result


N = int(input())

# 素因数分解
result = prime_factorization(N)

# 操作の回数を求める
ans = 0
for value in result.values():
    c = 1
    while (value - c) >= 0:
        ans += 1
        value -= c
        c += 1

print(ans)