TnT/Multi_CodeNet4Repair huggingface dataset:
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):
yymm = input()

if 1 <= int(yymm[0:2]) and int(yymm[0:2]) <= 12 or 1 <= int(yymm[2:4]) and int(yymm[2:4]) <= 12:
    print('AMBIGUOUS')
elif (1 <= int(yymm[0:2]) and int(yymm[0:2])) <= 12 and int(yymm[2:4]) <= 99:
    print('YYMM')
elif int(yymm[0:2]) <= 99 and 1 <= (int(yymm[2:4]) and int(yymm[2:4]) <= 12):
    print('MMYY')
else:
    print('NA')

yymm = input()

if 1 <= int(yymm[0:2]) and int(yymm[0:2]) <= 12 and 1 <= int(yymm[2:4]) and int(yymm[2:4]) <= 12:
    print('AMBIGUOUS')
elif (1 <= int(yymm[0:2]) and int(yymm[0:2])) <= 12 and int(yymm[2:4]) <= 99:
    print('YYMM')
elif int(yymm[0:2]) <= 99 and 1 <= (int(yymm[2:4]) and int(yymm[2:4]) <= 12):
    print('MMYY')
else:
    print('NA')

yymm = input()

if (1 <= int(yymm[0:2]) and int(yymm[0:2]) <= 12) and (1 <= int(yymm[2:4]) and int(yymm[2:4]) <= 12):
    print('AMBIGUOUS')
elif (1 <= int(yymm[0:2]) and int(yymm[0:2]) <= 12) and int(yymm[2:4]) <= 99:
    print('MMYY')
elif int(yymm[0:2]) <= 99 and (1 <= int(yymm[2:4]) and int(yymm[2:4]) <= 12):
    print('YYMM')
else:
    print('NA')

Verdicts: Wrong Answer

Wrong Answer

Accepted
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):
a,a,b,b = str(input())

if 1<=int(a+a)<=12 and 1<=int(b+b)<=12:
  print("AMBIGUOUS")
elif 1<=int(a+a)<=12:
  print("MMYY")
elif 1<=int(b+b)<=12:
  print("YYMM")
else:
  print("NA")


a,b,c,d = str(input())

if 1<=int(a+b)<=12 and 1<=int(c+d)<=12:
  print("AMBIGUOUS")
elif 1<=int(a+b)<=12 
  print("MMYY")
elif 1<=int(c+d)<=12 
  print("YYMM")
else:
  print("NA")


a,a,b,b = str(input())

if 1<=int(a+a)<=12 and 1<=int(b+b)<=12:
  print("AMBIGUOUS")
elif 1<=int(a+a)<=12 and int(b+b)>12 or int(b+b)==0:
  print("MMYY")
elif 1<=int(b+b)<=12 and int(a+a)>12 or int(a+a)==0:
  print("YYMM")
else:
  print("NA")

a,b,c,d = str(input())

if 1<=int(a+b)<=12 and 1<=int(c+d)<=12:
  print("AMBIGUOUS")
elif 1<=int(a+b)<=12: 
  print("MMYY")
elif 1<=int(c+d)<=12: 
  print("YYMM")
else:
  print("NA")


Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
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):
s  = input()
a = int(s[:2])
b = int(s[2:])
print(s[:2], a, s[2:], b)
is_MMxx = is_xxMM = False
if 13 > a > 0:
  is_MMxx = True
if 13 > b > 0:
  is_xxMM = True
if is_MMxx and is_xxMM:
  print("AMBIGUOUS")
elif is_MMxx:
  print("MMYY")
elif is_xxMM:
  print("YYMM")
else:
  print("NA")

s  = input()
a = int(s[:2])
b = int(s[2:])
print(s[:2], a, s[2:], b)
is_MMxx = is_xxMM = False
if 13 > a > 0:
  is_MMxx = True
if 13 > b > 0:
  is_xxMM = True
if is_MMxx and is_xxMM:
  print("AMBIGUOUS")
elif is_MMxx:
  print("MMYY")
elif is_xxMM:
  print("YYMM")
else:
  print("NA")

s  = input()
a = int(s[:2])
b = int(s[2:])
is_MMxx = is_xxMM = False
if 13 > a > 0:
  is_MMxx = True
if 13 > b > 0:
  is_xxMM = True
if is_MMxx and is_xxMM:
  print("AMBIGUOUS")
elif is_MMxx:
  print("MMYY")
elif is_xxMM:
  print("YYMM")
else:
  print("NA")

Verdicts: Wrong Answer

Wrong Answer

Accepted
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):
s = input()
a = int(s[:2])
b = int(s[2:])
if a <= 12 && a > 0:
	if b <=12 && b > 0:
		print('AMBIGUOUS')
	else:
		print('MMYY')
else:
	if b <=12 && b > 0:
		print('YYMM')
	else:
		print('NA')

