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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
mohu=input().split()
mohu1=list(map(int,mohu))
a=mohu1[0]
b=mohu1[1]
if b>12:
    ans=a
else:
    if a>b:
        ans=a-1
    else:
        ans=a
print(ans)

Submission status: Accepted

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

print(a-1 + int(b >= a))

Submission status: Accepted

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

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:
#! /usr/bin/env python
# -*- coding: utf-8 -*-
instr = raw_input().split()
if instr[0] <= instr[1]:
    answer = instr[0]
else :
    answer = int(instr[0]) - 1
print(answer)

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=[int(i) for i in input().split()]
b=a[0]
c=a[1]

if b>c:
	print(b-1)

else:
	print(b)

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:
list = raw_input().split()
if list[0] <= list[1]:
  print list[0]
else:
  print int(list[0]) - 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = list(map(int,input().split()))
cnt = 0
for m in range(1,a+1):
    if m == a:
        last = b
    else:
        last = 31
    for d in range(1,last+1):
        if m == d :
            cnt += 1
            #print(m,d)

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
for month in range(1, a + 1):
    if month == a:
        last_day = b
    elif month in [1, 3, 5, 7, 8, 10, 12]:
        last_day = 31
    elif month in [4, 6, 9, 11]:
        last_day = 30
    elif month == 2:
        last_day = 28
    for day in range(1, last_day + 1):
        if month == day:
            ans += 1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
smonth, sday = 1,1
m,d = map(int,input().split())
total = 0

for i,j in zip(range(12),range(12)):
    if(smonth+i < m):
        total += 1
    elif(smonth+i == m):
        if(sday+i > d):
            break
        else:
            total +=1
            break
    else:
        break
print(total)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#coding: utf-8
a,b = input().split()

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
st=input().split()
a=int(st[0])
b=int(st[1])
if a>b:
    print(a-1)
else:
    print(a)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a, b = map(int, input().split())


def countTakahashiDays(a, b):
    return a - 1 + (1 if b >= a else 0)


print(countTakahashiDays(a, b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import datetime
a, b = map(int, input().split())
count = 0
for i in range(a):
    target_date_str = '2018'+'{0:02d}'.format(a)+'{0:02d}'.format(b)
    target_date_date = datetime.datetime.strptime(target_date_str, '%Y%m%d')
    current_date_date = datetime.datetime.strptime('2018'+'{0:02d}'.format(
        i+1)+'{0:02d}'.format(i+1), '%Y%m%d')
    if current_date_date <= target_date_date:
        count += 1
print(count)

Submission status: Accepted

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

if a > b:
    a -= 1;

print(a)

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 = [int(i) for i in input().split()]

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

Submission status: Accepted

Solution code:
a, b = [int(elem) for elem in input().split(' ')]
num_takahashi = a - 1
if a > b:
    print(num_takahashi)
else:
    print(num_takahashi + 1)

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

Submission status: Accepted

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

import sys

def readInts():
  line = sys.stdin.readline().rstrip("\n")
  return map(int, line.split())

def solve(a, b):
  n = a - 1
  if b >= a:
    n += 1
  return n

if __name__ == "__main__":
  a, b = readInts()
  ans = solve(a, b)
  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 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())
th = a-1
if b>=a:
    th+=1
print(th)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
m, d = map(int, raw_input().split())

count = 0

if m != 1:
    count = m - 1

if m <= d:
    count += 1

print count

Submission status: Accepted

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

takahashi = a - 1
if b >= a :
    takahashi = takahashi + 1

print('{}'.format(takahashi))

Submission status: Accepted

Solution code:
#Day of Takahashi

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

#計算
if a > b:
	ans = a-1

if a <= b:
	ans = a

#出力
print("{}".format(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())
ans = a - 1
if a <= b:
  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:
a, b = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
print((lambda a:a[0]-1+(a[1]>=a[0]))(map(int,raw_input().split())))

Submission status: Accepted

Solution code:
ab = input().split()

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 入力
a, b = map(int, input().split())

# 処理

# 前月までは必ず１日ずつある
ans = a - 1
# 当月はその日付が月以上ならばあったことになる
if b >= a:
    ans += 1

# 出力
print("{}".format(ans))

Submission status: Accepted

Solution code:
#coding: utf-8

count = 0
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 if a>b else a)

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 = [int(i) for i 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)
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)
elif a > b:
  print(a-1)

