Problem: You have a digit sequence S of length 4. You are wondering which of the following formats S is in:    * YYMM format: the last two digits of the year and the two-digit representation of the month (example: `01` for January), concatenated in this order   * MMYY format: the two-digit representation of the month and the last two digits of the year, concatenated in this order  If S is valid in only YYMM format, print `YYMM`; if S is valid in only MMYY format, print `MMYY`; if S is valid in both formats, print `AMBIGUOUS`; if S is valid in neither format, print `NA`.

Submission attempts (in order):
import bisect

lis = [1, 13]

str = input()
tp = int(str[:2])
bt = int(str[2:])

tplo = bisect.bisect_right(lis, tp)
btlo = bisect.bisect_right(lis, bt)

if tplo == 1:
    if btlo == 1:
        jd = 2
    else:
        jd = 1
else:
    if btlo == 1:
        jd = 0
    else:
        jd = 3

judge = ["YYMM", "MMYY", "AMBIGUOUS", "NA"]
print(tplo, btlo)
print(judge[jd])


import bisect

lis = [1, 12]

str = input()
tp = int(str[:2])
bt = int(str[2:])

tplo = bisect.bisect_right(lis, tp)
btlo = bisect.bisect_right(lis, bt)


if tp == 0:
    if bt == 1:
        jd = 3
    else:
        jd = 0
elif tp == 1:
    if bt == 1:
        jd = 2
    else:
        jd = 1
else:
    if bt == 1:
        jd = 0
    else:
        jd = 3

judge = ["YYMM", "MMYY", "AMBIGUOUS", "NA"]
print(judge[jd])

import bisect

lis[1, 12]

str = input()
tp = int(str[:2])
bt = int(str[2:])
if

tplo = bisect.bisect_right(lis, tp)
btlo = bisect.bisect_right(lis, bt)

if tp == 0:
    if bt == 1:
        jd = 3
    else:
        jd == 0
elif tp == 1:
    if bt == 1:
        jd == 2
    else:
        jd == 1
else:
    if bt == 1:
        jd == 0
    else:
        jd == 3

judge = ["YYMM", "MMYY", "AMBIGUOUS", "NA"]
print(judge[jd])


import bisect

lis = [1, 13]

str = input()
tp = int(str[:2])
bt = int(str[2:])

tplo = bisect.bisect_right(lis, tp)
btlo = bisect.bisect_right(lis, bt)

if tp == 1:
    if bt == 1:
        jd = 2
    else:
        jd = 1
else:
    if bt == 1:
        jd = 0
    else:
        jd = 3

judge = ["YYMM", "MMYY", "AMBIGUOUS", "NA"]
print(judge[jd])


import bisect

lis = [1, 13]

str = input()
tp = int(str[:2])
bt = int(str[2:])

tplo = bisect.bisect_right(lis, tp)
btlo = bisect.bisect_right(lis, bt)


if tp == 0:
    if bt == 1:
        jd = 1
    else:
        jd = 3
elif tp == 1:
    if bt == 1:
        jd = 2
    else:
        jd = 1
else:
    if bt == 1:
        jd = 0
    else:
        jd = 3

judge = ["YYMM", "MMYY", "AMBIGUOUS", "NA"]
print(judge[jd])


import bisect

lis[1, 12]

str = input()
tp = int(str[:2])
bt = int(str[2:])

tplo = bisect.bisect_right(lis, tp)
btlo = bisect.bisect_right(lis, bt)

if tp == 0:
    if bt == 1:
        jd = 3
    else:
        jd == 0
elif tp == 1:
    if bt == 1:
        jd == 2
    else:
        jd == 1
else:
    if bt == 1:
        jd == 0
    else:
        jd == 3

judge = ["YYMM", "MMYY", "AMBIGUOUS", "NA"]
print(judge[jd])


import bisect

lis = [1, 12]

str = input()
tp = int(str[:2])
bt = int(str[2:])

tplo = bisect.bisect_right(lis, tp)
btlo = bisect.bisect_right(lis, bt)

if tp == 0:
    if bt == 1:
        jd = 3
    else:
        jd == 0
elif tp == 1:
    if bt == 1:
        jd == 2
    else:
        jd == 1
else:
    if bt == 1:
        jd == 0
    else:
        jd == 3

judge = ["YYMM", "MMYY", "AMBIGUOUS", "NA"]
print(judge[jd])


import bisect

lis = [1, 13]

str = input()
tp = int(str[:2])
bt = int(str[2:])

tplo = bisect.bisect_right(lis, tp)
btlo = bisect.bisect_right(lis, bt)

if tplo == 1:
    if btlo == 1:
        jd = 2
    else:
        jd = 1
else:
    if btlo == 1:
        jd = 0
    else:
        jd = 3

judge = ["YYMM", "MMYY", "AMBIGUOUS", "NA"]

print(judge[jd])


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Accepted