s = input()
a = int(s[:2])
b = int(s[2:])
if a <= 12 && a > 0:
	if b <=12 and b > 0:
		print('AMBIGUOUS')
	else:
		print('MMYY')
else:
	if b <=12 and b > 0:
		print('YYMM')
	else:
		print('NA')

s = input()
a = int(s[:2])
b = int(s[2:])
if a <= 12 and a > 0:
	if b <=12 and b > 0:
		print('AMBIGUOUS')
	else:
		print('MMYY')
else:
	if b <=12 and b > 0:
		print('YYMM')
	else:
		print('NA')

Verdicts: Runtime Error

Runtime Error

Accepted
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):
S = [i for i in input()]
mae = S[0]+S[1]
ushiro = S[2]+S[3]
mmyy = False
yymm = False
if int(mae)>0 and int(mae)<=12:
    mmyy = True
elif int(ushiro)>0 and int(ushiro)<=12:
    yymm = True

if mmyy and yymm:
    print("AMBIGUOUS")
elif mmyy and yymm==False:
    print("MMYY")
elif mmyy==False and yymm==False:
    print("YYMM")
else:
    print("NA")

S = [i for i in input()]
mae = S[0]+S[1]
ushiro = S[2]+S[3]
mmyy = True if int(mae)>0 and int(mae)<=12 else False
yymm = True if int(ushiro)>0 and int(ushiro)<=12 else False

if mmyy==True and yymm==True:
    print("AMBIGUOUS")
elif mmyy==True and yymm==False:
    print("MMYY")
elif mmyy==False and yymm==True:
    print("YYMM")
else:
    print("NA")

Verdicts: Wrong Answer

Accepted
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):
# ABC126B - YYMM or MMYY
s = input()
x, y = int(s[:2]), int(s[2:])
if x = 0 or y = 0:
    print("NA")
elif 1 <= x <= 12 and 1 <= y <= 12:
    print("AMBIGUOUS")
elif 1 <= x <= 12 and y <= 31:
    print("MMYY")
elif x <= 31 and 1 <= y <= 12:
    print("YYMM")
else:
    print("NA")

# ABC126B - YYMM or MMYY
s = input()
x, y = int(s[:2]), int(s[2:])
if 1 <= x <= 12:
    if 1 <= y <= 12:
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if 1 <= y <= 12:
        print("YYMM")
    else:
        print("NA")

Verdicts: Runtime Error

Accepted
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):
s = input()
aa = int(s[:2])
bb = int(s[2:])

if 0<aa and aa<=12:
  if 0<bb and bb<=12:
    print('AMBIGUOUS')
  elif bb==0:
    print('NA')
  else:
    print('MMYY')
elif aa!=0:
  0<bb and bb<=12:
  print('YYMM')
else:
  print('NA')


s = input()
aa = int(s[:2])
bb = int(s[2:])

if 0<aa and aa<=12:
  if 0<bb and bb<=12:
    print('AMBIGUOUS')
  else:
    print('MMYY')
else:
  if 0<bb and bb<=12:
    print('YYMM')
  else:
    print('NA')

Verdicts: Runtime Error

Accepted
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):
S=input()

left=int(S[:2])
right=int(S[2:])

YYMM=True
MMYY=True
AMBIGUOUS=True
NA=True


if leftL<=0 or left>12:
  MMYY=False
  AMBIGUOUS=False
else:
  NA=False
  
if right<=0 or right>12:
  YYMM=False
  AMBIGUOUS=False
else:
  NA=False

if YYMM==True:
  if MMYY==True:
    print("AMBIGOUS")
  else:
    print("YYMM")
else:
  if MMYY==True:
    print("MMYY")
  else:
    print("NA")

S=input()

left=int(S[:2])
right=int(S[2:])

YYMM=True
MMYY=True
AMBIGUOUS=True
NA=True


if left==0:
  MMYY=False
  AMBIGUOUS=False
elif left>12:
  MMYY=False
  AMBIGUOUS=False
else:
  NA=False
  
if right==0:
  YYMM=False
  AMBIGUOUS=False
elif left>12:
  YYMM=False
  AMBIGUOUS=False
else:
  NA=False

if YYMM==True:
  if MMYY==True:
    print("AMBIGOUS")
  else:
    print("YYMM")
else:
  if MMYY==True:
    print("MMYY")
  else:
    print("NA")

S=input()

left=int(S[:2])
right=int(S[2:])

YYMM=True
MMYY=True
AMBIGUOUS=True
NA=True


if left<=0 or left>12:
  MMYY=False
  AMBIGUOUS=False
else:
  NA=False
  
if right<=0 or right>12:
  YYMM=False
  AMBIGUOUS=False
else:
  NA=False


if YYMM==True:
  if MMYY==True:
    print("AMBIGUOUS")
  else:
    print("YYMM")
