Harryxun/stf_run huggingface dataset:
from math import gcd
N = int(input())
As = list(map(int, input().split()))

lis = [0]*N
ans = 0
for k in range(N):
    g = 10**20
    for i in range(N-1):
        if i==k: continue
        for j in range(i+1, N):
            if j==k: continue
            g = min(gcd(As[i], As[j]), g)
    ans = max(ans, g)
if N==2:
    print(max(As))
else:
    print(ans)

### FIXED CODE ###

from fractions import gcd

N = int(input())
As = list(map(int, input().split()))
re_As = As[::-1]
gcds = [0]*(N)
rgcds = [0]*(N)
gcds[0] = 0
rgcds[0] = 0

for i in range(N-1):
    gcds[i+1] = gcd(As[i], gcds[i])
    rgcds[i+1] = gcd(re_As[i], rgcds[i])

rgcds = rgcds[::-1]

ans = [0]*(N+1)

for i, (s, r) in enumerate(zip(gcds, rgcds)):
    ans[i] = gcd(s, r)
    
print(max(ans))
def detectGroup(parents,x):
    if parents[x]!=x:
        return detectGroup(parents,parents[x])
    else:
        return x
    
N,M=map(int,input().split())
AB=[[int(x)-1 for x in input().split()] for i in range(M)][::-1]
parents=[i for i in range(N)]
groupsize=[1 for i in range(N)]
inconv=N*(N-1)/2
result = []
for i in range(M):
    result.append(str(int(inconv))+'\n')
    groupA=detectGroup(parents,AB[i][0])
    groupB=detectGroup(parents,AB[i][1])
    if groupA!=groupB:
        inconv-=groupsize[groupA]*groupsize[groupB]
        groupsize[groupA]+=groupsize[groupB]
    parents[AB[i][1]] = AB[i][0]
print("".join(result[::-1]))

### FIXED CODE ###

import sys
sys.setrecursionlimit(100000)

def detectGroup(parents,x):
    if parents[x]!=x:
        parents[x]=detectGroup(parents,parents[x])
        return parents[x]
    else:
        return x
    
N,M=map(int,input().split())
AB=[[int(x)-1 for x in input().split()] for i in range(M)][::-1]
parents=[i for i in range(N)]
groupsize=[1 for i in range(N)]
inconv=N*(N-1)/2
result = []
for i in range(M):
    result.append(str(int(inconv))+'\n')
    groupA=detectGroup(parents,AB[i][0])
    groupB=detectGroup(parents,AB[i][1])
    if groupA!=groupB:
        inconv-=groupsize[groupA]*groupsize[groupB]
        groupsize[groupA]+=groupsize[groupB]
    parents[groupB] = groupA
print("".join(result[::-1]))
import sys
import math

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n, m = map(int, readline().split())
a = list(map(int, readline().split()))

for i in range(n-1):
    a[i+1] = int(a[i] * a[i+1] / math.gcd(a[i], a[i+1]))

