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: Wrong Answer

Solution code:
a, b = map(int, input().split())
takahashi = 0
 
for x in range(1, a-1):
    for y in range(1, 31):
        if x == y:
            takahashi += 1
 
for x in range(1, b+1):
    if x == a:
        takahashi += 1
print(takahashi)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

X, Y = map(int, input().split())


if X > Y:
    print(X)
else:
    print(X - 1)

Submission status: Wrong Answer

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

for x in range(1, a+1):
    for y in range(1, b+1):
        if x == y:
            takahashi += 1

print(takahashi)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import datetime

def checkDay(m, d):
    try:
        dt=datetime.datetime.strptime("%04d/%02d/%02d"%(2018, m, d), "%Y/%m/%d")
        return True
    except ValueError:
        return False

im, id = map(int, input().split())
res = 0
for m in range(1, im + 1):
    if m <= id:
        if checkDay(m, m):
            res +=1

print (res)

Submission status: Wrong Answer

Solution code:
nums = list(map(int, input().split()))
print(min(nums))

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
cnt = 0
for month in range(a+1):
    for day in range(b+1):
        if month == 0:
            continue
        if month == day:
            print(month,day)
            cnt += 1
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
cnt = 0
for month in range(a):
    for day in range(b):
        if (month+1) == (day+1):
            cnt += 1
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
cnt = 0
for month in range(a):
    for day in range(b):
        if month == day:
            cnt += 1
print(cnt)

Submission status: Wrong Answer

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

if B >= A:
    print(A)

Submission status: Wrong Answer

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

for i in range(1, a+1):
    for l in range(1, b+1):
        if i == l:
            count += 1

print(count)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split(' '))
count = 0
for i in range(a):
        if (a > i) & (b > i):
                count += 1
                break
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = [int(i) for i in input().split()]
a = N[0]
b = N[1]
counter = 0
i,j = 0,0
for i in range(1,a + 1):
    for j in range(1,b + 1):
        if i == j:
            counter += 1
            break
        if j > i:
            break
print(counter)

Submission status: Wrong Answer

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

if a <= b:
    print(a)
elif a == 2 and b == 1:
    print(0)
else:
    print(str(a-b-1))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
if a < b:
    result = a
elif b < 13:
    result = b
else:
    result = 0
print(result)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
ans = 0
for i in range(1, 13):
    if a >= i and b>=i:
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split(' '))
count = 0
for i in range(a):
        if (a > i) & (b > i):
                count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

Solution code:
a=[int(x) for x in input().split(' ')]
x = min(a)
print(x)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
b = 0 if b > 12 else b
print(max(a, b))

Submission status: Wrong Answer

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

c=0

for x in range(a):
    for y in range(b):
        if x==y:
            c=c+1
       
        
print(c)

Submission status: Wrong Answer

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

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

print(a)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
b = 0 if b > 12 else b
max(a, b)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
cnt = 0
for a in range(1, a + 1):
    if b >= a:
        cnt += 1
print(cnt)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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-1 if m >= d  else m)

if __name__ == '__main__':
  main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
print(min([a,b]))

Submission status: Wrong Answer

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

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