else:
  if MMYY==True:
    print("MMYY")
  else:
    print("NA")

Verdicts: Runtime Error

Wrong Answer

Accepted
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):
#YYMM, MMYY, AMBIGUOUS, NA
S = str(input())

s0 = int(S[0:2])
s1 = int(S[2:])

if s0>12:#YYMM or NA
    if s1>12:
        ans=="NA"
    else:
        ans=="YYMM"
elif s1>12:#MMYY
    ans="MMYY"
else:
    ans="AMBIGUOUS"
    
print(ans)

#YYMM, MMYY, AMBIGUOUS, NA
S = str(input())

s0 = int(S[0:2])
s1 = int(S[2:])

if s0>12:#YYMM or NA
    if s1>12:
        ans=="NA"
    else:
        ans=="YYMM"
elif s1>12:#MMYY
    ans="MMYY"
else:
    "AMBIGUOUS"
    
print(ans)

#YYMM, MMYY, AMBIGUOUS, NA
S = str(input())

s0 = int(S[0:2])
s1 = int(S[2:])

if s0>12 or s0==0:#YYMM or NA
    if s1>12 or s1==0:
        ans="NA"
    else:
        ans="YYMM"
elif s1>12 or s1==0:#MMYY
    ans="MMYY"
else:
    ans="AMBIGUOUS"
    
print(ans)

Verdicts: Runtime Error

Runtime Error

Accepted
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):
s = input()
n1 = int(s[:2])
n2 = int(s[2:])
if 1 <= n1 <= 12 and 1 <= n2 <= 12:
  print("AMBIGUOUS)
elif (n1 > 12 or n1 == 0) and 1 <= n2 <= 12:
  print("YYMM")
elif (n2 > 12 or n2 == 0) and 1 <= n1 <= 12:
  print("MMYY")
else:
  print("NA")

s = input()
n1 = int(s[:2])
n2 = int(s[2:])
if 1 <= n1 <= 12 and 1 <= n2 <= 12:
  print("AMBIGUOUS")
elif (n1 > 12 or n1 == 0) and 1 <= n2 <= 12:
  print("YYMM")
elif (n2 > 12 or n2 == 0) and 1 <= n1 <= 12:
  print("MMYY")
else:
  print("NA")


Verdicts: Runtime Error

Accepted
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):
s = input()

b = int(s[:2])
a = int(s[2:])

print(b)
print(a)

def yorm(i):
    flag = 'none'
    if 0<i<12:
        flag = 'MM'
    elif i<100:
        flag = 'YY'
    return flag
   
ans = bf+af
if len(ans) != 4:
    ans = 'NA'
if ans == 'MMMM':
    ans = 'AMBIGUOUS'
if ans == 'YYYY':
    ans = 'NA'
print(ans)

s = input()

b = int(s[:2])
a = int(s[2:])

def yorm(i):
    flag = 'none'
    if 0<i<=12:
        flag = 'MM'
    elif i<100:
        flag = 'YY'
    return flag

bf = yorm(b)
af = yorm(a)
   
ans = bf+af
if len(ans) != 4:
    ans = 'NA'
if ans == 'MMMM':
    ans = 'AMBIGUOUS'
if ans == 'YYYY':
    ans = 'NA'
print(ans)

Verdicts: Runtime Error

Accepted
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):
s = int(input())
a = int(s / 100)
b = s % 100
print(a, b)

if a > 0 and a < 13 and a > 0 and a < 13:
    print("AMBIGUOUS")
elif a > 0 and a < 13:
    print("MMYY")
elif b > 0 and b < 13:
    print("YYMM")
else:
    print("NA")


s = input()
a = int(s[0:2])
b = int(s[2:4])

if a > 0 and a < 13 and b > 0 and b < 13:
    print("AMBIGUOUS")
elif a > 0 and a < 13:
    print("MMYY")
elif b > 0 and b < 13:
    print("YYMM")
else:
    print("NA")


Verdicts: Wrong Answer

Accepted
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):
s=input()
former,latter=int(s[:2]),int(s[2:])


def decide(x):
    if x==0 or 13<=x<=99:
        return 0  
    elif 1<=x<=12:
        return 1  
f=decide(former)
l=decide(latter)
print(f,l)
if f==0 and l==1:
    print('YYMM')
elif f==1 and l==0:
    print('MMYY')
elif f==0 and l==0:
    print('NA')
else:
    print('AMBIGUOUS')

s=input()
former,latter=int(s[:2]),int(s[2:])


def decide(x):
    if x==0 or 13<=x<=99:
        return 0  
    elif 1<=x<=12:
        return 1  
f=decide(former)
l=decide(latter)
if f==0 and l==1:
    print('YYMM')
elif f==1 and l==0:
    print('MMYY')