Submission status: Accepted

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

for md in range(a):
    takahashi += 1
#    print(takahashi)

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

Submission status: Accepted

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

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

print(takahashi)

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:
#!/usr/bin/python3

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

same = 0

for i in range(a):
    if i + 1 == a:
        n = b
    else:
        n = 31
    for j in range(n):
        if i == j:
            same += 1

print(same)

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    a,b = LI()
    if a > b:
        return a -1

    return a



print(main())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

count = a
if a > b:
    count -= 1

print(count)

Submission status: Accepted

Solution code:


a=(input())

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

a,b=c


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N = [int(i) for i in input().split()]
a = N[0]
b = N[1]
counter = 0
if a == b:
    print(a)
elif a < b:
    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-1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding=utf-8

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
m, d = [int(i) for i in input().split()]
if m <= d:
  print(m)
else:
  print(m-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:
if __name__ == "__main__":

    date = input().replace("　", " ").split(" ")

    if date[0] <= date[1]:
        print(date[0])
    else:
        print(int(date[0])-1)

Submission status: Accepted

Solution code:
# -*- 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 = list(map(int, input().split()))

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



if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
if __name__ == "__main__":
    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)
elif a < b:
    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:
    a = a - 1
    print(a)

elif a == b:
    print(a)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
#a = int(input())
# スペース区切りの整数の入力
a, b = map(int, input().split())
# 文字列の入力
#s = input()
# 出力
#print("{} {}".format(a+b+c, s))

if b >= a:
    print("{}".format(a))
else:
    print("{}".format(a - 1))

Submission status: Accepted

Solution code:
month, day = [int(i) for i in input().split(" ")]

if month <= day:
    takahashi_day_num = month
else:
    takahashi_day_num = month - 1

print(takahashi_day_num)

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

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

print(res)

Submission status: Accepted

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

# atcoder beginner contest
# problem a

if __name__ == '__main__':
    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(' '))
if a <= b:
    print(a)
else:
    print(a - 1)

Submission status: Accepted

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

Submission status: Accepted

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

def solve(a, b):
    if a <= b:
        return a
    else:
        return a - 1

def readQuestion():
    import sys
    line = sys.stdin.readline()
    sline = line.rstrip()
    str_a, str_b = sline.split(' ')
    a = int(str_a)
    b = int(str_b)
    return a, b

def main():
    a, b = readQuestion()
    ans = solve(a, b)
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#abc096a

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

Submission status: Accepted

Solution code:
def getinputdata():

    # 配列初期化
    array_result = []    
    data = input()
    array_result.append(data.split(" "))

    flg = True

    try:
        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = True

            else:

                flg = False
    finally:

        return array_result

arr_data = getinputdata()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
A - Day of Takahashi
https://abc096.contest.atcoder.jp/tasks/abc096_a

"""
import sys
from sys import stdin
input = stdin.readline


def calc_day_of_takahashi(m, d):
    if d >= m:
        return m
    else:
        return m - 1


def main(args):
    a, b = map(int, input().split())
    ans = calc_day_of_takahashi(a, b)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
a,b = map(int,stdin.readline().split())
ans = a-1
if b >= a:
 ans = a
print ans

Submission status: Accepted

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

Submission status: Accepted

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

r = a - 1 if b < a else a

print(r)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
month, day = list(map(int, (input().split(" "))))
ans = month - 1
if month <= day:
    ans += 1

print(ans)

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-

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())
takahashi = 0
 
for x in range(1, a):
    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: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat May  5 20:54:36 2018

@author: sakas
"""

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

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

