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 sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    a, b = map(int, readline().split())
    if a>b:
        print(a-1)
    else:
        print(a)


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
tmp = input().split(" ")
month = int(tmp[0])
day = int(tmp[1])

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

Submission status: Accepted

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

cnt = a - 1
ans = cnt + 1 if a <= b else cnt
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:
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

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

Submission status: Accepted

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

if (day >= month):
    cnt = month
else:
    cnt = month - 1


print(cnt)

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

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

ans =  a - 1

if a <= b:
    ans += 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:
a,b = map(int,input().split())
ans =0
for A in range(1,a+1,1):
    for B in range(1,13,1):
        if A==B:
            if a > A or (a==A and b>=B):
                ans+=1
print(ans)

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

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

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(min(min(a,12)-1,min(max(b,a-1),31)-1)+1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# A - Day of Takahashi
a, b = map(int ,input().split())
ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

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

Submission status: Accepted

Solution code:
a,b = (int(X) for X in 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 b < a:
     print(a - 1)
 else:
     print(a)
main()

Submission status: Accepted

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


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
import sys, os, math, bisect, itertools, collections, heapq, queue
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal
from collections import defaultdict, deque

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


if __name__ == '__main__':
    main()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = list(map(int,input().split()))
print(a-1+(b//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:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

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

Submission status: Accepted

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

for i in range(1, 13):
    if (i > a) or ((i == a) and (i > b)):
        break
    ans = i
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:
import sys
a,b = map(int,input().split())

if not ( 1 <= a <= 12 and 1 <= b <= 31 ):
    sys.exit()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()


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

Submission status: Accepted

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

if a <= b:
    a += 1

print(a-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

# 1/1,2/2,3/3,4/4,5/5,6/6,7/7,8/8,9/9,10/10,11/11,12/12

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

Submission status: Accepted

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


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

else:
    sengetu = a - 1
    
print(sengetu)

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:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7

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

Submission status: Accepted

Solution code:
#n=int(input())
a,b=map(int,input().split())
#l=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]
ans=a-1
for day in range(1,b+1):
    if a==day :
        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:
def main():
    a, b = map(int, input().split())
    if a == b:
        print(a)
    elif b > a:
        print(a)
    else:
        print(a - 1)
main()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

a, b = lr()
answer = a - 1
if b >= a:
    answer += 1
print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
ans = 0
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:
import sys, re
from math import ceil, floor, sqrt, pi, factorial#, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7

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

    if a > b:
        a-= 1

    print(a)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def actual(a, b):
    if a <= b:
        return a

    return a - 1

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

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split()]
     
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 b < a:
    print(a-1)
else:
    print(a)

Submission status: Accepted

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

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-1 + int(a<=b))

Submission status: Accepted

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

Submission status: Accepted

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

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:
from sys import stdin
A, B = [int(x) for x in stdin.readline().rstrip().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:
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(b)
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-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())

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())
ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# main
# -------------------------------------------------------------
A,B = map(int,input().split())

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

Submission status: Accepted

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

import sys
# import time
# import math
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
# import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)



def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1             # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    a, b = mi()
    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:
x = input().split()
a = int(x[0])
b = int(x[1])
count = a
if a > b:
  count -= 1
print(count)

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

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())
print(a-1 if a > b else 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:
#import numpy as np
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial#, gcd
from bisect import bisect_left #bisect_left(list, value)
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
pri = lambda x: print(*x, sep='\n')

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

if N <= K:
    print(N)
else:
    print(N-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(x) for x in input().split()]
print(a if a <= b else a - 1)

Submission status: Accepted

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

Submission status: Accepted

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

resolve()

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

a, b = mi()

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:
# -*- coding: utf-8 -*-
"""
Created on Wed May 13 17:17:53 2020

@author: shinba
"""

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

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