elif f==0 and l==0:
    print('NA')
else:
    print('AMBIGUOUS')

Verdicts: Wrong Answer

Accepted
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):
s = input()

a = int(s[:2])
b = int(s[2:])

if a == 0 and b == 0
  print("NA")
elif a > 12 and b <= 12:
  print("YYMM")
elif a <= 12 and b > 12:
  print("MMYY")
elif a <= 12 and b <= 12: 
  print("AMBIGUOUS")
else:
  print("NA")  

s = input()

a = int(s[:2])
b = int(s[2:])

print(a,b)

if a == 0 or b == 0:
  print("NA")
elif a > 12 and b <= 12:
  print("YYMM")
elif a <= 12 and b > 12:
  print("MMYY")
else:
  print("AMBIGUOUS")

s = input()

a = int(s[:2])
b = int(s[2:])

if (a == 00 or a > 12) and b <= 12 and b >= 1:
  print("YYMM")
elif a <= 12 and a >= 1 and (b == 00 or b > 12):
  print("MMYY")
elif a <= 12 and a >= 1 and b <= 12 and b >= 1:
  print("AMBIGUOUS")
else:
  print("NA")

Verdicts: Runtime Error

Wrong Answer

Accepted
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):
s=(input())
s1=int(s[:2])
s2=int(s[2:])
g = ""
if 1<= s1 <=12 and 1<= s2 <= 12:
    g = "AMBIGUOUS"
 
if 0<= s1 <=99 and 1<= s2 <= 12:
    g = "YYMM"
 
if 1<= s1 <=12 and 0<= s2 <= 99:
    g = "MMYY"
 
else:
    g = "NA"

s=(input())
s1=int(s[:2])
s2=int(s[2:])
 
if 1<= s1 <=12 and 1<= s2 <= 12:
    print("AMBIGUOUS")
 
elif 0<= s1 <=99 and 1<= s2 <= 12:
    print("YYMM")
 
elif 1<= s1 <=12 and 0<= s2 <= 99:
    print("MMYY")
 
else:
    print("NA")

Verdicts: Wrong Answer

Accepted
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):
s=input()
be=s[:2]
af=s[2:]

if s=="0000":
  print("NA")

elif int(be)<=12 and int(af)<=12 and be!="00" and af!=="00":
  print("AMBIGUOUS")

elif int(af)<=12:
  if af=="00":
    print("NA")
  else:
    print("YYMM")
    
elif int(be)<=12:
  if be=="00":
    print("NA")
  else:
    print("MMYY")
  
else:
  print("NA")

s=input()
be=s[:2]
af=s[2:]

if s=="0000":
  print("NA")
  
if be=="00" or af=="00":
  if int(af)<=12:
    if af=="00":
      print("NA")
    else:
      print("YYMM")
      
  elif int(be)<=12:
  if be=="00":
    print("NA")
  else:
    print("MMYY")

elif int(be)<=12 and int(af)<=12:   
    print("AMBIGUOUS")
  
else:
  print("NA")

s=input()
be=s[:2]
af=s[2:]

if s=="0000":
  print("NA")

elif int(be)<=12 and int(af)<=12 and be!="00" and af!="00":
  print("AMBIGUOUS")

elif int(af)<=12 and af!="00":
    print("YYMM")
    
elif int(be)<=12 and be!="00":
    print("MMYY")
  
else:
  print("NA")

Verdicts: Runtime Error

Runtime Error

Accepted
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):
s = input()
s1, s2 = s[:2],s[2:]
if s1>'12' and s2>'12':
    print('NA')
elif s1<='12' and s2<='12':
    if s1 == '00' and s2!='00':
        print('YYMM')
    elif s2 == '00' and s1!='00':
        print('MMYY')
    elif s1 =='00' and s2 =='00':
        print('NA')
    else :
        print('AMBIGUOUS')
elif s1<='12' and s2>'12':
    print('NA' if s1 == '00' else 'MMYY1')   
elif s2<='12' and s1>'12':
    print('NA' if s2 == '00' else 'YYMM1')
else:
    print('NA')

s = input()
s1, s2 = s[:2],s[2:]
if s1>'12' and s2>'12':
    print('NA')
elif s1<='12' and s2<='12':
    if s1 == '00' and s2!='00':
        print('YYMM')
    elif s2 == '00' and s1!='00':
        print('MMYY')
    elif s1 =='00' and s2 =='00':
        print('NA')
    else :
        print('AMBIGUOUS')
elif s1<='12' and s2>'12':
    print('NA' if s1 == '00' else 'MMYY')   
elif s2<='12' and s1>'12':
    print('NA' if s2 == '00' else 'YYMM')
else:
    print('NA')

Verdicts: Wrong Answer

Accepted
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):
S = input()

s1 = int(S[:2])
s2 = int(S[2:])

print(s1, s2)

