Problem:


Score : 100 points

Problem Statement

Takahashi has K 500-yen coins. (Yen is the currency of Japan.)
If these coins add up to X yen or more, print Yes; otherwise, print No.

Constraints

1 \leq K \leq 100

1 \leq X \leq 10^5

Input

Input is given from Standard Input in the following format:

K X

Output

If the coins add up to X yen or more, print Yes; otherwise, print No.

Sample Input 1

2 900

Sample Output 1

Yes

Two 500-yen coins add up to 1000 yen, which is not less than X = 900 yen.

Sample Input 2

1 501

Sample Output 2

No

One 500-yen coin is worth 500 yen, which is less than X = 501 yen.

Sample Input 3

4 2000

Sample Output 3

Yes

Four 500-yen coins add up to 2000 yen, which is not less than X = 2000 yen.



Sample input:
2 900


Sample output:
Yes

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
cnt = 0
flag = 0
for i in range(n):
  if s[i] == "A":
    flag = 1
  elif s[i] == "B" and flag == 1:
    flag = 2
  elif s[i] == "C" and flag == 2:
    cnt += 1
    flag = 0
  else:
    flag = 0
print(cnt)

Submission status: Runtime Error

Solution code:
import fractions
from functools import reduce

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)
    
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


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

#if gcd(*A) % 2 != 0:
    #print(0)
    #exit(0)

#sisu_2 = factorization(A[0])[0][1] 
sisu_2 = min([factorization(A[i])[0][1] for i in range(min(1000,N))])

#lcm_a = lcm(*A)
#lcm_a_half = lcm_a // 2
lcm_a = lcm(*A) // 2
'''
l = []
sisu_a0 = 0
for i in range(N):
    sisu = 0
    while A[i]%2==0:
        A[i] //= 2
        sisu += 1
    
    if sisu_a0==0:
        sisu_a0 = sisu
    else:
        if sisu_a0!=sisu:
            print(0)
            exit()
'''
if (lcm_a % (2**sisu_2) == 0) or lcm_a > M:
#factorization(lcm_a)[0][1] != sisu_2 or lcm_a_half > M:
#if lcm_a > M:
    print(0)
    exit(0)
