Problem:


Score: 100 points

Problem Statement

In AtCoder Kingdom, Gregorian calendar is used, and dates are written in the "year-month-day" order, or the "month-day" order without the year.

For example, May 3, 2018 is written as 2018-5-3, or 5-3 without the year.  

In this country, a date is called Takahashi when the month and the day are equal as numbers. For example, 5-5 is Takahashi.

How many days from 2018-1-1 through 2018-a-b are Takahashi?

Constraints

a is an integer between 1 and 12 (inclusive).

b is an integer between 1 and 31 (inclusive).

2018-a-b is a valid date in Gregorian calendar.

Input

Input is given from Standard Input in the following format:

a b

Output

Print the number of days from 2018-1-1 through 2018-a-b that are Takahashi.

Sample Input 1

5 5

Sample Output 1

5

There are five days that are Takahashi: 1-1, 2-2, 3-3, 4-4 and 5-5.

Sample Input 2

2 1

Sample Output 2

1

There is only one day that is Takahashi: 1-1.

Sample Input 3

11 30

Sample Output 3

11

There are eleven days that are Takahashi: 1-1, 2-2, 3-3, 4-4, 5-5, 6-6, 7-7, 8-8, 9-9, 10-10 and 11-11.



Sample input:
5 5


Sample output:
5

Submission status: Accepted

Solution code:
import datetime
a, b = map(int, input().split(' '))
start = datetime.date(2018, 1, 1).toordinal()
end = datetime.date(2018, a, b).toordinal()

def checker(num):
    check_day = datetime.date(2018, num, num).toordinal()
    if start <= check_day <= end:
        return True
    else:
        return False

print(list(map(checker, [i for i in range (1, 13)])).count(True))

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
if a > b:
  print(a-1)
else:
  print(a)

Submission status: Accepted

Solution code:
t,h=map(int,input().split())
a=t
if t>h:
	a=a-1
print(a)

Submission status: Accepted

Solution code:
A,B=input().split()
a=int(A);b=int(B)
if b-a>=0:
	print(a)
else:
	print(a-1)

Submission status: Accepted

Solution code:
import itertools

def num_days(month):
    if month == 2:
        return 28
    elif month in [4, 6, 9, 11]:
        return 30
    else:
        return 31

a, b = tuple(map(lambda x: int(x), input().split()))

num_takahashi = 0

for i, j in itertools.product(range(1, a), range(1, num_days(a))):
    if i == j:
        num_takahashi += 1

for d in range(1, b + 1):
    if a == d:
        num_takahashi += 1

print(num_takahashi)

Submission status: Accepted

Solution code:

arr = list(map(int, input().split()))
if (arr[0] <= arr[1]):
    print(arr[0])
else:
    print(arr[0]-1)

Submission status: Accepted

Solution code:
import calendar as cal

i = input().split(' ')
a = int(i[0])
b = int(i[1])

year = 2018
n = 0

for month in range(1,a+1):
    for date in [item for subl in cal.monthcalendar(year, month) for item in subl]:
        if date == 0:
            continue
        if month == date:
            n = n+1
        if month >= a and date >= b:
            break

print(n)

Submission status: Accepted

Solution code:

if __name__ == "__main__":
    a, b = list(map(int, input().split()))
    ans = a - 1
    if a <= b:
        ans += 1
    print(ans)

Submission status: Accepted

Solution code:
import math
import itertools
from heapq import heapify, heappop, heappush
from sys import stdin, stdout, setrecursionlimit
from bisect import bisect, bisect_left, bisect_right
from collections import defaultdict, deque


# d = defaultdict(lambda: 0)
# setrecursionlimit(10**7)
# inf = float("inf")


##### stdin ####
def LM(t, r): return list(map(t, r))
def R(): return stdin.readline()
def RS(): return R().split()
def I(): return int(R())
def F(): return float(R())
def LI(): return LM(int,RS())
def LF(): return LM(float,RS())
def ONE_SL(): return list(input())
def ONE_IL(): return LM(int, ONE_SL())
def ALL_IL(): return LM(int,stdin)

##### tools #####
def ap(f): return f.append
def pll(li): print('\n'.join(LM(str,li)))
def pljoin(li, s): print(s.join(li))