if(s1 > 32):
    print('YYMM')
elif(s2 > 32):
    print('MMYY')
else:
    print('AMBIGUOUS')

S = input()

s1 = int(S[:2])
s2 = int(S[2:])

print(s1, s2)

if(s1 <= 12 and s2 <= 12 and s1 is not 0 and s2 is not 0):
    print('AMBIGUOUS')
elif(s1 <= 12 and s2 > 12 and s1 is not 0):
    print('MMYY')
elif(s1 > 12 and s2 <= 12 and s2 is not 0):
    print('YYMM')
else:
    print('NA')

S = input()

s1 = int(S[:2])
s2 = int(S[2:])

if(s1 <= 12 and s2 <= 12 and s1 is not 0 and s2 is not 0):
    print('AMBIGUOUS')
elif(s1 <= 12 and s2 > 12 and s1 is not 0):
    print('MMYY')
elif(s1 > 12 and s2 <= 12 and s2 is not 0):
    print('YYMM')
elif(s1 is 0 and s2 <= 12 and s2 is not 0):
    print('YYMM')
elif(s1 <= 12 and s2 is  0 and s1 is not 0):
    print('MMYY')
else:
    print('NA')


Verdicts: Wrong Answer

Wrong Answer

Accepted
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):
s=input()
a=int(s[:2])
b=int(s[2:])

if a>=13 and b>=1 and b<=12:
  print("YYMM")
elif a==0 and b>=1 and b<=12:
  print("YYMM")  
elif a>=1 and a<=12 and b>=13:
  print("MMYY")
elif a>=1 and a<=12 and b==0:
  print("MMYY")
elif a>=1 and a<=12 b>=1 and b<=12:
  print("AMBIGUOUS")
else:
  print("NA")


s=input()
a=int(s[:2])
b=int(s[2:])
if a>=13 and b>=1 and b<=12:
  print("YYMM")
elif a>=1 and a<=12 and (b==0 or b>=13):
  print("MMYY")
elif a>=1 and a<=12 b>=1 and b<=12:
  print("AMBIGUOUS")
else:
  print("NA")

s=input()
a=int(s[0]+s[1])
b=int(s[2]+s[3])

if a>=13 and b>=1 and b<=12:
  print("YYMM")
elif a==0 and b>=1 and b<=12:
  print("YYMM")  
elif a>=1 and a<=12 and b>=13:
  print("MMYY")
elif a>=1 and a<=12 and b==0:
  print("MMYY")
elif a>=1 and a<=12 and b>=1 and b<=12:
  print("AMBIGUOUS")
else:
  print("NA")


Verdicts: Runtime Error

Runtime Error

Accepted
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):
a=input()
s=[(int(a[0])*10)+int(a[1]),(int(a[2])*10)+int(a[3])]

if s[1]==0: and s[0]>=13:
  print("NA")
elif s[0]>=13 and s[1]>=13:
  print("NA")
elif 1<=s[0]<=12 and 1<=s[1]<=12:
  print("AMBIGUOUS")
elif s[0]==0 or  s[0]>=13 and 1<=s[1]<=12:
  print("YYMM")
elif 1<=s[0]<=12 and s[1]==0 or s[1]>=13:
  print("MMYY")

a=input()
s=[(int(a[0])*10)+int(a[1]),(int(a[2])*10)+int(a[3])]

if s[0]>=13 or s[0]==0 and s[1]==0:
  print("NA")
elif s[0]>=13 and s[1]>=13:
  print("NA")
elif 1<=s[0]<=12 and 1<=s[1]<=12:
  print("AMBIGUOUS")
elif s[0]==0 or  s[0]>=13 and 1<=s[1]<=12:
  print("YYMM")
elif 1<=s[0]<=12 and s[1]==0 or s[1]>=13:
  print("MMYY")

a=input()
s=[(int(a[0])*10)+int(a[1]),(int(a[2])*10)+int(a[3])]

if s[0]>=13 and s[1]==0:
  print("NA")
elif s[0]==0 and s[1]==0:
  print("NA")
elif s[0]>=13 and s[1]>=13:
  print("NA")
elif 1<=s[0]<=12 and 1<=s[1]<=12:
  print("AMBIGUOUS")
elif s[0]>=13 and 1<=s[1]<=12:  
  print("YYMM")
elif s[0]==0 and 1<=s[1]<=12:
  print("YYMM")
elif 1<=s[0]<=12 and s[1]==0:
  print("MMYY")
elif 1<=s[0]<=12 and s[1]>=13:
  print("MMYY")

Verdicts: Runtime Error

Wrong Answer

Accepted
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):
S = input()

mae = int(S[:2])
ato = int(S[2:])

if mae <= 12 and ato <= 12:
    print("AMBIGUOUS")
elif mae > 12 and ato <= 12 and ato == "00":
    print("YYMM")