t = (a[n-1] // 2)
t = m // t
ans = math.ceil(t / 2)
print(ans)


### FIXED CODE ###

from fractions import gcd
from functools import reduce

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
N, M, *A = map(int, read().split())
 
# 「奇数倍」に帰着
A = [x >> 1 for x in A]
 

def merge(a, b):
    g = gcd(a, b)
    a //= g
    b //= g
    if a % 2 == 0:
        return 0
    if b % 2 == 0:
        return 0
    n = a * b * g
    if n > 10 ** 9:
        return 0
    return n


x = reduce(merge, A)

if x == 0:
    answer = 0
else:
    answer = (M//x) - (M//(x+x))
 
print(answer)
import sys

class Stack:
    def __init__(self, max):
        self.max = max  ##max???stack????????§??????
        self.stack = list(range(max)) 
        self.top = 0  ##???????????????????????????0

    def initialize(self):
        self.top = 0

    def isEmpty(self):
        return self.top == 0

    def isFull(self):
        return self.top >= self.max - 1

    def push(self, value):
        if self.isFull():
            raise IndexError('?????????????????????')
        else:
            self.top += 1
            self.stack[self.top] = value

    def pop(self):
        if self.isEmpty():
            raise IndexError('??¢??????????????????')
        else:
            self.top -= 1
            return self.stack[self.top + 1]


expr = input().split()
stack = Stack(50)

for i in expr:
    try:
        stack.push(int(i))
    except:
        b = stack.pop()
        a = stack.pop()
        if i == '*':
            stack.push(a * b)
        if i == '+':
            stack.push(a + b)
        if i == '-':
            stack.push(a - b)

print(stack.pop())
                

### FIXED CODE ###

x = input().split()
A = []
for i in x:
    try:
        A.append(int(i))
    except:
        b = A.pop()
        a = A.pop()
        if i == '+':
            A.append(a + b)
        if i == '-':
            A.append(a - b)
        if i == '*':
            A.append(a * b)
print(A.pop())
from decimal import *
a, b, c = map(int, input().split())
if decimal(a) + decimal(b) < decimal(c):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

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

a = line[0]
b = line[1]

if a == b:
    print(str(a) + ' == ' + str(b))
elif a > b:
    print(str(a) + ' > ' + str(b))
else:
    print(str(a) + ' < ' + str(b))


### FIXED CODE ###

l = map(int,input().split())
l = list(l)
a =l[0]
b =l[1]

if a < b:
    print('a < b')
elif a > b:
    print('a > b')
else:
    print('a == b')
n,m=map(int,input().split())
if n=m:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

n,m=map(int,input().split())
if n==m:
  print('Yes')
else:
  print('No')
from numba import jit
@jit(cache = True)
def resolve():
    from bisect import bisect_left
    n,k=map(int,input().split())
    a=sorted(list(map(int,input().split())))
    m=bisect_left(a,0)
    MOD=10**9+7
    if m==0 or m==n:
        ans=1
        for i in a[-k:]:
            ans=(ans*i)%MOD
    else:
        for i in range((m//2)*2,-2,-2):
            ans=0
            cal=1
            if k-i>n-m:
                break
            for j in a[:i]:
                cal=(cal*j)%MOD
            if k-i>0:
                for j in a[-(k-i):]:
                    cal=(cal*j)%MOD
            ans=max(ans,cal)
    print(ans)

if __name__ == '__main__':
    resolve()

### FIXED CODE ###

def resolve():
    from bisect import bisect_left
    n,k=map(int,input().split())
    a=sorted(list(map(int,input().split())))
    m=bisect_left(a,0)
    MOD=10**9+7
    ans=1
    if m==0 or (m==n and k%2==1):
        for i in a[-k:]:
            ans=(ans*i)%MOD
    elif m==n and k%2==0:
        for i in a[:k]:
            ans=(ans*i)%MOD
    else:
        ans=1
        l,r=0,-1
        lm=a[0]*a[1]
        rm=a[-1]*a[-2]
        for i in range(k//2):
            if lm>=rm:
                ans*=lm%MOD
                l+=2
                if l<=n-2:
                    lm=a[l]*a[l+1]
            else:
                ans*=rm%MOD
                r-=2
                if 1<=n+r:
                    rm=a[r]*a[r-1]
            ans%=MOD
        if k%2==1:
            ans*=a[r]
            ans%=MOD
    print(ans)

if __name__ == '__main__':
    resolve()
def cost( i,k,j ):
  return m[i][k] + m[k+1][j] + p[i][0] * p[k][1] * p[j][1]
 
n = input()
M = []
m = [ [ 0 for i in range(n) ] for j in range(n) ]
for i in xrange(n):
  M.append( map ( int , raw_input().split() ) )

for l in range( 2,n+1 ):
  for i in range( 0,n-l+1 ):
    j = i + l - 1
    m[i][j] = min( cost( i,k,j ) for k in range( i,j ) )
 
print m[0][n-1]

### FIXED CODE ###

def cost( i,k,j ):
  return m[i][k] + m[k+1][j] + M[i][0] * M[k][1] * M[j][1]
 
n = input()
M = []
m = [[ 0 for i in range(n) ] for j in range(n) ]
for i in range(n):
  M.append( map (int, raw_input().split() ) )
 
M_long = len(M)
for l in range( 2,M_long+1 ):
  for i in range( 0,M_long-l+1 ):
    j = i+l-1
    m[i][j] = min( cost( i,k,j ) for k in range( i,j ) )
 
print m[0][M_long-1]
N, Q = map(int, input().split())
S = input()

cc = []

for idx in range(len(S) - 1):
    if S[idx:idx + 2] == "AC":
        cc.append(1)
    else:
        cc.append(0)

for _ in range(Q):
    l, r = map(int, input().split())
    print(sum(cc[l - 1:r]) - cc[r - 1])


### FIXED CODE ###

N, Q = map(int, input().split())
S = input()

cc = []

acc = 0

for idx in range(N):
    if S[idx - 1:idx + 1] == "AC":
        acc = acc + 1
    cc.append(acc)

for i in range(Q):
    l, r = map(int, input().split())
    print(cc[r - 1] - cc[l - 1])
import bisect
N,M=(int(x) for x in input().split())
As=sorted([int(x) for x in input().split()])
BC=[]

result=0
for _ in range(M):
    BC.append([int(x) for x in input().split()])

BC=sorted(BC, key=lambda x: x[1],reverse=True)
now=0
for b,c in BC:
    if As[now+min(b-1,len(As)-1)]<=c:
        result+=c*b
        now+=b
    else:
        pos=bisect.bisect_left(As[now:],c)
        result+=c*pos
        now+=pos
        break
        
print(result+sum(As[now:]))


### FIXED CODE ###

import bisect
N,M=(int(x) for x in input().split())
As=sorted([int(x) for x in input().split()])
BC=[]

result=0
for _ in range(M):
    BC.append([int(x) for x in input().split()])

BC=sorted(BC, key=lambda x: x[1],reverse=True)
now=0
for b,c in BC:
    if now+b-1<=len(As)-1:
        if As[now+b-1]<=c:
            result+=c*b
            now+=b
        else:
            pos=bisect.bisect_left(As[now:],c)
            result+=c*pos
            now+=pos
            break
    else:
        if As[-1]<=c:
            result+=c*(N-now)
            As=[]
        else:
            pos=bisect.bisect_left(As[now:],c)
            result+=c*pos
            now+=pos
        break
        
print(result+sum(As[now:]))
N = int(input())

my_list = []

for i in range(N):
    sp = input().split()
    sp[1] = int(sp[1])
    sp.insert(0, i+1)
    
    my_list.append(sp)
    
my_list.sort(key = lambda x: x[2], reverse=True)
my_list.sort(key = lambda x: x[1])

for i in my_list:
    print(i[0])

### FIXED CODE ###

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

P = P + A*3

apple_pie = 0

while  P>1:
    
    apple_pie = apple_pie + 1
    P = P - 2
    
print(apple_pie)
kinmu = 0
niti = 0
p = 0
for i in range(N):
  if S[i] == "o" and tyousa[i] == p:
    kinmu = 0
    niti = 0
    route.clear()
    while kinmu < K and niti < N:
      if S[niti] == "o" and niti != i:
        route.append(niti)
        kinmu += 1
        niti += C
      niti += 1
    if niti >= N and kinmu < K:
      print(i + 1)
    if kinmu >= K:
      for i2 in route:
        tyousa[i2] += 1
      p += 1

### FIXED CODE ###

N,K,C =map(int,input().rstrip().split(" "))
S = input()
kinmu = 0
niti = 0
f = []
b = []
kinmu = 0
niti = 0
while kinmu < K and niti < N:
  if S[niti] == "o":
    f.append(niti)
    kinmu += 1
    niti += C
  niti += 1
kinmu = 0
niti = N -1
while kinmu < K and niti >= 0:
  if S[niti] == "o":
    b.append(niti)
    kinmu += 1
    niti -= C
  niti -= 1
b.reverse()
for i in range(K):
  if f[i] == b[i]:
    print(f[i] + 1)
n,k = map(int, input())

ans = 0
for i in range(n):
    if i == 0:
        ans = k
    else:
        ans = ans * (k-1)
        
print(ans)

### FIXED CODE ###

n,k = map(int, input().split())

ans = 0
for i in range(n):
    if i == 0:
        ans = k
    else:
        ans = ans * (k-1)
        
print(ans)
n = int(input())
values = np.array(list(map(int, input().split())))

kabu = 0
money = 1000
for i in range(n-1):
    if values[i] < values[i+1]:
        kabu = money // values[i] 
        money += (values[i+1] - values[i]) * kabu
        
    else:
        continue
        
print(money)

### FIXED CODE ###

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

kabu = 0
money = 1000
for i in range(n-1):
    if values[i] < values[i+1]:
        kabu = money // values[i] 
        money += (values[i+1] - values[i]) * kabu
        
print(money)
from collections import*
from heapq import*
def dijkstra(s):
  d=[inf]*n
  used=[True]*n
  d[s]=0
  used[s]=False
  edgelist=[]
  for e in edge[s]:
    heappush(edgelist,e)
  while len(edgelist):
    minedge=heappop(edgelist)
    if not used[minedge[1]]:
      continue
    v=minedge[1]
    d[v]=minedge[0]
    used[v]=False
    for e in edge[v]:
      if used[e[1]]:
        heappush(edgelist,(e[0]+d[v],e[1]))
  return d
inf=10**18
n,m,*t=map(int,open(0).read().split())
e=defaultdict(list)
s=[]
l=[]
f=False
for a,b,c in zip(t[::3],t[1::3],t[2::3]):
  if b<a:a,b=b,a
  if a<2 or b<2:f=True
  x,y=a+-~n*c,b+-~n*c
  if b==n:l.append(y)
  e[a].append((1,x))
  e[b].append((1,y))
  e[y].append((0,b))
  e[x].append((0,y))
  s.extend([a,b,x,y])
if not f:
  print(-1)
  exit()
d={i:v for v,i in enumerate(sorted(set(s)))}
n=len(d)
edge=tuple([]for _ in range(n))
for i in e:
  edge[d[i]].extend([(c,d[j])for c,j in e[i]])
a=dijkstra(0)
a=min(a[d[i]]for i in l)
print([a,-1][a==inf])

### FIXED CODE ###

def main():
  from heapq import heappush,heappop,heapify
  inf=2**31-1
  n,m,*t=map(int,open(0).read().split())
  z=[]
  for a,b,c in zip(t[::3],t[1::3],t[2::3]):
    z.extend([a,b,a+n*c,b+n*c])
  z={i:v for v,i in enumerate(sorted(set(z)))}
  try:
    z[1]
  except:
    print(-1)
    exit()
  edge=[[]for _ in range(len(z))]
  d={}
  l=[]
  for a,b,c in zip(t[::3],t[1::3],t[2::3]):
    if b<a:a,b=b,a
    i,j,x,y=z[a],z[b],z[a+n*c],z[b+n*c]
    if b==n:
      l.append(y)
    edge[i].append((1,x))
    edge[j].append((1,y))
    edge[x].extend([(0,i),(0,y)])
    edge[y].extend([(0,j),(0,x)])
  used=[False]+[True]*~-len(z)
  d=[0]+[inf]*~-len(z)
  edgelist=edge[0]
  heapify(edgelist)
  while edgelist:
    m=heappop(edgelist)
    if not used[m[1]]:
      continue
    d[m[1]]=m[0]
    used[m[1]]=False
    for e in edge[m[1]]:
      if used[e[1]]:
        heappush(edgelist,(e[0]+m[0],e[1]))
  a=min([d[i]for i in l]or[inf])
  print([a,-1][a==inf])
if __name__=='__main__':
  main()
N, T = map(int, input().split())
li = []
try:
  li = [list(map(int, input().split())) for i in range(N)]
except EOFError:
  pass

li2 = [] 

for s in li:
  if s[0:] <= T:
    li2 = li2.append(s)
    for t in li2:
      minli = min(li2[:1])
      print(minli)
      
  else:
    print("TLE")

### FIXED CODE ###

n,T = map(int,input().split())
mn = 1001
for i in range(n):
    c,t = map(int,input().split())
    if t <= T:
        mn = min(mn,c)

if mn == 1001:
    print("TLE")
else :
    print(mn)
from itertools import product, groupby
from statistics import median
from time import time
from sys import exit
import numpy as np

N = int(input())

line = ([(index, v) for index, v in enumerate(input())])


def types(line): return line[1]
def index(line): return line[0]


gp = groupby(sorted(line, key=types), types)

d = {}

for k, v in gp:
    indexes = np.array([i for i, value in v])
    d[k] = indexes


delete = 0

for differ in range(1, N):
    for start in range(N):
        if start + differ*2 > N - 1:
            break
        i = line[start]
        j = line[start + differ]
        k = line[start + differ*2]

        if len({i[1], j[1], k[1]}) == 3:
            upper = max(i[0], j[0], k[0])
            lower = min(i[0], j[0], k[0])
            median_num = median([i[0], j[0], k[0]])
            if upper - median_num == median_num - lower:
                delete += 1

print(d['R'].size * d['G'].size * d['B'].size - delete)


### FIXED CODE ###

from itertools import groupby
from statistics import median
from sys import exit

N = int(input())

line = ([(index, v) for index, v in enumerate(input())])


def types(line): return line[1]
def index(line): return line[0]


gp = groupby(sorted(line, key=types), types)

d = {}

for k, v in gp:
    indexes = set([i for i, value in v])
    d[k] = indexes

if 'R' not in d or 'G' not in d or 'B' not in d:
    print(0)
    exit()

delete = 0


for differ in range(1, N):
    for start in range(N):
        if start + differ*2 > N - 1:
            break

        i = line[start]
        j = line[start + differ]
        k = line[start + differ*2]

        if len({i[1], j[1], k[1]}) != 3:
            continue

        upper = max(i[0], j[0], k[0])
        lower = min(i[0], j[0], k[0])
        median_num = median([i[0], j[0], k[0]])
        if upper - median_num == median_num - lower:
            delete += 1

print(len(d['R']) * len(d['G']) * len(d['B']) - delete)
n=int(input())
h=list(map(int,input()))
ans=1
for i in range(1,n):
  if max(h[:i])<h[i]:
    ans+=1
print(ans)

### FIXED CODE ###

n=int(input())
h=list(map(int,input().split()))
ans=1
for i in range(1,n):
  if max(h[:i])<=h[i]:
    ans+=1
print(ans)
Source Code 

Copy
Copy
X=int(input())
for i in range(2,X):
  if(X%i==0):
    X+=1
    break
  else :
  	print(X)

### FIXED CODE ###

def isPrime(x):
  if x < 2:
    return False
  for i in range(2,x):
    if x%i == 0:
      return False
  return True

num = int(input())

for i in range(num,100004):
  if isPrime(i):
    print(i)
    break
import math

n = int(input())
s = int(input())

if n == 1:
    if s == 1:
        print(2)
    else:
        print(-1)
    exit()

if n == s:
    print(n + 1)
    exit()

if n < s:
    print(-1)
    exit()


def ds(N, b):
    ret = 0
    while True:
        N, mod = divmod(N, b)
        ret += mod
        if N == 0:
            return ret


for i in range(2, math.floor(n**(1/2)) + 1):
    if ds(n, i) == s:
        print(i)
        exit()

c = n // (i + 1)
for i in range(c, 0, -1):
    if (n-s) % i == 0:
        b = (n-s)//i + 1
        if i < b and 0 <= s-i < b:
            print(b)
            exit()

print(-1)


### FIXED CODE ###

import math

n = int(input())
s = int(input())

if n == 1:
    if s == 1:
        print(2)
    else:
        print(-1)
    exit()

if n == s:
    print(n + 1)
    exit()

if n < s:
    print(-1)
    exit()


def ds(N, b):
    ret = 0
    while True:
        N, mod = divmod(N, b)
        ret += mod
        if N == 0:
            return ret


i = 0
for i in range(2, math.floor(n**(1/2)) + 1):
    if ds(n, i) == s:
        print(i)
        exit()

if i == 0:
    i = math.floor(n**(1/2))
c = n // (i + 1)
for i in range(c, 0, -1):
    if (n-s) % i == 0:
        b = (n-s)//i + 1
        if i < b and 0 <= s-i < b:
            print(b)
            exit()

print(-1)
N = int(input())

result = [input() for _ in range(N)]

C_AC,C_TLE,C_WA,C_RE = [0,0,0,0]

for i in result:
  if i == "AC":
    C_AC += 1
  elif i == "WA":
    C_WA += 1
  elif i == "TLE":
    C_TLE += 1
  elif i == "RE":
    C_RE += 1

print("AC x " + str(C_AC))
print("WA x " + str(C_WA))
print("TLE x " + str(C_TLE))
print("RE x " + str(C_RE))

### FIXED CODE ###

N = input()
Num = int(N)

while Num > 0:
    OTURI = 1000 - Num
    Num -= 1000
  
print(OTURI)
def resolve():
    X, N = map(int, input().split())
    P = []
    for i in range(N):
        p = int(input())
        P.append(p)
    plus = 1
    while True:
        if X in P:
            if plus%2 == 1:
                X -= plus
            else:
                X += plus
        else:
            print(X)
            exit()
        plus += 1
resolve()

### FIXED CODE ###

def resolve():
    X, N = map(int, input().split())
    if N != 0:
        P = list(map(int, input().split()))
        S = []
        for _ in range(0, 102):
            if _ in P:
                continue
            else:
                S.append(_)
        if X in S:
            print(X)
        else:
            for i in range(1, 102):
                if X-i in S:
                    print(X-i)
                    exit()
                elif X+i in S:
                    print(X+i)
                    exit()
    else:
        print(X)
resolve()
n=int(input())
dat = list(map(int, input().split()))

for e in dat:
    e = str(bin(e))

for e in dat:
    e = e.rfind('1')

#print(min(dat)-1)



### FIXED CODE ###

import sys

def main():
    N = int(input())
    A = [int(_) for _ in input().split()]

    t = 0
    while True:
        for i in range(N):
            if A[i] % 2 == 0:
                A[i] //= 2
            else:
                print(t)
                sys.exit()
        t += 1

main()
print(1 if int(input().split()[2])==1 else 0)

### FIXED CODE ###

input()
print(1 if int(input().split()[1])==1 else 0)
N=int(input())
K=int(input())
import math
x=math.floor(math.log10(N))+1
def combinations_count(n, r):
  return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
ans=0
if x<K:
  print(0)
  exit(0)
if K==1:
  ans=(x-1)*9
  ans+=(N//10**(x-1))
  print(ans)
elif K==2:
  for i in range(2,x):
    ans+=(9**2)*(i-1)
  f=(N//10**(x-1))
  n=str(N)
  for i in range(1,x):
    if n[i]!='0':
      s_n=x-i
      s=int(n[i])
      break
  ans+=(f-1)*9*(x-1)
  ans+=9*(s_n-1)
  ans+=s
  print(ans)
else:
  for i in range(3,x):
    ans+=(9**3)*combinations_count(i-1,2)
  f=(N//10**(x-1))
  n=str(N)
  s_n=0
  s=0
  t_n=0
  t=0
  for i in range(1,x):
    if n[i]!='0':
      s_n=x-i
      s=int(n[i])
      break
  for i in range(x-s_n+1,x):
    if n[i]!='0':
      t_n=x-i
      t=int(n[i])
      break
  if s_n<2:
    ans+=(f-1)*9**2*combinations_count(x-1,2)
    if s>0:
      ans+=(s-1)*9*(s_n-1)
    if t_n!=0:
      ans+=9*(t_n-1)
    ans+=t
  else:
    ans+=(f-1)*9**2*combinations_count(x-1,2)
    ans+=9**2*combinations_count(s_n-1,2)
    ans+=(s-1)*9*(s_n-1)
    if t_n!=0:
	    ans+=9*(t_n-1)
    ans+=t
  print(ans)

### FIXED CODE ###

Nstr=input()
N=int(Nstr)
K=int(input())
x=len(Nstr)
dp0=[[0]*(K+1) for i in range(x+1)]
dp1=[[0]*(K+1) for i in range(x+1)]

dp1[0][0]=1

for i in range(1,x+1):
  dp0[i][0]=dp0[i-1][0]+dp1[i-1][0]
  for j in range(1,K+1):
    if Nstr[i-1]!='0':
      dp1[i][j]=dp1[i-1][j-1]
      dp0[i][j]+=(dp1[i-1][j-1]*(int(Nstr[i-1])-1)+dp1[i-1][j])
    else:
      dp1[i][j]=dp1[i-1][j]
    dp0[i][j]+=(dp0[i-1][j]+dp0[i-1][j-1]*9)

    
  '''  
  if Nstr[i-1]!='0':
    for j in range(1,K+1):
      dp1[i][j]=dp1[i-1][j-1]
      dp0[i][j]+=(dp1[i-1][j-1]*(int(Nstr[i-1])-1)+dp1[i-1][j])
  else:
    for j in range(1,K+1):
      dp1[i][j]=dp1[i-1][j]
  for j in range(1,K+1):
    dp0[i][j]+=(dp0[i-1][j]+dp0[i-1][j-1]*9)
  '''
print(dp0[x][K]+dp1[x][K])
def main():
    a,b = input().split()
    a = int(a)
    b_n = b[0]
    b_ = b[2:]
    ans = a*int(b_n)
    c = str(int(b_)*a)[:-2]
    print(ans+int(c))

if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    a,b = input().split()
    b = b[0] + b[2:]
    print(int(a)*int(b)//100)

if __name__ == "__main__":
    main()
a,b=map(int,input().split())
import math
print(math.gcd(a,b))


### FIXED CODE ###

import fractions
a,b=map(int,input().split())
g=fractions.gcd(a,b)
print(a*b//g)
from collections import defaultdict


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

g = [[] for _ in range(n + 1)]
for _ in range(m):
    l, r, d = map(int, input().split())
    g[l].append((r, d))
    g[r].append((l, -d))


ds = [None for _ in range(n + 1)]


def check(v):
    for next_v, d in g[v]:
        if ds[next_v] is None:
            ds[next_v] = ds[v] + d
            if check(next_v) is False:
                return False
        elif not (ds[next_v] - ds[v] == d):
            return False
    return True


valid = True
for v in range(1, n + 1):
    if ds[v] is None:
        ds[v] = 0
    if check(v):
        valid = False
        break

if valid:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

import sys

sys.setrecursionlimit(200002)

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

g = [[] for _ in range(n)]
for _ in range(m):
    l, r, d = map(int, input().split())
    l -= 1
    r -= 1
    g[l].append((r, d))
    g[r].append((l, -d))


ds = [None for _ in range(n + 1)]


def check(v):
    for next_v, d in g[v]:
        if ds[next_v] is None:
            ds[next_v] = ds[v] + d
            if check(next_v) is False:
                return False
        elif not (ds[next_v] - ds[v] == d):
            return False
    return True


valid = True
for v in range(n):
    if ds[v] is None:
        ds[v] = 0
    if check(v) is False:
        valid = False
        break

if valid:
    print("Yes")
else:
    print("No")
a = input()
b = input()

A = int(a)
B = int(b)

val = A * B

print(val)


### FIXED CODE ###

nums = input().split()

A = int(nums[0])
B = int(nums[1])

val = A * B

print(val)