Problem:


Score : 100 points

Problem Statement

Takahashi is participating in a programming contest, AXC001. He has just submitted his code to Problem A.

The problem has N test cases, all of which must be passed to get an AC verdict.

Takahashi's submission has passed M cases out of the N test cases.

Determine whether Takahashi's submission gets an AC.

Constraints

1 \leq N \leq 100

0 \leq M \leq N

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N M

Output

If Takahashi's submission gets an AC, print Yes; otherwise, print No.

Sample Input 1

3 3

Sample Output 1

Yes

All three test cases have been passed, so his submission gets an AC.

Sample Input 2

3 2

Sample Output 2

No

Only two out of the three test cases have been passed, so his submission does not get an AC.

Sample Input 3

1 1

Sample Output 3

Yes



Sample input:
3 3


Sample output:
Yes

Submission status: Runtime Error

Solution code:
    l = input().split()
     
    if l[0] == l[1]:
      print('Yes')
    else:
      print('No')

Submission status: Runtime Error

Solution code:
n = input()
m = input()

if n == m:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
import sys


def main():
    if sys.argv[1] == sys.argv[2]:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
# 整数の入力
A = int(input())
cnt = 0
for i in range(1, A):
  for j in range(1, A):
    x = str(i)
    y = str(j)

    first_x = x[0]
    last_x = x[-1]
    first_y = y[0]
    last_y = y[-1]
    
    if(first_x ==  last_y and last_x == first_y):
      cnt = cnt + 1
      continue
      
print(cnt)

Submission status: Runtime Error

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

ans = 0
for i in range(N):
  isOK = True
  for j in range(i):
    if P[i] > P[j]:
      isOK = False
      break
  if isOK:
    ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
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 = int(input())
a = list(map(int, input().split()))
lcm_a = a[0]

for i in range(1, n):
    lcm_a = lcm(lcm_a, a[i])

ans = 0

for i in a:
    ans += lcm_a // i

print(ans%1000000007)

Submission status: Runtime Error

Solution code:
N = int (input ())
M = int (input ())

if N == M :
    print ("Yes")
else :
    print ("No")

Submission status: Runtime Error

Solution code:
if(N == M):
  print('YES')
else:
  print('No')

Submission status: Runtime Error

Solution code:
if N == M :
    print ("Yes")
else :
    print ("No")

Submission status: Runtime Error

Solution code:
N,M=map(int,input().split())
if N=M :
  print("Yes") 
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,M=map(int,input().split())
print("Yes" if N=M else "No")

Submission status: Runtime Error

Solution code:
N = int(input())
M = int(input())
if (N == M):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n = int(input())
m = int(input())
if n == m:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n = 3
m = int(input())
if n == m:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
if N = M
    print(yes)
else:
    print(no)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, m = intput().split
if n == m:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
N,M = map(int(),input().split())
print('Yes' if N==M else 'No')

Submission status: Runtime Error

Solution code:
a , b =map(int,input().split())
A=str(a)
B=str(b)
for(int i=0; i<a; i++):
    X+="A"
for(int j=0; j<b; j++):
    Y+="B"

if a<b:
    print(X)
if a>b:
    print(Y)

Submission status: Runtime Error

Solution code:
N,M = map(int(),input().split())
 
if N == M:
  print('Yes')
  
else:
  print('No')

Submission status: Runtime Error

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

if N == M:
  print('Yes')
  
else:
  print('No')

Submission status: Runtime Error

Solution code:
N,M = map(int,input().split())
if N == M:
  print("Yes")
  
 else:
  print("No")

Submission status: Runtime Error

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

if a=b:
   print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

if i[0] == i[1]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

if i[0] == i[1]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n = input()
m = input()
if n == m:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
m,n = int(input())
if n == m:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
m,n = int(input())
if n = m:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
import sys
args = sys.argv

if args[1] == args[2]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
N=input()
M=input()