elif mae <= 12 and ato > 12 and mae == "00":
    print("MMYY")
else: 
    print("NA")

S = input()
#print(S)

mae = int(S[:2])
ato = int(S[2:])


if (mae >= 13 or mae == 0) and (ato <= 12 and ato != 0):
    print('YYMM')
elif (mae <= 12 and mae != 0) and (ato >= 13 or ato == 0):
    print('MMYY')
elif (mae <= 12 and ato <= 12) and (mae != 0 or ato != 0):
    print('AMBIGUOUS')
else:
    print('NA')

Verdicts: Wrong Answer

Accepted
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):
s = input()
s1 = s[0:1]
s2 = s[2:3]

i1 = int(s1)
i2 = int(s2)

if i1 = 0 or i2 = 0: res =NA
if i1 <=12:
	if i2 <= 12:
		res = "AMBIGUOUS"
    else:
      	res = "MMYY"
elif 12 < i1:
  	if i2 <= 12:
      	res = "YYMM"
    else:
      	res = NA
        
print(res)

s = input()
s1 = s[0:2]
s2 = s[2:4]

i1 = int(s1)
i2 = int(s2)
 
if 1 <= i1 <=12 and 1 <= i2 <= 12:
    res = "AMBIGUOUS"
elif 1 <= i1 <= 12:
    res = "MMYY"
elif 1 <= i2 <= 12:
    res = "YYMM"
else:
    res = "NA"

print(res)


Verdicts: Runtime Error

Accepted
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):
x=input()
a=x[:2]
b=x[2:]
ans_lst=[]
for y in [a,b]:
	if "00"<y<"13":
  		ans_lst.append(True)
    else:ans_lst.append(False)
if all(ans_lst):
    print("AMBIGUOUS")
elif not any(ans_lst):
    print("NA")
elif ans_lst[0] and ans_lst[1]==False:
	print("MMYY")
elif ans_lst[0]==False and ans_lst[1]:
	print("YYMM")

x=input()
a=x[:2]
b=x[2:]
ans_lst=[]
for y in [a,b]:
	if "00"<y<"13":
		ans_lst.append(True)
	else:ans_lst.append(False)
if all(ans_lst):
    print("AMBIGUOUS")
elif not any(ans_lst):
    print("NA")
elif ans_lst[0] and ans_lst[1]==False:
	print("MMYY")
elif ans_lst[0]==False and ans_lst[1]:
	print("YYMM")


Verdicts: Runtime Error

Accepted
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):
s=str(input())
a,b=int(s[:2]),int(s[2:])
print(a,b)
if (a>12 and b>12) or min(a,b)==0 :
  print("NA")
elif a>12 and b<12:
  print("YYMM")
elif a<12 and b>12:
  print("MMYY")
else:
  print("AMBIGUOUS")

s=str(input())
a,b=int(s[:2]),int(s[2:])
f,g= 1<=a and a<=12, 1<=b and b<=12
if f and g:
  print("AMBIGUOUS")
elif f:
  print("MMYY")
elif g:
  print("YYMM")
else:
  print("NA")

Verdicts: Wrong Answer

Accepted
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):
s=list(input())
u=[int(s[0]+s[1]),int(s[2]+s[3])]
if(u[0]<=12):
    m1=1
    if(u[1]<=12):
        m2=1
    else:
        m2=0
else:
    m1=0
    if(u[1]<=12):                                                                                                                           m2=1                                                                                                                            else:
        m2=0
if(m1==1 and m2==0):
    print('MMYY')                                                                                                                   elif(m1==1 and m2==1):
    print('AMBIGUOUS')
elif(m1==0 and m2==0):
    print('NA')
else:
    print('YYMM')

s=list(input())
u=[int(s[0]+s[1]),int(s[2]+s[3])]
if(0<u[0]<=12):
    m1=1
    if(0<u[1]<=12):                                                                                                                                                                                                    m2=1
    else:
        m2=0
else:
    m1=0
    if(0<u[1]<=12):
        m2=1
    else:
        m2=0
if(m1==1 and m2==0):
    print('MMYY')
elif(m1==1 and m2==1):
    print('AMBIGUOUS')
elif(m1==0 and m2==0):
    print('NA')
else:
    print('YYMM')

Verdicts: Runtime Error

Accepted
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):
def Check_Year(year):
    if str(year).isdecimal() :
        return 1
    else:
        return 0

def Check_Month(month):
    if 0 < month < 12:
        return 1
    else:
        return 0

input_data = list(input())
head_chrs = int(input_data[0] + input_data[1])
tail_chrs = int(input_data[2] + input_data[3])

print(input_data)

# check for YYMM format
result1 = Check_Year(head_chrs) + Check_Month(tail_chrs)
print('result1: ' , result1)
# Check for MMYY format
result2 = Check_Year(tail_chrs) + Check_Month(head_chrs)
print('result2: ' , result2)