##### main #####
def main():
	m,d = LI()
	print(m if m <= d  else m-1)

if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
a, b = (int(i) for i in input().split())

if a > b:
    print(a-1)
else:
    print(a)

Submission status: Accepted

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

count = 0
for i in range(a):
    if (i+1) == a:
        if (i+1) <= b:
            count += 1
    else:
        count += 1
print(count)

Submission status: Accepted

Solution code:
a, b = (int(i) for i in input().split())

if b < a:
    ans = a - 1
else:
    ans = a

print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a,b = list(map(int,raw_input().split()))
if b >= a:
    print a
else:
    print a-1

Submission status: Accepted

Solution code:
if __name__ == '__main__':
	a, b = map(int, input().split())
	if a<=b:
		print(a)
	else:
		print(a-1)

Submission status: Accepted

Solution code:
def main(input):
  a, b = [int(i) for i in input.split()]
  print(a if a <= b else a-1)

# tests = [
#   '5 5',  # 5
#   '2 1',  # 1
#   '11 30',  # 11
# ]

# for test in tests:
#   main(test)

main(input())

Submission status: Accepted

Solution code:
a, b = map(int, input() .split())
if a < b:
	print(a)
elif a > b:
	print(a - 1)
else:
	print(a)

Submission status: Accepted

Solution code:
inp=input().split()
a,b=int(inp[0]),int(inp[1])

if b<a:
    print(a-1)
else:
    print(a)

Submission status: Accepted

Solution code:
x = list(map(int,input().split()))
a = x[0]
b = x[1]
y = a - 1
if b >= a:
    y += 1
print(y)

Submission status: Accepted

Solution code:
a, b = list(map(int, input().split()))
print(a if b >= a else a-1)

Submission status: Accepted

Solution code:
# 整数の入力
a, b = list(map(int, input().split(" ")))

# 日付が月数を上回っているかどうかを基準に出力
if b >= a:
    print(a)
else:
    print(a-1)

Submission status: Accepted

Solution code:
a,b = map(int,raw_input().split())
if a<=b:
	print a
else:
	print a-1

Submission status: Accepted

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

if int(b)//int(a) > 0:
    day = int(a)
else:
    day = int(a)-1

print(day)

Submission status: Accepted

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

for x in range(1,13):
    if a==x and b<x:
        print(x-1)
    if a==x and b>=x:
        print(x)

Submission status: Accepted

Solution code:
a, b=(int(w) for w in input().split())
if a<=b:
    print(a)
else:
    print(a-1)

Submission status: Accepted

Solution code:
a, b = map(int, raw_input().split())
if b >= a:
    print a
else:
    print a - 1

Submission status: Accepted

Solution code:
a, b = map(int, input().split())  # 入力
if a <=  b:
    print(a)
if b < a:
    print(a-1)

Submission status: Accepted

Solution code:
a,b=map(int, input().rstrip().split())
count=int()
if a>b:
    count=a-1
else:
    count=a
print(count)

Submission status: Accepted

Solution code:
a , b = input().split()
a = int(a)
b = int(b)
if b >= a:
    print(a)
else:
    print(a-1)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if b >= a:
    c = 0
else:
    c = -1
# 出力
print (a + c)

Submission status: Accepted

Solution code:
a, b = (input().split(" "))
a = int(a)
b = int(b)
if a<=b:
    print(a)
else:
    print(a-1)

Submission status: Accepted

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

if a<= b:
    print(a)
else:
    print(a-1)

Submission status: Accepted

Solution code:
a, b = input().split()
a = int(a)
b = int(b)
ans = 0
for i in range(1, a + 1):
    c = 0
    if i == a:
        c = b + 1
    else:
        c = 13
    for j in range(1, c):
        if i == j:
            ans += 1
print(ans)

Submission status: Accepted

Solution code:
Tmp = []
Tmp = input().rstrip().split(' ')
 
M = int(Tmp[0])
N = int(Tmp[1])
 
if M<=N:
    print(M)
else:
    print(M-1)

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

a,b = na()
if b >= a:
    ans = a
else:
    ans = a-1

print(ans)