if N==M:
  print("Yes")
  else:
    print("No")

Submission status: Runtime Error

Solution code:
N,M=map(int, input().split())
if N==M:
  print 'Yes'
else:
  print 'No'

Submission status: Runtime Error

Solution code:
a=input()
m=a.split()
N,M=map(int,m)
if N==M:
  print 'Yes'
else:
  print 'No'

Submission status: Runtime Error

Solution code:
a=input()
m=a.split()
N=int(m[0])
M=int(m[2])
if N==M:
  print 'Yes'
else:
  print 'No'

Submission status: Runtime Error

Solution code:
a=input()
m=a.split()
N=int(m[0])
M=int(m[1])
if N==M:
  print 'Yes'
else:
  print 'No'

Submission status: Runtime Error

Solution code:
a=input()
m=a.split()
N=m[0]
M=m[1]
if M==N:
  print 'Yes'
else:
  print 'No'

Submission status: Runtime Error

Solution code:
N=input()
M=input()
if N==M:
  print 'Yes'
else:
  print 'No'

Submission status: Runtime Error

Solution code:
import sys
n = int(sys.argv[1])
m = int(sys.argv[2])
if n == m:
 print("Yes")
else:
 print("No")

Submission status: Runtime Error

Solution code:
if N==M:
  print 'Yes'
else:
  print 'No'

Submission status: Runtime Error

Solution code:
n=input()
p=input()
p=p.split()
q=[]
for i in range(int(n)):
    if min(p[:i+1])==p[i]:
        q.append(p[i])
print(len(q))

Submission status: Runtime Error

Solution code:
n=input()
p=input()
p=p.split()
q=[]
for i in range(int(n)):
    j=min(p[:i+1])
    if j==p[i]:
        q.append(p[i])
print(len(q))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=input()
p=input()
p=p.split()
q=[p[0]]
for i in range(int(n)):
    j=max(p[:i+1])
    if j>p[i]:
        q.append(p[i])
if p[int(n)-1]!=min(p):
    q.pop(-1)
print(len(q))

Submission status: Runtime Error

Solution code:
a ,b = input().split()
if a == b :
	print("Yes")
  else :
    print("No")

Submission status: Runtime Error

Solution code:
N,M=map(int,imput().split())
if N==M:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
N,M=map(int,imput().split())
if N=M:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Jan 22 13:08:59 2020