Submission status: Accepted

Solution code:
import datetime

def checkDay(m, d):
    takahashis = [
        datetime.datetime(2018,1,1,0,0),
        datetime.datetime(2018,2,2,0,0),
        datetime.datetime(2018,3,3,0,0),
        datetime.datetime(2018,4,4,0,0),
        datetime.datetime(2018,5,5,0,0),
        datetime.datetime(2018,6,6,0,0),
        datetime.datetime(2018,7,7,0,0),
        datetime.datetime(2018,8,8,0,0),
        datetime.datetime(2018,9,9,0,0),
        datetime.datetime(2018,10,10,0,0),
        datetime.datetime(2018,11,11,0,0),
        datetime.datetime(2018,12,12,0,0)
    ]

    tgt = datetime.datetime(2018,m,d,0,0)
    res = 0
    for dt in takahashis:
        if dt <= tgt:
            res += 1
    return res

m, d = map(int, input().split())
res = checkDay(m, d)
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:
# -*- coding: utf-8 -*-
a, b = map(int, raw_input().split())
if(a>b):
	print(a-1)
else:
	print(a)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#for i in xrange(15):
a,b=map(int,raw_input().split())
if(a>b): print "%d"%(a-1)
else: print "%d"%(a)

Submission status: Accepted

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

Submission status: Accepted

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

if(a<=b):
  print("{}".format(a))
else:
  print("{}".format(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()
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())

c = 0

if a <= b:
    c = a

else:
    c = (a-1)


print(c)

Submission status: Accepted

Solution code:
n = [list(map(int, input().split())) for i in range(1)]
a = n[0][0]
b = n[0][1]

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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())
if b<a:
    a-=1
print(a)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(result)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
numbers = input().split()
a = int(numbers[0])
b = int(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: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
if a==1:
    print(1)
elif a==2 and b<=1:
    print(1)
elif a==2 and b>=2:
    print(2)
elif a==3 and b<=2:
    print(2)
elif a==3 and b>=3:
    print(3)
elif a==4 and b<=3:
    print(3)
elif a==4 and b>=4:
    print(4)
elif a==5 and b<=4:
    print(4)
elif a==5 and b>=5:
    print(5)
elif a==6 and b<=5:
    print(5)
elif a==6 and b>=6:
    print(6)
elif a==7 and b<=6:
    print(6)
elif a==7 and b>=7:
    print(7)
elif a==8 and b<=7:
    print(7)
elif a==8 and b>=8:
    print(8)
elif a==9 and b<=8:
    print(8)
elif a==9 and b>=9:
    print(9)
elif a==10 and b<=9:
    print(9)
elif a==10 and b>=10:
    print(10)
elif a==11 and b<=10:
    print(10)
elif a==11 and b>=11:
    print(11)
elif a==12 and b<=11:
    print(11)
else:
    print(12)

Submission status: Accepted

Solution code:
# coding : utf-8

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

ans = 0
ans += a-1
if b >= a:
    ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

# 入力を各変数に格納
month, date = map(int, input().split())

if date >= month:
	print(month)
else:
	print(month - 1)

Submission status: Accepted

Solution code:
import math
import random
import heapq
from collections import Counter, defaultdict
from decimal import Decimal, ROUND_HALF_UP, ROUND_CEILING
from functools import lru_cache, reduce
from itertools import combinations_with_replacement, product, combinations


def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input()


def read_str_n():
    return list(map(str, input().split()))


def mt(f):
    import time
    import sys

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        print(e - s, 'sec', file=sys.stderr)
        return ret

    return wrap


@mt
def slv(a, b):

    c = a - 1

    if b >= a:
        c += 1
    return c


def main():
    a, b = read_int_n()
    print(slv(a, b))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

if B >= A: print(int(A))
else: print((int(A)-1))