print(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = [int(i) for i in input().split()]
a = N[0]
b = N[1]
counter = 0
i,j = 0,0
for i in range(1,a + 1):
    for j in range(1,b + 1):
        if i == j:
            counter += 1
        if j > i:
            break
print(counter)

Submission status: Wrong Answer

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

print(min(a,b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = [int(i) for i in input().split()]
print(min(12, min(x)))

Submission status: Wrong Answer

Solution code:


a, b = map(int, input().split())  # 入力


print(min(a, b))

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
if a == b == 1:
    result = 0
else:
    result = min(a,b)
print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = [int(i) for i in input().split()]
a = N[0]
b = N[1]
counter = 0
i,j = 0,0
for i in range(1,a + 1):
    for j in range(1,b + 1):
        if i == j:
            counter += 1
print(counter)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding : utf-8

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

ans = 0
for m in range(1, a+1):
    for d in range(1, b+1):
        if m == d:
            ans += 1

print(ans)

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())	
if y == 1:
    x -=1
print(x)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
print(max(a, min(b, 12)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
count = 0
A, B = map(int, input().split())
for i in range (1, A+1):
    if B >= 5:
        count = count + 1
    else:
        count = count
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if b > 12:
    print(a)
else:
    print(min([a,b]))

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

a, b = input().split()

a=2
b=5

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
count=0
for i in range(1,a+1):
    for j in range(1,b+1):
        if i==j:
            count+=1

print(count)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
cnt = 0
for i in range(1, a + 1):
    for j in range(1, b + 1):
        if i == j:
            cnt += 1
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
nums = list(map(int, input().split()))
a=nums[0]
b=nums[1]
print(min(a,b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b=(int(w) for w in input().split())
print(min(a, b))

Submission status: Wrong Answer

Solution code:
x = [int(i) for i in input().split()]
print(min(x))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Time Limit Exceeded

Solution code:
numbers = input().split()
a = numbers[0]
b = numbers[1]
i = 1
while True:
    if a != i:
        i += 1
        continue
    else:
        if b < i:
            print(i - 1)
            break
        else:
            print(i)
            break

Submission status: Time Limit Exceeded

Solution code:
numbers = input().split()
a = numbers[0]
b = numbers[1]
i = 1
while True:
    if a != i:
        i += 1
        continue
    else:
        if b < i:
            print(i - 1)
        else:
            print(i)
        
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    a, b = Input()

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


main()

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
print(a) if b >= 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 a>b:
    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:
lst = input().split()
a = int(lst[0])
b = int(lst[1])

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

Submission status: Accepted

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

print(a - int(a > b))

Submission status: Accepted

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

ans=a-1

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(a if b >= a else 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())

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

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:
n,m = [int(x) for x in input().split()]
if n <= m:
  print(n)
else:
  print(n-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())

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

Submission status: Accepted

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

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)
else:
    print(a-1)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
ans=0
for i in range(1,a):
   for j in range(1,13):
      if i==j:
         ans+=1
for i in range(a,a+1):
   for j in range(1,b+1):
      if i==j:
         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 a <= b:
  print(a)
else:
  print(a-1)

Submission status: Accepted

Solution code:
a,b=map(int,input().split(" "))
print(a+(b>=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, 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)
else:
    print(a-1)

Submission status: Accepted

Solution code:
a, b = map(int, 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 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())

ans = a if b >= a else 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=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 1 <= b < a:
  print(a-1)
elif a <= b:
  print(a)

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())

cnt = a - (1 if a > b else 0)

print(cnt)

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 - 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:
month, day = map(int, input().split())
takahashi_days = month
if day >= month:
    print(takahashi_days)
elif month > day:
    print(takahashi_days -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())
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:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())
if a > b:
    print(a-1)
else:
    print(a)

Submission status: Accepted

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

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


if __name__ == "__main__":
    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 = map(int,input().split())
cou = 0
for i in range(1,13):
    if a > i:
        cou += 1
    elif a == i and b >= i:
        cou += 1
    else:
        break
print(cou)

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    a, b = map(int, readline().split())

    ans = a - 1

    if a <= b:
        ans += 1

    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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 = list(map(int,input().split()))

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

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:

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

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
if n > m:
  print(n-1)
else:print(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().rstrip().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-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:
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-(a>b))

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())
ans= a if a<=b else a-1
print(ans)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print(a if b>=a else 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:
    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())
res = a - 1
if a <= b:
    res += 1

print(res)

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)
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:
x,y=map(int,input().split())
if(y<x):
  print(x-1)
else:
  print(x)

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)
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:
a,b=map(int,input().split())
if a>b:
  a-=1
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:
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:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    a, b = LI()

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

if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

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

ans = 0
for i in range(1, 13):
    if i < a:
        ans += 1
    elif i == a:
        if i <= b:
            ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
ans = a if a <= b else a-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:
a, b = map(int, input().split())
c = a
if a > b:
  print(c-1)
else:
  print(c)

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:
LI = lambda: list(map(int, input().split()))

a, b = LI()


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


if __name__ == "__main__":
    main()

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-(b<a))

Submission status: Accepted

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

Submission status: Accepted

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

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:
from sys import stdin, stdout


def main():
    line = stdin.readline()
    parts = line.split()
    a = int(parts[0])
    b = int(parts[1])

    if a <= b:
        stdout.write(str(a))
    else:
        stdout.write(str(a - 1))


main()

Submission status: Accepted

Solution code:
from sys import stdin,stdout

def main():
    line=stdin.readline()
    parts=line.split()
    a=int(parts[0])
    b = int(parts[1])
    if b>=a:
        stdout.write(str(a))
    else:
        stdout.write(str(a-1))
main()

Submission status: Accepted

Solution code:
from sys import stdin, stdout

def main():
    line = stdin.readline()
    parts = line.split()
    mes = int(parts[0])
    dia = int(parts[1])

    stdout.write(str(mes if dia>=mes else mes-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:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [list(input()) for _ in range(n)]
#a = [int(input()) for _ in range(n)]

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:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    a, b = map(int, readline().split())

    ans = 0
    for i in range(1, 13):
        if i < a:
            ans += 1
        elif i == a and i <= b:
            ans += 1

    print(ans)
    return


if __name__ == '__main__':
    main()

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:


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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a,b=map(int,input().split());print([max(1,a-1),a][b>=5])

Submission status: Accepted

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