@author: USER
"""
import fractions
N=int(input())
A=list(map(int,input().split()))
a=A[0]
for i in range(1,len(A)):
    a=int(a*A[i]/fractions.gcd(a,A[i]))
x=0
for i in range(len(A)):
    A[i]=int(a/A[i])
    x=x+A[i]
print(x%(10**9+7))

Submission status: Runtime Error

Solution code:

n = int(input())

number = [[0]*10 for _ in range(10)]

for _ in range(1, n+1):

    s=str(i)
    i=int(s[0])
    j=int(s[-1])

    number[i][j] += 1

count = 0
for i in range(10):

    for j in range(10):
        count += number[i][j]*number[j][i]

print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
if len(set(input().split()))1:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
n = int(input())
m = input().split()
ppp = list(map(int, m))
max = 2*10**5+1
ans = 0
for p in ppp:
    if p < max:
        ans += 1
        max = p
print(ans)

Submission status: Runtime Error

Solution code:
a, b = map(int,input().split())
A = list(str(a)*b,), B = list(str(b)*a)
C = max(len(A),len(B))
for i in range(C)
  if A[i] > B[i]:
  　　　　print(str(B))
         break
  elif B[i] > A[i]:
         print(str(A))
         break

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
print('Yes' if  is b else 'No')

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())
if A == B :
    print "Yes"
else :
    print "No"

Submission status: Runtime Error

Solution code:
A,B = map(int,input().split())
if A = B :
    print "Yes"
else :
    print "No"

Submission status: Runtime Error

Solution code:
x,y=map(int(),input().split())
if(x==y):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a= int(input().split(""))
if(a[0]==a[1]):
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
N,M=int(input())
if N==M:
  ans="Yes"
else:
  ans="No"
print("ans")

Submission status: Runtime Error

Solution code:
def gcd(m, n):
    return m if n == 0 else gcd(n, m%n)

def lcm(m, n):
    return m*n/gcd(m, n)

def find_loop():
    N = int(input())
    nums = [int(x) for x in input().split(" ")]
    current_lcm = nums[0]
    for i in range(1, N):
        current_lcm = lcm(current_lcm, nums[i])
    ret = 0
    for i in range(N):
        ret = (ret+current_lcm/nums[i]) % 1000000007
    print(int(ret))


find_loop()

Submission status: Runtime Error

Solution code:
# make_tree(graph, root) -> dist, parent

# LCA: Last Common Ancestor (最近共通祖先)
# lca(u, v, dist, parent)

# Inclusion-exclusion principle: 包除原理
# http://satanic0258.hatenablog.com/entry/2016/04/10/104524
# A∨B∨C = ￢(￢A￢B∨￢C)

N = int(input())
AB = [list(map(int, input().split())) for _ in range(N - 1)]
M = int(input())
UV = [list(map(int, input().split())) for _ in range(M)]

MOD = 10 ** 9 + 7

graph = [[] for _ in range(N + 1)]
for a, b in AB:
  graph[a].append(b)
  graph[b].append(a)
  
def make_tree(graph, root):
  INF = 10 ** 15
  dist = [INF] * len(graph)
  parent = [-1] * len(graph)
  stack = [root]
  dist[root] = 0
  parent[root] = root
  while stack:
    s = stack.pop()
    for g in graph[s]:
      if dist[g] > dist[s] + 1:
        dist[g] = dist[s] + 1
        parent[g] = s
        stack.append(g)
  return dist, parent

def lca(u, v, dist, parent):
  distu, distv = dist[u], dist[v]
  if distu > distv:
    for _ in range(distu - distv):
      u = parent[u]
  if distv > distu:
    for _ in range(distv - distu):
      v = parent[v]
  while u != v:
    u, v = parent[u], parent[v]
  return u

dist, parent = make_tree(graph, 1)
#print(parent)

for i, (u, v) in enumerate(UV):
  UV[i].append(lca(u, v, dist, parent))

cnt = [0] * (N + 1)
for u, v, l in UV:
  tmp = [1] * (N + 1)
  uu, vv = u, v
  while uu != l:
    tmp[uu] = 0
    uu = parent[uu]
  while vv != l:
    tmp[vv] = 0
    vv = parent[vv]
  for i in range(2, N + 1):
    cnt[i] += tmp[i]
print(cnt)

cnt_tmp = 0
for i in range(2, N + 1):
  if cnt[i]:
    cnt_tmp += 1
print((pow(2 , N - 1, MOD) - pow(2, cnt_tmp, MOD)) % MOD)

Submission status: Runtime Error

Solution code:
import sys
from fractions import gcd
input = sys.stdin.readline

n = input()
arr = list(map(int, input().split()))
tmp = arr[0]
for i in arr:
    tmp = tmp*i//gcd(tmp,i)
ans = sum(tmp//a for a in arr)
ans = ans % (10**9+7)
print(ans)

Submission status: Runtime Error

Solution code:
import sys
sys.stdin.readline() 

n = int(input())
arr = list(map(int,input().split()))
count = 0
minimum = arr[0]
for num in arr:
  if num <= minimum:
    minimum = num
    count += 1
print(count)

Submission status: Runtime Error

Solution code:
def main():
    a = input()
    l = list(map(int,input().split()))
    ans = check(int(a),l)
    print(ans)

def check(a,l):
    num = 0
    for i in range(a):
        for j in range(i):
            if l[i] > l[j]:
                break
        else:
            num = num + 1
    return num

main()

Submission status: Runtime Error

Solution code:
def main():
    a = input()
    #if int(a) > 100000:
    #    exit
    l = list(map(int,input().split()))
    #if len(l) > int(a):
    #    exit
    ans = check(int(a),l)
    print(ans)

def check(a,l):
    num = 0
    for i in range(a):
        for j in range(i):
            if l[i] > l[j]:
                break
        else:
            num = num + 1
    return num

main()

Submission status: Runtime Error

Solution code:
N, M = input().split(" ")
N = int(N)
M = int(M)
if (M >= 0 and M == N):
  return True
else:
  return False

Submission status: Runtime Error

Solution code:
n, m = input()

if n == m:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
from fractions import *
n,*a=map(int,open(0).read().split())
b=1
for i in a:b*=i//gcd(b,i)
print(sum(b//i for i in a)%(10**9+7))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
num = list(map(int,input().split()))
count = 0
for _ in range(N):
  if min(num[:_+1]) == num[_]:
    count += 1

print(count)

Submission status: Runtime Error

Solution code:
#coding: utf-8
 
s = input().split()
if s[0]>s[1]:
  for i in range(s[0]):
  	print(str(s[1]),end='')
else:
  for i in range(s[1]):
  	print(str(s[0]),end='')

Submission status: Runtime Error

Solution code:
import math
import collections


def modinv(n, p):
    """
    逆元のmod pを求める
    """
    if n >= p:
        raise ValueError('p must be larger than n')
    return pow(n, p-2, p)


def prime_sieve(n):
    """
    n以下の素数を昇順に列挙する
    エラトステネスの篩 計算量O(Nlog(log(N)))
    """
    is_prime = [True for i in range(n+1)]
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, n+1):
        if is_prime[i]:
            for j in range(i+i, n+1, i):
                is_prime[j] = False
    return [i for i in range(2, n+1) if is_prime[i]]


def prime_factorization(it):
    """
    数値の素因数分解をリストで返すイテレータ
    エラトステネスの篩を応用する 計算量O(A+Nlog(log(N)))
    """
    n = max(it)
    factor = [1 for i in range(n+1)]
    factor[0] = 0
    factor[1] = 1
    for i in range(2, n+1):
        if factor[i] == 1:
            for j in range(i, n+1, i):
                factor[j] = i
    for a in it:
        if a < 2:
            yield list()
        else:
            prime_factors = list()
            while a != factor[a]:
                prime_factors.append(factor[a])
                a //= factor[a]
            prime_factors.append(factor[a])
            yield list(sorted(prime_factors))


def lcm(x, p=-1):
    """
    配列xに対する最小公倍数 LCM(x_1, x_2, ..., x_n) を求める
    p > 0のときはLCM mod pを返す
    """
    max_prime_counts = dict()
    for prime in prime_sieve(max(x)):
        max_prime_counts[prime] = 0
    pfs = prime_factorization(x)
    for pf in pfs:
        prime_count = collections.Counter(pf)
        for prime in prime_count.keys():
            max_prime_counts[prime] = max(max_prime_counts[prime], prime_count[prime])
    lcm_value = 1
    for prime, factor in max_prime_counts.items():
        if p > 0:
            lcm_value *= pow(prime, factor, p)
            lcm_value %= p
        else:
            lcm_value *= pow(prime, factor)
    return lcm_value


def read():
    N = int(input().strip())
    A = list(map(int, input().strip().split()))
    return N, A


def solve(N, A, MOD=1000000007):
    bsum = 0
    for i in range(N):
        bsum += modinv(A[i], MOD)
        bsum %= MOD
    bsum *= lcm(A, p=MOD)
    bsum %= MOD
    return bsum


if __name__ == '__main__':
    inputs = read()
    print("%d" % solve(*inputs))

Submission status: Runtime Error

Solution code:
N = input(int)
M = input(int)
if N == M:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
def P(N, M):
  if N = M:
    print('Yes')
  else:
    print('No')

Submission status: Runtime Error

Solution code:
def P(N, M):
  if N > M;
  	return No
  return Yes

Submission status: Runtime Error

Solution code:
a=list(map(lambda x:x,input(),split()))
if(a[1]>a[0]):
  print(a[0]*int(a[1]))
else:
  print(a[1]*int(a[0]))

Submission status: Runtime Error

Solution code:
a=list(map(lambda x:x,input().split())
if(a[0]==a[1]):
       print("Yes")
else:
       print("No")

Submission status: Runtime Error

Solution code:
a=list(map(a,input().split())
if(a[0]==a[1]):
       print("Yes")
else:
       print("No")

Submission status: Runtime Error

Solution code:
n,m = input()
if(1>n OR n>100 OR m<0 OR m>n):
  break;
else:
  if(n==m):
    print(Yes)
  else:
    print(No)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
from fractions import*
n=int(input())
mod=1000000007
s=[int(j) for j in input().split()]
ans=1
for i in s:
    ans*=i//gcd(ans,i)
print(sum(ans//i for i in s)%mod)

Submission status: Runtime Error

Solution code:
import sys
from fractions import gcd
from functools import reduce

MOD = 1000000007
lcm = lambda x, y: (x*y)//gcd(x,y)
input = sys.stdin.readline

n = int(input())
a = list(map(int, input().split()))
l = reduce(lcm, a)
ans = 0
for x in a:
    ans += l//x
print(ans%MOD)

Submission status: Runtime Error

Solution code:
inp1 = input().split()
inp2 = input().split()
a = int(inp1[0])
b = inp2
b = [int(s) for s in inp2]
ansno = a
maxno = b[0]

ii = 0
for i in b:
  if ii ==0:
    ii+=1
    continue
  bslice = b[:ii+1]
#  print(ii)
#  print(bslice)
  if min(bslice) != i:
#    print("min(bslice)",min(bslice)," i ",i)
    ansno -=1
  ii+=1
#  print("ansno: ",ansno)
print(ansno)

Submission status: Runtime Error

Solution code:
def resolve():
    N = int(input())
    arr = tuple(map(int, input().split()))
    tmp = arr[0]
    counter = 0
    for i in arr:
        if i<=tmp:
            tmp=i
            counter += 1
    print(counter)

if __name__ == "__main__":
    resolve()

Submission status: Runtime Error

Solution code:
if m < n:
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
import sys
N = int(input())
H = input().split()
for i in range(N):
    H[i] = int(H[i])

H = reversed(H)  
for i in range(N-1):
    if H[i] < H[i+1]:
        H[i+1] = H[i+1]-1
    if H[i] > H[i+1]:
        print('No')
        sys.exit() 
print('Yes')

Submission status: Runtime Error

Solution code:
n=input()
m=input()
if int(n)==int(m):
  print('yes')
else:
  print('no')

Submission status: Runtime Error

Solution code:
N=input('N')
M=input('M')
if int(N)==int(M):
  print('yes')
else:
  print('no')

Submission status: Runtime Error

Solution code:
def main():
  i = list(map(int, input().split()))
  ans = check(i[0],i[1])
  print ans
  
def check(int n, int m):
  if n == m:
    return true
  else:
    return false

Submission status: Runtime Error

Solution code:
def main():
  n = input()
  m = input()
  ans = check(n,m)
  print ans
  
def check(int n, int m):
  if(n == m):
    return true
  else:
    return false

Submission status: Runtime Error

Solution code:
int(input())=n
int(input())=m
if n==m:
  print('yes')
else:
  print('no')

Submission status: Runtime Error

Solution code:
int(input())=n
int(input())=m
if n=m:
  print('yes')
else:
  print('no')

Submission status: Runtime Error

Solution code:
from fractions import gcd
N = int(input())
A = list(map(int,input().split()))
lcm = A[0]
for i in range(1,N):
    lcm = (lcm*A[i])//gcd(lcm,A[i])

MOD = 10**9+7
ans = 0
for a in A:
    b = lcm//a
    ans += b
print(ans%MOD)

Submission status: Runtime Error

Solution code:
from fractions import gcd
P = 10**9 + 7
N = 1000001 #使う最大値+1以上にする、値に注意3*10^5とかにしとくと安心
inv = [0] + [1] # 1/x
finv = [1] + [1] # 1/x!
fac = [1] + [1] # x!
for i in range(2,N):
  inv += [inv[P % i] * (P - int(P / i)) % P]
  fac += [(fac[i-1] * i) % P]
  finv += [(finv[i-1] * inv[i]) % P]
n=int(input())
a=list(map(int,input().split()))
lcm=a[0]
mod=10**9+7
for i in range(1,n):
  lcm=(lcm//gcd(lcm,a[i]))*(a[i]//gcd(lcm,a[i]))*gcd(lcm,a[i])
ans=0
for i in range(n):
  ans+=lcm*inv[a[i]]%mod
print(ans%mod)

Submission status: Runtime Error

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

print("{}{}".format(N.M))

Submission status: Runtime Error

Solution code:
import sys
import math
import functools
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
def lcm(a, b):
    return a * b // gcd (a, b)
def lcm_n(nums):
    return functools.reduce(lcm, nums)

n = ni()
a = na()
a_lcm = lcm_n(a)
ans = 0
for ai in a:
    ans += a_lcm // ai
ans %= mod
print(ans)

Submission status: Runtime Error

Solution code:
a= input()
b=input()
if (a==b):
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
a= input()
b=input()
if a==b:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
N = input()
M = input()

if N == M:
 print("yes")
else:
 print("no")

Submission status: Runtime Error

Solution code:
#include <stdio.h>
int main()
{
  int N,M;
  scanf("%d %d",&N,&M);
  if (N == M)
      printf("Yes\n");
  if (N != M)
      printf("No\n");
}

Submission status: Runtime Error

Solution code:
#include <stdio.h>
int main()
{
  int N,M;
  scanf("%d %d",&N,%M);
  if (N == M)
      printf("Yes");
  if (N != M)
      printf("No");
}

Submission status: Runtime Error

Solution code:
#include <stdio.h>
int main()
{
  int N,M;
  scanf("%d %d",&N,%M);
  if (N == M)
      printf("Yes");
  if !(N == M)
      printf("No");
}

Submission status: Runtime Error

Solution code:
#include <stdio.h>
int main()
{
  int N,M;
  scanf("%d %d",&N,%M);
  if N == M;
  printf("Yes");
  if !(N == M);
  printf("No")
}

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int, input().split()))
 
def gcd(n, m):
    if(m): return gcd(m, n%m)
    else: return n
 
def lcm(n, m):
    return n // gcd(n, m) * m
 
LCM = a[0]
for i in range(1, n):
    LCM = lcm(a[i], LCM)
 
res = 0
MOD = 1000000007
for i in range(n):
    res += LCM//a[i]
    
print(res % MOD)

Submission status: Runtime Error

Solution code:
import fractions
N=int(input())
a = list(map(int, input().split()))

#------------最小公倍数---------------------
lcm = a[0]
for i in range(1, N):
    lcm = lcm * a[i] // fractions.gcd(lcm, a[i])
#------------------------------------------
ans=0

for j in a:
    ans += lcm // j
ans %= 1000000007
print(ans)

Submission status: Runtime Error

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

if M == N:
  print(Yes)
else:
  print(No)

Submission status: Runtime Error

Solution code:
import Queue as Q

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

if N > M:
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
from dataclasses import dataclass, field
from typing import Any

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

if N > M:
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
n=int(input())
a=list(map(int,input().split()))
m=a[0]
ans=1
for i,z in enumerate(a):
  if i==0:continue
  if z<=m:
    ans+=1
  m=min(m,z)
print(ans)

Submission status: Runtime Error

Solution code:
l = input().split()
if l[0]==l[1]:
  print "YES"
else:
  print "NO"

Submission status: Runtime Error

Solution code:
from fractions import gcd

N = int(input())
a = list(map(int, input().split()))
mod = 10 ** 9 + 7
l = 1
res = 0
for x in a:
  l = x * l // gcd(x, l)
for x in a:
  res += l//x
  res %= mod
print(res)

Submission status: Runtime Error

Solution code:
n = int(input())
li = list(map(int,input().split()))
icount = 0
for i in range(n):
    if li[i] == min(li[0:i+1]):
        icount += 1
print(icount)

Submission status: Runtime Error

Solution code:
N = input()
N = int(N)

c=[[0 for i in range(10)] for j in range(10)]

c[0][0]
for x in range(1,N+1):
    X=str(x)
    c[int(X[0])][int(X[-1])]+=1

score = 0
for i in range(10):
    for j in range(10):
        score += c[i][j]*c[j][i]
        
print(score)

Submission status: Runtime Error

Solution code:
if __name__ == '__main__':
    a, b = map(int, int(input())
    if a - b == 0:
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

Solution code:
def run():
    a, b = map(int, int(input())
    if a == b:
        print("Yes")
    else:
        print("No")   
if __name__ == 'main':
    run()

Submission status: Runtime Error

Solution code:
a, b = map(int, int(input())
    if a == b:
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

Solution code:
mod=10**9+7

n=int(input())

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

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

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

lcma=1

for i in range(n):
    lcma=lcm(lcma,a[i])

ans=0

for i in range(n):
    ans=(ans+lcma//a[i])

print(ans%mod)

Submission status: Runtime Error

Solution code:
n = int(input())
p = [int(i) for i in input().split()]

t = p[0]
ans = 0
for i in range(n):
    if t >= p[i]:
        ans += 1
        t = p[i]

print(ans)

Submission status: Runtime Error

Solution code:
from fractions import gcd
n=int(input())
a=list(map(int,input().split()))
lcm = a[0]
for i in range(1,n):
  lcm = lcm*a[i] // gcd(lcm,a[i])
mod=pow(10,9)+7
ans=0
for x in a:
  ans+=lcm//x
print(ans%mod)

Submission status: Runtime Error

Solution code:
inp1 = input().split()
inp2 = input().split()
a = int(inp1[0])
b = inp2
b = [int(s) for s in inp2]
ansno = a
maxno = b[0]

ii = 0
for i in b:
  if i ==0:
    continue
  if maxno < i:
    maxno = i
    ansno -= 1
    continue
  bslice = b[:ii]
  b[:ii].sort(reverse=True)
  bsort = b[:ii]
  if bslice != bsort:
    ansno -=1
    print(bslice,bsort)
    print("sort")
  ii+=1
print(ansno)

Submission status: Runtime Error

Solution code:
import math
import collections
def main():

    N = int(input())
    A = list(map(int, input().split()))
    mod = pow(10, 9) + 7

    def primes(n):
        b = [True] * (n//2)
        for i in range(3, int(n**0.5)+1, 2):
            if b[i//2]:
                b[i*i//2::i] = [False] * ((n-i*i-1)//(2*i)+1)

        return [2] + [2*i + 1 for i in range(1, n//2) if b]

    def isprime(n):
        if n == 1: return False
        for i in range(2, int(math.sqrt(n))+1):
            if n % i == 0:
                return False
        return True

    A = sorted(list(set(A)))
    N = len(A)

    ps = primes(int(math.sqrt(max(A))))

    d = dict()
    di = collections.defaultdict(dict)
    for i in range(N):
        if isprime(A[i]):
            if A[i] not in d:
                d[A[i]] = 1
            di[i][A[i]] = 1
        else:
            v = A[i]
            for p in ps:
                if p > v: break
                cnt = 0
                while v > 1 and v % p == 0:
                    cnt += 1
                    v //= p
                if p in d:
                    d[p] = max(d[p], cnt)
                else:
                    d[p] = cnt
                di[i][p] = cnt
            if v > 1:
                di[i][v] = 1
                if v not in d:
                    d[v] = 1

    ans = 0
    for i in range(N):
        b = 1
        for p in d:
            if p in di[i]:
                b *= pow(p, d[p]-di[i][p])
            else:
                b *= pow(p, d[p])
            b %= mod
        ans += b
        ans %= mod

    return ans

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

Submission status: Runtime Error

Solution code:
N = int(input())
count = 0

c = [[0 for i in range(10)]for j in range(10)]

for i in range(1,N+1):
    str_i = str(i)
    c[int(str_i[0])][int(str_i[-1])] += 1

for j in range(10):
    for k in range(10):
        count += c[j][k] * c[k][j]

print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import fractions
from functools import reduce
n=int(input())
numbers=list(map(int,input().split()))
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
l=0
x=lcm_list(numbers)
for i in range(n):
    l+=(x//numbers[i])
print(l%(10**9+7))

Submission status: Runtime Error

Solution code:
import sys
import fractions
def input():
    return sys.stdin.readline()[:-1]
n=int(input())
a=list(map(int,input().split()))
mod=10**9+7


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

cnt=0
b=[ans//a[i] for i in range(n)]
print(sum(b)%mod)

Submission status: Runtime Error

Solution code:
import sys
import fractions
def input():
    return sys.stdin.readline()[:-1]
n=int(input())
a=list(map(int,input().split()))
mod=10**9+7


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

cnt=0
b=[ans//a[i] for i in range(n)]
print(sum(b)%mod)

Submission status: Runtime Error

Solution code:
n=int(input())
lists=list(map(int,input().split()))
 
mn=n+1
cnt=0
for li in lists:
  if mn>li:
    mn=li
    cnt+=1
print(cnt)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import fractions
import numpy as np
 
mod = 10**9+7
 
n = int(input())
a = list(map(int, input().split()))
 
div = a[0]
for i in a:
    div = div*i//fractions.gcd(div, i)

ans = 0
for i in a:
    ans += div//i

print(ans%mod)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
P = list(map(int,input().split()))
ans=0
 
 
for i in range(N):
    if min(P[:i+1])==P[i]:
      ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
def acinput():
    return list(map(int, input().split(" ")))



import numpy as np
#from functools import reduce
import matha
import string
import itertools
import fractions
import heapq
import collections
import re
import array
import bisect
import sys
import random
import time
import copy
import functools

N,M=acinput()

if N==M:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
N=int(input())
P = list(map(int,input().split()))
ans=0
 
 
for i in range(N):
    if min(P[:i+1])==P[i]:
        ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
def gcd(n,m):
  if n>m:
    return gcd(m,n);
  if n==0:
    return m;
  return gcd(m-n*(m//n),n)
 
def lcm(x, y):
    return (x * y) // gcd(x, y)
  
n=int(input())
a=list(map(int,input().split()))
s=1
for i in a:
  s=lcm(s,i)
ans=0
for i in a:
  ans+=s//i
  ans % 1000000007
print(ans)

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
if a == b:
    print("Yes")
else :
    print("No")

Submission status: Runtime Error

Solution code:
n=int(input())
import fractions
a = list(map(int, input().split()))
lcm = a[0]
for i in a:
  lcm = lcm * i // fractions.gcd(lcm, i)
b=[]
for i in a:
  b.append(lcm//i)
ans=sum(b)%(10**9+7)
print(ans)