if result1 == 2 and result2 == 2 :
    print('AMBIGUOUS')
elif result1 == 2 and result2 != 2 :
    print('YYMM')
elif result1 != 2 and result2 == 2 :
    print('MMYY')
else :
    print('NA')

def Check_Year(year):
    if str(year).isdecimal() :
        return 1
    else:
        return 0

def Check_Month(month):
    if 0 < month < 13:
        return 1
    else:
        return 0

input_data = list(input())
head_chrs = int(input_data[0] + input_data[1])

tail_chrs = int(input_data[2] + input_data[3])


# print(input_data)

# check for YYMM format
result1 = Check_Year(head_chrs) + Check_Month(tail_chrs)
# print('result1: ' , result1)
# Check for MMYY format
result2 = Check_Year(tail_chrs) + Check_Month(head_chrs)
# print('result2: ' , result2)

if result1 == 2 and result2 == 2 :
    print('AMBIGUOUS')
elif result1 == 2 and result2 != 2 :
    print('YYMM')
elif result1 != 2 and result2 == 2 :
    print('MMYY')
else :
    print('NA')



Verdicts: Wrong Answer

Accepted
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):
n = input()
a = int(n[0:2])
b = int(n[2:])
if a > 12 and b > 12:
  print('NA')
elif a 
elif a > 12 and b <= 12:
  print('YYMM')
elif a <= 12 and b > 12:
  print('MMYY')
else:
  print('AMBIGUOUS')

n = input()
a = int(n[0:2])
b = int(n[2:])
if 1 <= a <= 12 and 1 <= b <= 12:
	print('AMBIGUOUS')
elif 1 <= a <= 12 and b > 12:
	print('MMYY')
elif 1 <= b <= 12 and a > 12:
	print('YYMM')
else:
print('NA')


n = input()
a = int(n[:2])
b = int(n[2:])
if 1 <= a <= 12 and 1 <= b <= 12:
	print('AMBIGUOUS')
elif 1 <= a <= 12:
	print('MMYY')
elif 1 <= b <= 12:
	print('YYMM')
else:
	print('NA')

Verdicts: Runtime Error

Runtime Error

Accepted
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):
s = input()

l = 0<int(s[:2])<13
r = 0<int(s[2:])<13

if l = 1:
  print('AMBIGUOUS' if r = 1 else 'MMYY')
else:
  print('YYMM' if r = 1 else 'NA')

s=input()
print(['NA','YYMM','MMYY','AMBIGUOUS'][(0<int(s[:2])<13)*2+(0<int(s[2:])<13)])

Verdicts: Runtime Error

Accepted
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):
# #!/usr/bin/env python3
# # -*- coding: utf-8 -*-


def main():
    S = input()

    first = int(S[:2])
    second = int(S[2:])

    if first == 0 or second == 0:
        print('NA')
    elif first > 0 and second > 0:
        print('NA')
    elif first > 12 and second <= 12:
        print('YYMM')
    elif first <= 12 and second > 12:
        print('MMYY')
    else:
        print('AMBIGUOUS')


if __name__ == "__main__":
    main()


# #!/usr/bin/env python3
# # -*- coding: utf-8 -*-


def main():
    S = input()

    first = int(S[:2])
    second = int(S[2:])

    if 0 < first <= 12 and 0 < second <= 12:
        print('AMBIGUOUS')
    elif 0 < first <= 12:
        print('MMYY')
    elif 0 < second <= 12:
        print('YYMM')
    else:
        print('NA')


if __name__ == "__main__":
    main()


Verdicts: Wrong Answer

Accepted
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):
s=input()
year=int(s[:2])
month=int(s[2:])
judge_YYMM=False
judge_MMYY=False
judge_YYMM==True if 1<=month<=12 else judge_YYMM==False
judge_MMYY==True if 1<=year<=12 else judge_MMYY==False
if judge_YYMM:
        if judge_MMYY:
                print("AMBIGUOUS")
        else:
                print("YYMM")
else:
        if judge_MMYY:
                print("MMYY")
        else:
                print("NA")

s=input()
A=int(s[:2])
B=int(s[2:])
if 1<=A<=12 and 1<=B<=12:
        print("AMBIGUOUS")
elif 1<=A<=12:
        print("MMYY")
elif 1<=B<=12:
        print("YYMM")
else:
        print("NA")
        

Verdicts: Wrong Answer

Accepted
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):
# YYMM or MMYY
S = int(input())

A = S // 100
B = S - (A* 100)

if 1 <= A <=12:
    if 13 <= B <=99 or B == 0:
        print('YYMM')
    else : #1 <= B <= 12
        print('AMBIGUOUS')