Submission status: Accepted

Solution code:
a, b = map(int, input().split(' '))
if a <= b:
	print(a)
else:
	print(a-1)

Submission status: Accepted

Solution code:
count = 0
A, B = map(int, input().split())
count = count + A - 1
if B >= A:
    count = count + 1
else:
    count = count
print(count)

Submission status: Accepted

Solution code:
a,b=[int(x) for x in input().split()]
if a<=b:
    print(a)
else:
    print(a-1)

Submission status: Accepted

Solution code:
a,b = list(map(int,input().split())) 
if a > b:                            
    print(a - 1)                     
else:                                
    print(a)

Submission status: Accepted

Solution code:
num = list(map(int,input().split()))
result = num[0]
if(num[1] < num[0]):
    result -= 1
print(result)

Submission status: Accepted

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


if a<=b:
	print(a)
else:
	print(a-1)

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
if b < a: print(a-1)
else: print(a)

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    a, b = [int(x) for x in stdin.readline().rstrip().split()]
    count = 0
    for i in range(1, 13):
        if i < a:
            count += 1
        elif i == a:
            if i <= b:
                count += 1
        else:
            break
    print(count)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat May  5 20:55:26 2018
ABC096-1
@author: maezawa
"""

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

if b < a:
    cnt = a-1
else:
    cnt = a

print(cnt)

Submission status: Accepted

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

if a <= b:
    print(a)
elif a > b:
    print(a-1)

Submission status: Accepted

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

takahashi = a 

if a > b:
    takahashi -= 1
print(takahashi)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print(str(a-1+(1 if a<=b else 0)))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
ans = a-1
if(b>=a):
    ans += 1
print(ans)

Submission status: Accepted

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

    if a > b:
        print(a-1)
    else:
        print(a)

if __name__ == "__main__":
        main()

Submission status: Accepted

Solution code:
days = input()
days = days.rstrip().split(" ")
thuki = int(days[0])
hi = int(days[1])


if thuki<=hi:
    print(thuki)
elif thuki>hi:
    print(thuki-1)

Submission status: Accepted

Solution code:
import sys

for l in sys.stdin:
  items = [int(x) for x in l.split(' ')]
  a = items[0]
  b = items[1]
  if a <= b:
    print a
  else:
    print a - 1

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a>b:
    ans=a-1
else:
    ans=a
print(ans)

Submission status: Accepted

Solution code:
import sys,collections,math;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

a,b = Is()
if b >= a:
    print(a)
else:
    print(a-1)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math
import sys
import itertools
import numpy as np

month,day = map(int, input().split())

if month > day :
    print(month-1)
else:
    print(month)

Submission status: Accepted

Solution code:
m, d = [int(i) for i in input().split()]
if d < m:
    m = m - 1
print(m)

Submission status: Accepted

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

if a == b :
    print(a)
elif a > b:
    print(a-1)
elif a < b:
    print(a)

Submission status: Accepted

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

if b >= a:
    print(a)
else:
    print(a-1)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def inpl(): return map(int, input().split())
a, b = inpl()
if a > b:
    print(a-1)
else:
    print(a)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if b >= a:
  print(a)
else:
  print(a-1)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
out = a if a <= b else a-1
print(out)

Submission status: Accepted

Solution code:
[a,b] = list(map(int,input().split(" ")))
if a > b :
  print(a-1)
else:
  print(a)

Submission status: Accepted

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

takahashi_count = a if a <= b else a - 1

print(takahashi_count)

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
ans = a
if b < a:
    ans -= 1
print(ans)

Submission status: Accepted

Solution code:
d = list(map(int,input().split()))
if d[0] >=d[1]:
  if d[1] == d[0]:
    print(d[0])
  else:
    print(d[0]-1)
else:
  print(d[0])

Submission status: Accepted

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

ans = a - 1
if b >= a:
  ans += 1
print(ans)

Submission status: Accepted

Solution code:
a, b = list(map(int, input().split()))
if a > b:
    print(a-1)
else:
    print(a)

Submission status: Accepted

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

if b<a:
    print(a-1)
else:
    print(a)

Submission status: Accepted

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

if a > b :
    print(a -1 )
else:
    print(a)

Submission status: Accepted

Solution code:
a, b = (int(i) for i in input().split())  

if (b >= 12):
    print(a)
elif (a > b):
    print(a-1)
else:
    print(a)

Submission status: Accepted

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

if b < a:
	print(a-1)
else:
	print(a)

Submission status: Accepted

Solution code:
a,b = list(map(int, input().split()))
if b < a:
    print(a-1)
else:
    print(a)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
count = 0
count = a-1
if(a <= b):
    count=count+1
print(count)

Submission status: Accepted

Solution code:
x = list(map(int, input().split()))
if x[0]<=x[1]:
    print(x[0])
else:
    print(x[0]-1)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
ans = a
if a>b:
    ans -= 1
print(ans)

Submission status: Accepted

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

if a<=b:
    print(a)
else:
    print(a-1)

Submission status: Accepted

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

if b >=a:
    print(a)
else :
    print(a-1)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a <= b:
  print(a)
else :
  print(a-1)

Submission status: Accepted

Solution code:
a,b = map(int ,input().split())
if b < a:
    a -=1
print(a)

Submission status: Accepted

Solution code:
a,b = list(map(int,input().split()))
if a<=b: print(a)
else: print(a-1)

Submission status: Accepted

Solution code:
l = map(int, raw_input().split())
a = l[0]
b = l[1]

if a <= b:
    print(a)
else:
    print(a - 1)

Submission status: Accepted

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

if b >= a:
    print(a)
else:
    print(a-1)

Submission status: Accepted

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

if a > b:
    print(a - 1)
else:
    print(a)

Submission status: Accepted

Solution code:
# coding: utf-8

i = input().split(" ")
a = int(i[0])
b = int(i[1])

output = 1

if b >= a:
    output += (a - 1)
else:
    output += (a - 1 - 1)

print(output)

Submission status: Accepted

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

if b >= a:
    print(a)
else:
    print(a-1)

Submission status: Accepted

Solution code:
month, day = map(int, input().split())
if month > day:
    print(month-1)
else:
    print(month)

Submission status: Accepted

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

if b >= a:
    print(a)
else:
    print(a - 1)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a<b:
    print (a)
elif a==b:
    print (a)
else:
    print (a-1)

Submission status: Accepted

Solution code:
# your code goes here
a,b = map(int,input().split())

if a <= b:
	print(a)
else:
	print(a-1)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000)

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

if(a <= b):
    print(a)
else:
    print(a-1)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
takahashi = a - 1
if b >= a:
    takahashi += 1

print(takahashi)

Submission status: Accepted

Solution code:
def main():
    a, b = map(int, input().split())
    if a <= b:
        ans = a
    else:
        ans = a - 1

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    a, b = map(int, input().split())
    if a > b:
        print(a - 1)
    else:
        print(a)

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split()]
if a <= b:
    print(a)
else:
    print(a-1)

Submission status: Accepted

Solution code:
import sys

a, b = map(int, sys.stdin.readline().strip().split(" "))

c = a - 1
if a <= b:
    c += 1

print(c)

Submission status: Accepted

Solution code:
a,b=map(int, raw_input().split())
print a if b>=a else a-1

Submission status: Accepted

Solution code:
a, b = list(map(int, input().split()))
ans = a - 1
if a<=b:
    ans += 1
print(ans)

Submission status: Accepted

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

if a <= b:
    print(a)
else:
    print(a-1)

Submission status: Accepted

Solution code:
N,X = map(int,input().split())
if N > X:
  ans = N - 1
else:
  ans = N
print(ans)

Submission status: Accepted

Solution code:
import re
inp = input()
inp = re.split(" ",inp)

a = int(inp[0])
b = int(inp[1])

ans = a

if a > b :
    ans -= 1

print(ans)

Submission status: Accepted

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

if b>=a :
    print (a)
else:
    print (a-1)

Submission status: Accepted

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

    return (a - 1) + [0, 1][a <= b]


print(abc096_a())

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

if a > b:
    print(a-1)

else:
    print(a)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(a - 1) if b < a else print(a)

Submission status: Accepted

Solution code:
a, b = list(map(int, input().split()))
print(a) if a <= b else print(a-1)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
if b >= a :
	print(a)
else :
	print(a-1)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if b<a:
 print(a-1)
else:
 print(a)

Submission status: Accepted

Solution code:



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

# print(a)
# print(b)

m = a - 1
n = 1 if b >= a else 0

print(str(m + n))

Submission status: Accepted

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

sum = 0

sum += a - 1

if b >= a:
    sum += 1

print(sum)

Submission status: Accepted

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

result = a - 1

if a <= b:
    print(result + 1)
else:
    print(result)

Submission status: Accepted

Solution code:
a,b = (int(i) for i in input().split()) 
if a>b:
  print(a-1)
else:
  print(a)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a>b:
    print(a-1)
elif a<=b:
    print(a)

Submission status: Accepted

Solution code:
a,b = [int(i) for i in input().split()]
if a <= b:
    print(a)
else:
    print(a-1)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print(a if b>=a else (a-1))

Submission status: Accepted

Solution code:
# n = int(raw_input())
# a = [int(raw_input()) for i in xrange(n)]
m, d = map(int, raw_input().split())

# print "".join(["a","b"])

# print "Yes" if 3 > 0 else "No"

if d >= m:
    print m
else:
    print m-1

Submission status: Accepted

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

if a<=b:
    print(a)
else:
    print(a - 1)

Submission status: Accepted

Solution code:
a, b = map(int, input().split(' '))
if a <= b:
    print(a)
else:
    print(a-1)

Submission status: Accepted

Solution code:
a,b = input().split()
a = int(a)
b = int(b)
ans = 0
if a <= b:
    ans = a
else:
    ans = a - 1
print(ans)

Submission status: Accepted

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

ans=a
if b<a:
    ans-=1
print(ans)

Submission status: Accepted

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

if a > b:
    print(a-1)
else:
    print(a)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if b >= a: print(a)
else: print(a - 1)

Submission status: Accepted

Solution code:
def main():
    A, B = map(int, input().split())

    if A <= B:
        print(A)
    else:
        print(A - 1)

main()

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a>b:
    print(a-1)
else :
    print(a)

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split()]

ans = a if b >= a else a-1

print(ans)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
print( a if a<= b else a-1)

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

a, b = na()

if a <= b:
    print(a)
else:
    print(a-1)

Submission status: Accepted

Solution code:
a = input().split()
b = int(a[1])
a = int(a[0])

if a <= b:
    print(a)
else:
    print(a-1)

Submission status: Accepted

Solution code:
a, b = (int(i) for i in input().split())
if b>=a:
    ans = a
else:
    ans = a - 1
print(ans)

Submission status: Accepted

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

if(a<=b):
    print(a)
else:
    print(a-1)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if(a<=b):
	print(a)
else:
	print(a-1)

Submission status: Accepted

Solution code:
a,b=[int(i) for i in input().split()]

if b>=a:
    print(a)
else:
   print(a-1)

Submission status: Accepted

Solution code:
a, b = list(map(int, input().split()))
if(a > b):
    print(a - 1)
else:
    print(a)

Submission status: Accepted

Solution code:
A, B = [int(_) for _ in input().split()]
if A <= B:
    print(A)
else:
    print(A - 1)

Submission status: Accepted

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

if a[1] >= a[0]:
    print(a[0])
else:
    print(a[0] - 1)

Submission status: Accepted

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

cnt = a
if a > b:
    cnt -= 1
    
print(cnt)

Submission status: Accepted

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

    if b >= a:
        return a
    else:
        return a-1


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

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
if b < a:
    a -= 1
print(a)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
if (b >=a):
    print(a)
else:
    print(a-1)

Submission status: Accepted

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

if b < a:
    a -= 1

print(a)

Submission status: Accepted

Solution code:
a,b = [int(i) for i in input().split()]
if a <= b:
  print(a)
else:
  print(a-1)

Submission status: Accepted

Solution code:
import re
import math

if __name__ == '__main__':

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

    if b < a:
        print(a-1)
    else:
        print(a)

Submission status: Accepted

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

if A<=B:
    print(A)
else:
    print(A-1)

Submission status: Accepted

Solution code:
# coding: utf-8
a,b=map(int,input().split())
print(a-(1 if a>b else 0))

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split()]

if a <= b:
    print(a)
else:
    print(a - 1)

Submission status: Accepted

Solution code:
def i1():
 return int(input())
def i2():
 return [int(i) for i in input().split()]
[a,b]=i2()
if a<=b:
 print(a)
else:
 print(a-1)

Submission status: Accepted

Solution code:
# cook your dish here
# from math import * 
#for _ in range(int(input().strip())):
a,b=map(int,input().split())
if b>=a:
    print(a)
else:
    print(a-1)

Submission status: Accepted

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

if a > b:
	print(a - 1)
else:
	print(a)

Submission status: Accepted

Solution code:
a, b = map(int ,raw_input().split())
if a > b :
    print a - 1
else:
    print a

Submission status: Accepted

Solution code:
a,b=[int(i) for i in input().split()]
if b<a:
  print(a-1)
else:
  print(a)

Submission status: Accepted

Solution code:
#! /usr/bin/env python3

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

if a <= b:
    print(a)
else:
    print(a - 1)

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
if a>b:
    print(a-1)
else:
    print(a)

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
n=0
if A<=B:
    n=1
print(A-1+n)

Submission status: Accepted

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

print(a if a <= b else a - 1)

Submission status: Accepted

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

print(a) if a <=b else print(a-1)

Submission status: Accepted

Solution code:
#!python
# -*- coding: utf-8 -*-

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

if a <= b:
    print(a)
else:
    print(a - 1)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(a-1+(a<=b))

Submission status: Accepted

Solution code:
# n objects m seller 
# Write your code here
import math
a,b=map(int,input().split());
ans=a;
if a>b : 
    ans=ans-1;
print(ans);

Submission status: Accepted

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

if b < a:
    print(a - 1)
else:
    print(a)

Submission status: Accepted

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

if b >= a:
  print(a)
else:
  print(a-1)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if b<a:
	print(a-1)
else:
	print(a)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if b >= a:
    print(a)
else:
    print(a-1)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(a-1 + (a <= b))

Submission status: Accepted

Solution code:
a, b = map(int, raw_input().split())
ans = a
if b < a:
    ans -= 1
print ans

Submission status: Runtime Error

Solution code:
a, b = map(int, input())
if a <= b:
  print(a)
else:
  print(a-1)

Submission status: Runtime Error

Solution code:
H,W = map(int, input().split())
s = [input() for _ in range(H)]

import sys
for j in range(H):
    for i in range(W):
        if s[j][i] =='#':
            if j+1<W and i+1<H and 0<=j-1 and 0<=i-1:
                if (s[j+1][i]=='#' or s[j][i+1]=='#' or s[j-1][i] or s[j][i-1]):
                    continue
                if s[j+1][i]!='#' and s[j][i+1]!='#' and s[j-1][i]!='#' and s[j][i-1]!='#':
                    print('No')
                    sys.exit()
print('Yes')

Submission status: Runtime Error

Solution code:
H,W = map(int, input().split())
s = [input() for _ in range(H)]

import sys
for j in range(H):
    for i in range(W):
        if s[j][i] =='#':
            if j+1<W and i+1<H and 0<=j-1 and 0<=i-1:
                if (s[j+1][i]=='#' or s[j][i+1]=='#' or s[j-1][i]=='#' or s[j][i-1]=='#'):
                    continue
                if s[j+1][i]!='#' or s[j][i+1]!='#' or s[j-1][i]!='#' or s[j][i-1]!='#':
                    print('No')
                    sys.exit()
print('Yes')

Submission status: Runtime Error

Solution code:
H,W = map(int, input().split())
s = [input() for _ in range(H)]

import sys
for j in range(H):
    for i in range(W):
        if s[j][i] =='#':
            if j+1<W and i+1<H and 0<=j-1 and 0<=i-1:
                if (s[j+1][i]=='#' or s[j][i+1]=='#'):
                    continue
                if s[j+1][i]!='#' or s[j][i+1]!='#' or s[j-1][i]!='#' or s[j][i-1]!='#':
                    print('No')
                    sys.exit()
print('Yes')

Submission status: Runtime Error

Solution code:
H,W = map(int, input().split())
s = [input() for _ in range(H)]

import sys
for j in range(H):
    print("j={}".format(j))
    for i in range(W):
        print(i)
        print('s[{}][{}]={}'.format(j,i,s[j][i]))
        if s[j][i] =='#':
            if j+1<W and i+1<H and j-1<0 and i-1<0:
                if (s[j+1][i]=='#' or s[j][i+1]=='#'):
                    continue
                if s[j+1][i]!='#' or s[j][i+1]!='#' or s[j-1][i]!='#' or s[j][i-1]!='#':
                    print('No')
                    sys.exit()
print('Yes')

Submission status: Runtime Error

Solution code:
H,W = map(int,input().split())
S = ["."*(W+2)]+["."+input()+"." for h in range(H)]+["."*(W+2)]

for h in range(1,H+1):
  for w in range(1,W+1):
    if S[h][w]=="#" and S[h-1][w]=="." and S[h+1][w]=="." and S[h][w-1]=="." and S[h][w+1]==".":
      print("No")
      exit()
      
print("Yes")

Submission status: Runtime Error

Solution code:
a,b = map(int, input().split())
print a if a<=b else a-1

Submission status: Runtime Error

Solution code:
a,b,c,d = map(int, input().split())
if abs(a-c) <= d or (abs(a-b) <= d and abs(b-c) <= d):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a,b = map(int,input.split())
if a==i and b==1:
  print(1)
else:
  print(min(a,b)-1)

Submission status: Runtime Error

Solution code:
a,b=map(int(input().split()))
if b>=a:
  print(a)
else:
  print(a-1)

Submission status: Runtime Error

Solution code:
n = int(input())
count = 0
preemos = []

is_prime = [True] * 55555
is_prime[0],is_prime[1] = False, False

for i in range(2, 55555):
  if count == n: break
  if is_prime[i]:
    if i % 10 == 1:
      count += 1
      preemos.append(i)
    for j in range(i, 55555, i):
      is_prime[j] = False
      
for i in preemos:
  print(i, end = " ")

Submission status: Runtime Error

Solution code:
import math
n = int(input())
ans = []
num = 11
for i in range(n):
  while True:
    key = 1
    for j in range(2,math.ceil(math.sqrt(num))+1):
      if i % j == 0:
        key = 0
    num += 10
    if key == 1:
      ans.append(str(num))
      break
print(" ".join(ans))

Submission status: Runtime Error

Solution code:
x,y=int(input()),int(input())
if y<x:
  x-=1
print(x)

Submission status: Runtime Error

Solution code:
x=int(input())-1
if int(input())>=x:
  x+=1
print(x)

Submission status: Runtime Error

Solution code:
a,b = map(int,input())
ans = (a-1)
if a<=b:
  ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
int main(){
  int a , b;
  
cin>> a  >> b;

  if(a <= b){
  cout << a <<endl;
  }
  else if (a > b){
  cout << a - 1  << endl;
  }
}

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
print(sum(a-1+(a<=b)))

Submission status: Runtime Error

Solution code:
if a <= b:
    print(a)
else:
    print(a - 1)

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))
a.sort()
k = int(input())
print(a[0]+a[1]+a[2]*(2**k))

Submission status: Runtime Error

Solution code:
a, b = [int(i) for i in input().spili()]

print(a if a <= b else a - 1)

Submission status: Runtime Error

Solution code:
import sys

sys.setrecursionlimit(10**6)

h,w = map(int,input().split())
str_list=[list(input()) for i in range(h)]


str_list.append(["."]*w)
str_list.insert(0,["."]*w)
for i in range(h+2):
    str_list[i].append(".")
    str_list[i].insert(0,".")




for i in range(h):
    for j in range(w):
        if str_list[i+1][j+1] == ".":
            continue
        
        for a,b in enumerate([1,2]):
            write = 0

            if str_list[i+a][j+b]=="#":
                write = 1
                break
            
            if str_list[i+b][j+a]=="#":
                write = 1
                break
                

        
        if write == 0:
            break
    else:
        continue
    break
        

            

if write == 1:
    print("Yes")
else:
    print("No")