else:
    print(int((M-lcm_a) // (lcm_a*2) + 1))

Submission status: Runtime Error

Solution code:
n = input()
print(input().count("ABC"))

Submission status: Runtime Error

Solution code:
k, x = map(int, input().split())
if 500*k >= X:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
x,k = map(int,input().split())

if 500*x >= k:
  print('YES')
  
  else:
    print('NO')

Submission status: Runtime Error

Solution code:
k,x = list(map(int, input().split()))
print("Yes" if 500*k - x >= 0 "No")

Submission status: Runtime Error

Solution code:
n,m=map(int,input().split())
if if n*500>=m:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
K X = map(int,input().split())
if 500*K<X:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
k = int(input()) # 500円玉の枚数
x = int(input()) # 総額

if (k*500 >= x):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
k,n=map(int,input())
if k*500>=n:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
r, g, b = map(int, input().split())
ans=100*r+10*g+b
if ans*4==0:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
K=int(input())
X=int(input())

if 500*K < X:
	print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
if 500*K < X:
	print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
if 500*K < X :
	print("No")
else :
  print("Yes")

Submission status: Runtime Error

Solution code:
if 500*K < X :
	print("Yes")
else :
  print("No")

Submission status: Runtime Error

Solution code:
if 500*K < X 
	print("Yes")
else print("No")

Submission status: Runtime Error

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time,os
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

# In[]:
debug = os.getcwd()[0] == "C"
debug

# In[]:
if DEBUG:
    K,X = 2,900
else:
    K,X = inpl()

# In[]:
if K*500 >= X:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a,b = list(map(int, input().split()))
if a*500>=b:
  print("Yes)
else:
  print("No")

Submission status: Runtime Error

Solution code:
k, x = map(int, input().sprit())
if k*500>=x:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
from math import gcd
n,m = [int(j) for j in input().split()]
A = [int(j)//2 for j in input().split()]
s = A[0]
for i in A[1:]:
    s = int(s*i/gcd(i,s))
a = m//s
if a%2==0:
    print(int(a//2)) 
else:
    print(int(a//2)+1)

Submission status: Runtime Error

Solution code:
import fractions
import functools
import math
N, M = map(int, input().split())
A = [int(x)//2 for x in input().split()]
#------------------------------------------------
#リスト内の最小公倍数
def lcm(a, b):
    return a * b // fractions.gcd(a, b)
all_lcm = functools.reduce(lcm, A)  
#------------------------------------------------
# Aの最小値が2で割り切れる回数
cnt = 0
min_a = min(A)
while True:
    if min_a % 2 != 0:
        break
    min_a //= 2
    cnt += 1
# Aのすべての数が2でcnt回割り切れる
cond1 = all({i % (2**cnt) == 0 for i in A})
# cnt回割った後、さらに2で割り切れる数は存在しない
cond2 = all({(i // (2**cnt)) % 2 != 0 for i in A})

if cond1 and cond2:
    print(math.ceil(M/all_lcm/2))
else:
    print(0)

Submission status: Runtime Error

Solution code:
n, m = map(int,input().split())
l = list(map(int,input().split()))
 
import math
 
def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x%y)
def lcm(x, y):
    return x * y / gcd(x, y)
 
ans = 1
tf = True
 
for i in l:
    i /= 2
    ans = lcm(ans, i)
    if (ans / i) % 2 == 0 or ans > m:
        print(0)
        tf = False
        break
 
if tf == True:
    print(math.ceil(m / (ans * 2)))

Submission status: Runtime Error

Solution code:
n, m = map(int,input().split())
l = list(map(int,input().split()))

import math

def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x%y)
def lcm(x, y):
    return x * y / gcd(x, y)

ans = 1
tf = True

for i in l:
    i /= 2
    ans = lcm(ans, i)
    if (ans / i) % 2 == 0:
        print(0)
        tf = False
        break
    if ans > m:
        print(0)
        tf = False
        break

if tf == True:
    print(math.ceil(m / (ans * 2)))

Submission status: Runtime Error

Solution code:
k, n = [int(x) for x input().split()]

if k*500 >= n:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
# 大きさnの順列をすべて生成する
from itertools import permutations
def generate_permutations(n):
    perms = permutations(range(1, n+1), n)
    return [perm for perm in perms]

n = int(input())
ptuple = tuple(map(int, input().split()))
qtuple = tuple(map(int, input().split()))

perms = generate_permutations(n)
a = perms.index(ptuple)
b = perms.index(qtuple)
print(int(math.fabs(a - b)))

Submission status: Runtime Error

Solution code:
k,  x = list(map(int, input().split()))
if 500 * k < x:
    print(“No”)
else:
    print(“Yes”)

Submission status: Runtime Error

Solution code:
k = int(input())
x = int(input())

if k*500 >= x:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
k = int(input())
x = int(input())

if k*500 > x:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
k, x = input().split()
if x % 500 == 0 and k * 500 <= x:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

a_30 = [0]*30
b_30 = [0]*30
n_1 = 0
for i in range(n):
    n_i += 1 << i
    for j in range(30):
        a_30[j] +=  (a[i] & 2**j) >> j << i
        b_30[j] +=  (b[i] & 2**j) >> j << i



for k in range(n):
    x = 0
    check=True
    for j in range(30):
        a_temp  = a_30[j]
        a_30[j] = (a_temp >> 1) + ((a_temp & 1) << (n-1))
        if( (a_temp ^ b_30[j]) == n_1 ):
            x += (1 << j)
        elif( a_temp ^ b_30[j] != 0 ):
            check=False
    if(check):
        print('{} {}'.format(k, x))

Submission status: Runtime Error

Solution code:
import sys
import numpy as np
readline = sys.stdin.readline
write = sys.stdout.write

def main():
  N = int(readline())
  a = np.array(list(map(int, readline().split())))
  b = np.array(list(map(int, readline().split())))
  NA = np.arange(N)

  #for k in range(N):
  #  pass
    #r = np.bitwise_xor(a[(NA+k)%N], b)
    #if np.all(r == r[0]):
    #  pass
    #  #print(k, r[0])

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import sys
readline = sys.stdin.readline

def main():
  N = int(readline())
  a = list(map(int, readline().split()))
  b = list(map(int, readline().split()))
  buf = []
  
  for k in range(N):
    c = []
    last = None
    for i in range(N):
      r = c.append(a[(i+k)%N] ^ b[i])
      if last != r:
      	break
      last = r
    else:
      buf.append((k, c[0]))
  for d in buf:
    print(d[0], d[1])

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
n=int(input())
c=list(map(int,input().split()))
c.sort(reverse=True)
res=0
ans=0
mod=10**9+7
p=pow(2,n*2-2,mod)
for i in range(n):
   ans+=(c[i]*(i+2)%mod)*p
prit(ans%mod)

Submission status: Runtime Error

Solution code:
k,x = input()

text = "No"

if k*500>=x:
  text = "Yes"
  
print(text)

Submission status: Runtime Error

Solution code:
K, X = map(int(input().split())

if 500*K >= X:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
K,X =int(input()),int(input())
if K*500>=X:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a=int(input())
b=input()

count=0
for i in range(a-2):
  if b[i]=='A'and b[i+1]=='B' and b[i+2]=='C':
    count+=1
print(count)

Submission status: Runtime Error

Solution code:
k ,x = map(int,input().split)

if k*500 >= x:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
import math
import functools
import fractions

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

sums = 0
flag = True


for a in A:
  if a%2!=0:
    print(0)
    exit(0)

#gcd
g = functools.reduce(lambda x,y:x*y//fractions.gcd(x,y),A,1)

#first one
for m in range(M):
  for a in A:
    if (m+a//2)%a != 0:
      flag = False
      break 
  
  if flag==True:
    first = m
    break
  else:
    if m==M-1:
      print(0)
      exit(0)
    flag = True


print(((M-first))//g +1)

Submission status: Runtime Error

Solution code:
import numpy as np 
import sys

def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a

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

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

A = np.array(a)

##while np.sum(A%2) == 0:
  ##  A = A//2

if np.sum(A%2) != len(A):
    print("0")
    sys.exit()
    
tmp = 1##LCM

for i in range(N):
    tmp = lcm(tmp,a[i]//2)

if tmp > M:
    print("0")

else:
    print((M//tmp+1)//2)

Submission status: Runtime Error

Solution code:
import fractions
from functools import reduce

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
	n = len(numbers)
	#print(numbers)
    #lcm_tmp = (numbers[0] * numbers[1]) // fractions.gcd(numbers[0], numbers[1])
	lcm_tmp = lcm_base(numbers[0],numbers[1])
	for i in range(2,n):
		lcm_tmp = lcm_base(numbers[i],lcm_tmp)
	return lcm_tmp

n,m = map(int,input().split())
t = list(map(int,input().split()))
#print(t)
#lcm = (a * b) // fractions.gcd(a, b)
lcm = lcm_list(t)
x = m // (lcm /2 )
y = m // (lcm)
print(int(x-y))

Submission status: Runtime Error

Solution code:
import itertools
 
N=int(input())
P=list(map(int,input().split()))
Q=list(map(int,input().split()))
nlis=[i for i in range(1,N+1)]
 
j=list(itertools.permutations(nlis))
cp=j.index(P)+1
cq=j.index(Q)+1
print(abs(cp-cq))

Submission status: Runtime Error

Solution code:
from sys import stdin
from fractions import gcd
from math import ceil
#stdin = open("input.txt")

from functools import reduce    # need this line if you're using Python3.x

def lcm(a, b):
    if a > b:
        greater = a
    else:
        greater = b

    while True:
        if greater % a == 0 and greater % b == 0:
            lcm = greater
            break
        greater += 1

    return lcm

def get_lcm_for(your_list):
    return reduce(lambda x, y: lcm(x, y), your_list)


if __name__ == "__main__":
  N, M = [int(i) for i in stdin.readline().split()]
  A = [int(i) for i in stdin.readline().split()]
  B = [a//2 for a in A]
  
  Blcm = get_lcm_for(B)
  
  
  if Blcm % 2 == 0:
    res = 0
  else:
    res = ceil(M/Blcm/2)
  
  print(res)

Submission status: Runtime Error

Solution code:

#coding:utf-8

from functools import reduce
import fractions

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

def devide_cnt(num):
    cnt = 0
    while num % 2 == 0:
        cnt += 1
        num //= 2
    return cnt, num

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


def main():
    odd_nums = []
    cnt = -1
    for num in nums:
        tmp, num = devide_cnt(num)
        if cnt == -1:
            cnt = tmp
        if cnt != tmp:
            print(0)
            return
        odd_nums.append(num)
        
    minv = 2 ** cnt * lcm_list(odd_nums)

    
    l = 1
    r = 10000000001
    tmp = -1
    while l < r + 1:
        m = l + (r - l) // 2
        p = m * minv + 0.5 * minv
        if p > x:
            r = m
        else:
            l = m
        
        if tmp == p:
            break
        tmp = p
        
            
    print(l+1)
    
    
    

main()

Submission status: Runtime Error

Solution code:
def lcm (a,b):
	if a<b:
		t=a
		a=b
		b=t
	x=a*b
	r=a%b
	while r!=0:
		a=b
		b=r
		r=a%b
	return x/b

[n, m]=[int(x) for x in input().split()]
a=[int(x) for x in input().split()]
i=0
a_lcm=a[0]
for i in range(n-1):
	a_lcm = lcm(a_lcm,a[i+1])

print(int(((m*2/a_lcm)+1)/2))

Submission status: Runtime Error

Solution code:
n,m=map(int,input().split())
lists=list(map(int,input().split()))
uselist=[]
for some in lists:
    some=some//2
    uselist.append(some)

import fractions
import math
ans = uselist[0]
for i in range(1, n):
    ans = ans* uselist[i] // fractions.gcd(ans, uselist[i])

flags=True
for some in uselist:
    a=ans//some
    if a%2==0:
        flags=False
        break
if flags:
    p=math.floor(m/ans)
    if p%2==0:
      print(p//2)
    elif p%2!=0:
      print(p//2+1)
    
else:
    print(0)

Submission status: Runtime Error

Solution code:
N = int(input())
C = list(map(int, input().split()))

C.sort()

ans = 0

mod = 10 ** 9 + 7

pattern = (2 ** (N - 2)) % mod

if N != 1:
    for i in range(N):
        c = C[i]
        ans += c * (N + 1 - i) * pattern
        ans %= mod
    ans *= 2 ** N
else:
    ans = C[0] * 2

ans %= mod

print(ans)

Submission status: Runtime Error

Solution code:
t1 = [int(i) for i in input().split()]
total = list1[0]*500
 
if total > list1[1]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
import itertools

N=int(input())
P=list(map(int, input().split()))
Q=list(map(int, input().split()))
A=list(range(1,N+1))

Pattern=[]
for i in itertools.permutations(A):
    Pattern.append(i)

c1=Pattern.index(P) + 1
c2=Pattern.index(Q) + 1

print(abs(c1-c2))

Submission status: Runtime Error

Solution code:
n,m=map(int,input().split())
a=list(map(int,input().split()))
import fractions
lmc=a[0]
for i in range(1,n):
    lmc=lmc*a[i]//fractions.gcd(lmc,a[i])
    if lmc>m:
        print("0")
        exit()
if i in range(n):
   if (lmc//a[i])%2==0:
      print("0")
      exit()
if (m%lmc)<lmc//2:
    print((m//lmc))
else:
    print((m//lmc)+1)

Submission status: Runtime Error

Solution code:
import itertools

N=int(input())
P=list(map(int, input().split()))
Q=list(map(int, input().split()))

Pattern=[]
for i in range(1,N+1):
    Pattern.append(i)

c1=Pattern.index(P) + 1
c2=Pattern.index(Q) + 1

print(abs(c1-c2))

Submission status: Runtime Error

Solution code:
n, m = map(int, input().split())
a = list(map(int, input().split()))

a.sort(reverse=True)
ans = [i for i in range(max(a)//2,(m + 1)//2)]

for j in a:
    if a % 2 == 1:
        break
    n_ans = []
    for i in ans:
        if ((i / j - 0.5) % 1 == 0):
            n_ans.append(i)
    ans = n_ans[:]

print(len(ans))

Submission status: Runtime Error

Solution code:
import sys

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

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

GCD = 1
t = a[0]
cond = 0
while t%2 == 0:
	t //= 2
	cond += 1
	
mod = 2**cond
for i in range(len(a)):
	t,tt = divmod(a[i], mod)
	if t == 0 or tt != 0:
		print(0)
		sys.exit()
	if t % 2 == 1:
		print(0)
		sys.exit()

	GCD = GCD*a[i] // gcd(GCD,a[i])
	
A = (2*m) // GCD
if A%2 == 1:
	A+=1

print(A//2)

Submission status: Runtime Error

Solution code:
N = int(input()) 
P = tuple(map(int, input().split()))
Q = tuple(map(int, input().split()))
A = list(range(1,N+1))
Alist=[]
import itertools
for v in itertools.permutations(A):
        Alist.append(v)
a_num = Alist.index(P)+1
b_num = Alist.index(Q)+1
print(abs(b_num - a_num))

Submission status: Runtime Error

Solution code:
import sys
import itertools
from functools import reduce
import math
#import fractions
import numpy as np


def calc_double(n):
    return n//2
def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)



def resolve():
    input = sys.stdin.readline
    N,M=map(int,input().rstrip().split())
    A=list(map(int,input().rstrip().split()))
    AA=list(map(calc_double,A))
    """
    AA=[0 for _ in range(N)]
    for i in range(N):
        AA[i]=M//A[i]-0.5
    
    for i in range(N):
        AA[i]
    """
    aa= np.array(AA)
    a=int(np.lcm.reduce(aa))
    #a=lcm_list(AA)
    #a=a//2
    """
    count=0
    for i in range(1,M+1,2):
        if a*i<=M:
            count+=1
        else:
            break
    """
    odd=M//a
    count=(odd+1)//2

    print(count)

    

from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """2 50
6 10"""
        output = """2"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """3 100
14 22 40"""
        output = """0"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """5 1000000000
6 6 2 6 2"""
        output = """166666667"""
        self.assertIO(input, output)

if __name__ == "__main__":
    #unittest.main()
    resolve()

Submission status: Runtime Error

Solution code:
def gcd(m,n):
    x = max(m,n)
    y = min(m,n)

    if x%y == 0:
        return y
    else:
        while x%y!=0:
            z = x%y
            x = y
            y = z
        else:
            return z

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

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

skoubaisu = 1
for x in a:
    skoubaisu = lcm(skoubaisu,x)

if M*2 <= skoubaisu:
  print(0)
else:
  print(M//skoubaisu+1)

Submission status: Runtime Error

Solution code:
def gcd(a, b):
    while b: a, b = b, a % b
    return a

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

def lcm_list(numbers, N):

    ans = numbers[0]

    for i in range(1,N):
        ans = lcm_base(ans,numbers[i])

    return ans

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

a_lcm = lcm_list(A_n,N)
ans = 0
interval = a_lcm//2

amari = M // interval

if amari%2 == 1:
    amari = (amari+1)//2
else:
    amari = amari//2
print(amari)

Submission status: Runtime Error

Solution code:
K,X = map(str,input().split())
A = str(500*K)

　　if A >= X:
     print('Yes')
　　else:
     print('No');

Submission status: Runtime Error

Solution code:
import math
import fraction
from functools import reduce
N,M=map(int,input().split())
A=list(map(int,input().split()))
def lcm_base(x, y):
    return (x * y) // fraction.gcd(x, y)
def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)
saisyou = lcm(*A)
kosuu = math.ceil(M/saisyou)
print(kosuu)

Submission status: Runtime Error

Solution code:
K,X = map(str,input().split())
A = str(500*K)

　　if A >= X:
     print('Yes')
　　else:
     print('No')

Submission status: Runtime Error

Solution code:
K,X = map(str,input().split())
A = str(500*K)
　　if A >= X:
     print('Yes')
　　else:
     print('No')

Submission status: Runtime Error

Solution code:
K,X = map(str,input().split())
A = str(500*K)
　　if A >= X:
    print('Yes')
　　else:
    print('No')

Submission status: Runtime Error

Solution code:
import fractions # version 3.4
from collections import defaultdict
from functools import reduce

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

def lcm(*numbers):
    ans = numbers[0]
    for a in numbers:
        ans = ans * a // fractions.gcd(ans, a)
    # return reduce(lambda x,y: (x * y) // fractions.gcd(x, y), numbers, 1)

    return ans


def s_in():
    return input()

def n_in():
    return int(input())

def l_in():
    return list(map(int, input().split()))

class Interval():
    def __init__(self, li):
        self.li = li
        self.n = len(li)
        self.sum_li = [li[0]]
        for i in range(1, self.n):
            self.sum_li.append(self.sum_li[i-1] + li[i])

    def sum(self, a, b=None):
        if b is None:
            return self.sum(0, a)

        res = self.sum_li[min(self.n-1, b-1)]
        if a > 0:
            res -= self.sum_li[a-1]
        return res

N, M = l_in()
A = l_in()

B = [a//2 for a in A]
L = lcm(*B)

if any((L//b)%2 == 0 for b in B):
    print(0)
else:
    print((M//L + 1)//2)

Submission status: Runtime Error

Solution code:
K,X = map(str,input().split())
A = str(500*K)  
　　if A>=X:
    print('Yes')
　　else:
    print('No')

Submission status: Runtime Error

Solution code:
K,X = map(str,input().split())
A = str(500*K)  
　　if A>=X:
   print('Yes')
　　else:
   print('No')

Submission status: Runtime Error

Solution code:
a  = int(input())
if a == 2:
    a1, a2 = map(int, input().split())
    b1, b2 = map(int, input().split())
    print()
elif a == 3:
    a1, a2, a3 = map(int, input().split())
    a1, a2, a3 = map(int, input().split())
    print(1,3)
elif a == 5:
    a1, a2, a3, a4, a5 = map(int, input().split())
    a1, a2, a3, a4, a5 = map(int, input().split())
    print(a1,a2)
    print(a1+1,a2)
    print(a1+2,a2)
    print(a1+3,a2)
    print(a1+4,a2)
elif a == 6:
    a1, a2, a3, a4, a5, a6 = map(int, input().split())
    a1, a2, a3, a4, a5, a6 = map(int, input().split())
    print(2,2)
    print(5,5)

Submission status: Runtime Error

Solution code:
K, X = [map(int, input().split())]
print("Yes") if K*500 >= X else print("No")

Submission status: Runtime Error

Solution code:
K,X = map(str,input().split())
 
A = str(500*K)
 
  
  
　　if A>=X:
   print('Yes')
　　else:
   print('No')

Submission status: Runtime Error

Solution code:
K, X = (int, input().split())
print("Yes") if 500*K>X else print("No")

Submission status: Runtime Error

Solution code:
n, m = map(int, input().split())
a = list(map(int, input().split()))

a.sort(reverse=True)
ans = [i for i in range(max(a)//2, m + 1)]

for j in a:
    n_ans = []
    for i in ans:
        if ((i / j - 0.5) % 1 == 0):
            n_ans.append(i)
    ans = n_ans[:]

print(len(ans))

Submission status: Runtime Error

Solution code:
K, X = [int(K), int(X) for K, X in input().split()]

if K*500 >= X:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
K,X = map(str,input().split())
 
A = str(500*K)
 
if A>=X:
   print('Yes')
  
  else:
    print('No')

Submission status: Runtime Error

Solution code:
K, X = int(input().split())
if 500 * K >= X:
    print("Yes")
elif 500 * K < X:
    print("No")

Submission status: Runtime Error

Solution code:
k,x = map(int,input().split())
print("Yes" if k*500 >= x "No")

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ldb = long double;
using pa = pair < ll, ll >;
using vec = vector < ll >;

#define pb push_back
#define F  first
#define S  second
#define int ll
#define f(i,x,n) for(ll i=x;i<n;i++) 
#define all(c) c.begin(),c.end()
#define edl "\n"
#define ceils(s,n) (s+n-1)/n
#define str string
#define add insert
#define fast() ios_base::sync_with_stdio(false);cin.tie(NULL)

const int MOD = 1e9 + 7, N = 5e5 + 10;
const ll LINF = LLONG_MAX;

int32_t main() {
    fast();
    int k,x;
    cin >> k >> x;
    if(k*500>=x){
    	cout<<"Yes\n";
    }
    else
    	cout<<"NO\n";
    return 0;
}

Submission status: Runtime Error

Solution code:
K,X = map(str,input().split())
 
A = str(500*K)
 
h=[]
  
if A>=X:
   h.append(str('Yes'))
  
  else:
   h.append(str('No'))
  
  print(h)

Submission status: Runtime Error

Solution code:
K,X = map(str,input().split())
 
A = str(500*K)
 
h=[]
  
if A>=X:
   print('Yes')
  
  else:
   print('No')
  
  print(h)

Submission status: Runtime Error

Solution code:
K = int(input())
X = int(input())
K = K *500
if K >= X:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
K = int(input().split())
X = int(input().split())
K = K *500
if K >= X:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
K = int(input().split())
X = int(input().split())
K = K *2
if K >= X:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
k,x=int(input.split())
t=500*k
if t<x:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
K = int(input())
X = int(input())
K = K *2
if K >= X:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
K = int(input())
X = int(input())
K = K *2
if K >= X:
  print("Yes")
if K < X:
  print("No")

Submission status: Runtime Error

Solution code:
K,X = map(str,input().split())
 
A = str(500*K)
 
if A>=X:
   print('Yes'))
  
  else:
   print('No'))

Submission status: Runtime Error

Solution code:
abc = 'ABC'
N = int(input().rstrip())
S = input().rstrip()
ret = 0
if N == 3 and S == abc:
    ret = 1
else:
    for i in range(N - len(abc)):
        if abc == S[i:i+3]:
            ret += 1
print(ret)

Submission status: Runtime Error

Solution code:
Ken, New = map(int, input().split())
if (Ken * 500) - New >= 0:
    print("Yes")
elif (Ken * 500) - New < 0:
    print("No")
else:

Submission status: Runtime Error

Solution code:
hoge = [0 for i in range(2)]

for i in range(2):
  hoge[i] = input()
  
N = int(hoge[0])
S = hoge[1]

print(S.count('ABC'))

Submission status: Runtime Error

Solution code:
K,X = map(str,input().split())
 
A = str(500*K)
 
if A>=X:
   print('Yes')
  
  else:
   print('No'))

Submission status: Runtime Error

Solution code:
abc = 'ABC'
N = int(input().rstrip())
S = input().rstrip()
ret = 0
if len(S) == 3 and S == 'ABC':
    ret = 1
else:
    for i in range(N - len(abc)):
        if 'ABC' == S[i:i + 3]:
            ret += 1
print(ret)

Submission status: Runtime Error

Solution code:
num = int(input ())*500
x = int(input ())
if num > x:
    print("Yes")
else:
    print("no")

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>

using namespace std;

void rwFile() {
    freopen("INP.inp", "r", stdin);
    freopen("OUT.out", "w", stdout);
}

void solveA() {
    int k, x;
    cin >> k >> x;
    if (k * 500 >= x) cout << "YES";
    else cout << "NO";
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(nullptr); cout.tie(nullptr);
    //rwFile();
    solveA();
}

Submission status: Runtime Error

Solution code:
K,X = map(str,input().split())
 
A = str(500*K)
 
if A>=X:
   print('Yes')
  
  else:
   print('No')

Submission status: Runtime Error

Solution code:
import math

def count_index(list, k):
    count = 0
    for i in range(k):
        if (list[i] < list[k]):
            count = count + 1
    return list[k]-count-1

n = int(input())-1
p = list(map(int,input().split()))
q = list(map(int,input().split()))

a = (p[0]-1) * math.factorial(n)+1
b = (q[0]-1) * math.factorial(n)+1

for i in range(1,n):
    a = a + count_index(p, i) * math.factorial(n-i)
    b = b + count_index(q, i) * math.factorial(n-i)

ans = a-b
print(abs(ans))

Submission status: Runtime Error

Solution code:
huga = list(map(int, input().split()))
if huga[0]*500 - huga[1] >= 0:
    print(Yes)
elif huga[0]*500 - huga[1] > 0:
    print(No)
else:

Submission status: Runtime Error

Solution code:
print(input(), type(input()))

Submission status: Runtime Error

Solution code:
K = 500
num = int(input())
coin = num * K
print (coin)
X = int(input())
if coin >= X:
  print("Yes")
if coin < X:
  print("No")

Submission status: Runtime Error

Solution code:
K = int(input())
X = int(input())
print ('Yes' if 500 * K => X else 'No')

Submission status: Runtime Error

Solution code:
K,X = map(str,input().split()
 
A = str(500*K)
 
if A>=X:
   print('Yes')
  
  else:
   print('No')

Submission status: Runtime Error

Solution code:
K,X=int(input( ))
print ('Yes' if 500 * K => X else 'No')

Submission status: Runtime Error

Solution code:
K, X = input(), input()

if 500*K >= X:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
K,X=map(int,input( ).split( ))
print ('Yes' if 500 * K => X else 'No')

Submission status: Runtime Error

Solution code:
n = input()
s = input()
flag = 0
for i in range(1,int(n)-1):
  if s[i-1] + s[i] + s[i+1] = "ABC":
    flag += 1
print(flag)

Submission status: Runtime Error

Solution code:
A,K,X = map(str,input().split()
 
A = str(500*K)
 
if A<X :
   print('No')
  
  else:
    print('Yes')

Submission status: Runtime Error

Solution code:
n = input()
s = input()
flag = 0
for i in range(1,int(n)-1):
  if s[i-1] + s[i] + s[i+1] = "ABC":
        flag += 1
    print(flag)

Submission status: Runtime Error

Solution code:
import math

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

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

n, m = map(int, input().split())
a = [int(x) for x in input().split()]
g = a[0]
for i in range(n):
	g = lcm(g, a[i])
while g % 2 == 0:
	g //= 2

rb = m // g
if rb % 2 == 0:
	print(rb // 2)
else:
	print(rb // 2 + 1)

Submission status: Runtime Error

Solution code:
a, b = input().split()

if 500*a >= b:
  print("Yes")
else:
  primt("No")

Submission status: Runtime Error

Solution code:
n = input()
s = input()
flag = 0
for i in range(1,int(n)-1):
  if s[i-1]+s[i]+[i+1] = "ABC":
    flag += 1
print(flag)

Submission status: Runtime Error

Solution code:
A,K,X = map(int,input().split()
 
A = int(500*K)
 
if A<X :
   print('No')
  
  else:
    print('Yes')

Submission status: Runtime Error

Solution code:
A,K = map(int,input().split()

A = int(500*K)
 
if A<X :
   print('No')
  
  else:
    print('Yes')