elif 1 <= B <= 12:
    if 13 <= A <=99 or A == 0:
        print('MMYY')
    else : #1 <= B <= 12
        print('AMBIGUOUS')
else:
    print("NA")


# YYMM or MMYY
S = int(input())

A = S // 100
B = S - (A* 100)

if 1 <= A <= 12:
    if 13 <= B <= 99 or B == 0:
        print('MMYY')
    else:  #1 <= B <= 12
        print('AMBIGUOUS')
elif 1 <= B <= 12:
    if 13 <= A <=99 or A == 0:
        print('YYMM')
    else: #1 <= B <= 12
        print('AMBIGUOUS')
else:
    print("NA")


Verdicts: Wrong Answer

Accepted
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):
def determin_format(A, B):
    if 0 <= A <= 12 and 0 <= B <= 12:
        return "AMBIGUOUS"
    
    elif 0 < A <= 12:
        return "MMYY"
    
    elif 0 < B <= 12:
        return "YYMM"
    
    else: 
        return  "NA"

S = input()

A = int(S[:2])
B = int(S[2:])

determin_format(A,B)

def determin_format(A, B):
    if 0<  A <= 12:
        if 0 <  B <= 12:
            return "AMBIGUOUS"
        else:
            return "MMYY"
    
    else:
        if 0 <  B <= 12:
            return "YYMM"
        else: 
            return  "NA"

S = input()

A = int(S[:2])
B = int(S[2:])

print(determin_format(A,B))

Verdicts: Wrong Answer

Accepted
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):
s=input()
if 0<int(s[:2])<=12 and 0<int(s[2:])<=12:
    print("AMBIGUOUS")
elif 0<int(s[:2])<=12:
    print("YYMM")
elif 0<int(s[2:])<=12:
    print("MMYY")
else:
    print("NA")

s=input()
if 0<int(s[:2])<=12 and 0<int(s[2:])<=12:
    print("AMBIGUOUS")
elif 0<int(s[:2])<=12:
    print("MMYY")
elif 0<int(s[2:])<=12:
    print("YYMM")
else:
    print("NA")

Verdicts: Wrong Answer

Accepted
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):
inp=input()
former=int(inp[0]+inp[1])
latter=int(inp[2]+inp[3])

if 0=< former <=12 and 0=< latter <=12:
	print("AMBIGUOUS")
elif 0=< former <=12 and 12=< latter:
	print("MMYY")
elif 0=< latter <=12 and 12=< former:
	print("YYMM")

else:
	print("NA")

former=int(inp[0]+inp[1])
latter=int(inp[2]+inp[3])

if 0=< former <=12 and 0=< latter <=12:
	print("AMBIGUOUS")
elif 0=< former <=12 and 12=< latter:
	print("MMYY")
elif 0=< latter <=12 and 12=< former:
	print("YYMM")

else:
	print("NA")

inp=input()
former=int(inp[0]+inp[1])
latter=int(inp[2]+inp[3])

if 0=< former <=12 and 0=< latter <=12:
	print("AMBIGUOUS")
elif 0=< former <=12 and 12< latter:
	print("MMYY")
elif 0=< latter <=12 and 12< former:
	print("YYMM")

else:
	print("NA")

inp=input()
former=int(inp[0]+inp[1])
latter=int(inp[2]+inp[3])

if 0< former <=12 and 0< latter <=12:
	print("AMBIGUOUS")
elif 0< former <=12 :
	print("MMYY")
elif 0< latter <=12 :
	print("YYMM")
else:
	print("NA")

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
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):
S=input()
F = S[:2]
B = S[2:]

F_m = 0<int(F)<13
F_y = 0<=int(F)<100
B_m = 0<int(B)<13
B_y = 0<=int(B)<100
YM = F_y + B_m
MY = B_y + F_m
if YM==2 & MY==2:
    print("AMBIGUOUS")
elif YM==2:
    print('YM')
elif MY==2:
    print('MY')
else:
    print('NA')

S= input()
F = S[:2]
B = S[2:]

F_m = 0<int(F)<13
F_y = 0<=int(F)<100
B_m = 0<int(B)<13
B_y = 0<=int(B)<100
YM = F_y + B_m
MY = B_y + F_m
if YM==2 & MY==2:
    print("AMBIGUOUS")
if YM==2:
    print('YM')
elif MY==2:
    print('MY')
else:
    print('NA')

S=input()
F = S[:2]
B = S[2:]
 
F_m = 0<int(F)<13
F_y = 0<=int(F)<100
B_m = 0<int(B)<13
B_y = 0<=int(B)<100
YM = F_y + B_m
MY = B_y + F_m
if YM==2 & MY==2:
    print("AMBIGUOUS")
elif YM==2:
    print('YYMM')
elif MY==2:
    print('MMYY')
else:
    print('NA')

Verdicts: Wrong Answer

Wrong Answer

Accepted