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

if int(S[0:2]) <= 12 and int (S[0:2]) > 0:
    if int(S[2:4]) > 0 and int(S[2:4]) <= 12:
        print("AMBIGUOUS")
    elif int(S[2:4]) > 0:
        print("MMYY")
        
elif int(S[2:4]) <= 12 and int(S[2:4]) > 0:
    if int(S[0:2]) > 0 and int(S[0:2]) <= 12:
        print("AMBIGUOUS")    
    elif int(S[0:2]) > 0:
        print("YYMM")

elif int(S[0:2]) >= 13 and int(S[0:2]) == 0:
    if int(S[2:4]) == 0:
        print("NA")

elif int(S[2:4]) >= 13: and int(S[2:4]) == 0
    if int(S[0:2]) == 0:
        print("NA")

S = input()
print(type(S))

if int(S[0:2]) <= 12 and int (S[0:2]) > 0:
    if int(S[2:4]) > 0 and int(S[2:4]) <= 12:
        print("AMBIGUOUS")
    elif int(S[2:4]) > 0:
        print("MMYY")
        
elif int(S[2:4]) <= 12 and int(S[2:4]) > 0:
    if int(S[0:2]) > 0 and int(S[0:2]) <= 12:
        print("AMBIGUOUS")    
    elif int(S[0:2]) > 0:
        print("YYMM")


elif int(S[0:2]) >= 13:
    if int(S[2:4]) <= 0:
        print("NA")

elif int(S[2:4]) >= 13:
    if int(S[0:2]) <= 0:
        print("NA")


S = input()

if int(S[0:2]) <= 12 and int (S[0:2]) > 0:
    if int(S[2:4]) > 0 and int(S[2:4]) <= 12:
        print("AMBIGUOUS")
    elif int(S[2:4]) > 0:
        print("MMYY")
        
elif int(S[2:4]) <= 12 and int(S[2:4]) > 0:
    if int(S[0:2]) > 0 and int(S[0:2]) <= 12:
        print("AMBIGUOUS")    
    elif int(S[0:2]) > 0:
        print("YYMM")

elif int(S[0:2]) >= 13 and int(S[0:2]) == 0:
    if int(S[2:4]) == 0:
        print("NA")

elif int(S[2:4]) >= 13 and int(S[2:4]) == 0
    if int(S[0:2]) == 0:
        print("NA")

S = str(input())

if 12 >= int(S[0:2]) >= 1:

    if 12 >= int(S[2:4]) >= 1:
        print("AMBIGUOUS")

    else:
        print("MMYY")

else:
    if 12 >= int(S[2:4]) >= 1:
        print("YYMM")

    else:
        print("NA")


Verdicts: Runtime Error

Wrong Answer

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()
word=list(s)
flaga=0
flagb=0
if (s[0]=='0' and 1<=int(s[1])<=9) or (s[0]=='1' and 0<=int(s[1])<=2):
  flaga+=1
if (s[2]=='0' and 1<=int(s[3])<=9) or (s[2]=='1' and 0<=int(s[3])<=2):
  flagb+=1

if flaga==1 and flagb==1:
  print('AMBIGUOUS')
elif flaga==1 and flagb==0:
  print('YYMM')
elif flaga==0 and flagb==1:
  print('MMYY')
elif flaga==0 and flagb==0:
  print('NA')
  

s=input()
word=list(s)
flaga=0
flagb=0
if (s[0]=='0' and 1<=int(s[1])<=9) or (s[0]=='1' and 0<=int(s[1])<=2):
  flaga+=1
if (s[2]=='0' and 1<=int(s[3])<=9) or (s[2]=='1' and 0<=int(s[3])<=2):
  flagb+=1

if flaga==1 and flagb==1:
  print('AMBIGUOUS')
elif flaga==0 and flagb==1:
  print('YYMM')
elif flaga==1 and flagb==0:
  print('MMYY')
elif flaga==0 and flagb==0:
  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):
a = input()
if (a[:2] >0 and a[:2]<13) and (a[2:] >0 and a[2:]<13):
  print("both")
if (a[:2] >0 and a[:2]<13) and (a[2:] ==0 or a[2:]>13):
  print("MMYY")
if (a[:2] ==0 or  a[:2]>13) and (a[2:]>0 or a[2:]<13):
  print("YYMM")
if (a[:2] ==0 or  a[:2]>13) and (a[2:] ==0 or a[2:]>13):
  print("YYMM")


a = input()
mm = int(a[:2])
yy = int(a[2:])

if mm > 12 and yy>12:
  print("NA")

if mm < 13 and yy>12:
  print("YYMM")

if mm > 12 and yy<13:
  print("MMYY")

if mm < 13 and yy<13:
  print("AMBIGIOUS")



a = input()
mm = int(a[:2])
yy = int(a[2:])

can1 = True
can2 = True

if mm>12:
  can1 = False
if mm<1:
  can1= False

if yy>12:
  can2 = False
if yy<1:
  can2 = False

if can1 and can2:
  print("AMBIGUOUS")
elif can2:
  print("YYMM")
elif can1:
  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):
s = str(input())
ans = ['YYMM','MMYY','AMBIGUOUS','NA']
#print(s[:2],s[-2:])
if 0<int(s[:2])<=12 and 0<int(s[-2:]<=12:
    print(ans[3])
elif 0<int(s[:2])<=12:
    print(ans[2])
elif 0<int(s[-2:])<=12:
    print(ans[1])
else:
    print(ans[4])
    

s = str(input())
ans = ['YYMM','MMYY','AMBIGUOUS','NA']
#print(s[:2],s[-2:])
if 0<int(s[:2])<=12 and 0<int(s[-2:])<=12:
    print(ans[3])
elif 0<int(s[:2])<=12:
    print(ans[2])
elif 0<int(s[-2:])<=12:
    print(ans[1])
else:
    print(ans[4])
    

s = str(input())
ans = ['YYMM','MMYY','AMBIGUOUS','NA']
#print(s[:2],s[-2:])
if (0==int(s[:2]) or 13<=int(s[:2])) and (0==int(s[-2:]) or 13<=int(s[-2:])):
    print(ans[4])
if 0<int(s[:2])<=12 and 0<int(s[-2:])<=12:
    print(ans[3])
elif 0<int(s[:2])<=12:
    print(ans[2])
elif 0<int(s[-2:])<=12:
    print(ans[1])

    

s = str(input())
ans = ['YYMM','MMYY','AMBIGUOUS','NA']
#print(s[:2],s[-2:])
if (0==int(s[:2]) or 13<=int(s[:2])) and (0==int(s[-2:]) or 13<=int(s[-2:])):
    print(ans[3])
if 0<int(s[:2])<=12 and 0<int(s[-2:])<=12:
    print(ans[2])
elif 0<int(s[:2])<=12:
    print(ans[1])
elif 0<int(s[-2:])<=12:
    print(ans[0])

    

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()
s1=int(s[:2])
s2=int(s[2:])

if s1<=12 & s1>=1:
  if s2<=12 & s2>=1:
    print('AMBIGUOUS')
  else:
    print('MMYY')
else:
  if s2<=12 & s2>=1:
    print('YYMM')
  else:
    print('NA')

s=input()
s1=int(s[:2])
s2=int(s[2:])

if (s1<=12) & (s1>=1):
  if (s2<=12) & (s2>=1):
    print('AMBIGUOUS')
  else:
    print('MMYY')
else:
  if (s2<=12) & (s2>=1):
    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()

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

s = input()

if 0 < int(s[0:2]) <= 12 and 0 < int(s[2:4]) <= 12 :
  print("AMBIGUOUS")
elif (12 < int(s[0:2]) or int(s[0:2]) == 0) and  0 < int(s[2:4]) <= 12:
  print("YYMM")
elif 0 < int(s[0:2]) <= 12 and (12 < int(s[2:4]) or int(s[2:4]) == 0):
  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()
a = int(s[0] + s[1])
b = int(s[2] + s[3])

if a = 0 or b = 0:
    print('NA')
elif a>=13 and b >=13:
    print('NA')
elif a >= 13:
    print('YYMM')
elif b >= 13:
    print('MMYY')
else:
    print('AMBIGUOUS')

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

if  1 <= a <= 12 and 1 <= b <= 12:
    print('AMBIGUOUS')
elif 1<= b <= 12:
    print('YYMM')
elif 1<= a <= 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 = str(input())

date = [int(s[:2]), int(s[2:])]

if 1 <= date[0] <= 12 and 1 <= date[1] <= 12:
    print('AMBIGUOUS')
elif 1 <= date[1] <= 12:
    print('YYMM')
elif 1 <= date[0] <= 12:
    print('MMYY')
else:
    print('NA')
    
print(date)

s = str(input())

date = [int(s[:2]), int(s[2:])]

if 1 <= date[0] <= 12 and 1 <= date[1] <= 12:
    print('AMBIGUOUS')
elif 1 <= date[1] <= 12:
    print('YYMM')
elif 1 <= date[0] <= 12:
    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()
pre, lat = int(S[0:2]), int(S[2:4])
pre_M = 1 <= pre <= 12
lat_M = 1 <= pre <= 12
if pre_M and lat_M:
  print("AMBIGUOUS")
elif pre_M:
  print("MMYY")
elif lat_M:
  print("YYMM")
else:
  print("NA")

S = input()
pre, lat = int(S[0:2]), int(S[2:4])
pre_M = 1 <= pre <= 12
lat_M = 1 <= lat <= 12
if pre_M and lat_M:
  print("AMBIGUOUS")
elif pre_M:
  print("MMYY")
elif lat_M:
  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()
f = int(S[:2])
s = int(S[2:])
if 1 <= f <= 12:
  if 1 <= s <= 12:
    print('AMBIGUOUS')
  else:
    print('MMYY')
elif if 1 <= s <= 12:
  print('YYMM')
else:
  print('NA')

S = input()
f = int(S[:2])
s = int(S[2:])
if 1 <= f <= 12:
  if 1 <= s <= 12:
    print('AMBIGUOUS')
  else:
    print('MMYY')
elif 1 <= s <= 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):
    import sys, math, collections, heapq, itertools
F = sys.stdin
def single_input(): return F.readline().strip("\n")
def line_input(): return F.readline().strip("\n").split()
def gcd(a, b):
    a, b = max(a, b), min(a, b)
    while a % b > 0: a, b = b, a % b
    return b
  
def solve():
    S = single_input()
    YYMM = False
    MMYY = False
    if 1 <= int(S[2:]) <= 12: YYMM = True
    if 1 <= int(S[:2]) <= 12: MMYY = True

    if YYMM and MMYY: print("AMBIGUOUS")
    elif YYMM: print("YYMM")
    elif MMYY: print("MMYY")
    else: print("NA")
    return 0
  
if __name__ == "__main__":
    solve()

import sys, math, collections, heapq, itertools
F = sys.stdin
def single_input(): return F.readline().strip("\n")
def line_input(): return F.readline().strip("\n").split()
def gcd(a, b):
    a, b = max(a, b), min(a, b)
    while a % b > 0: a, b = b, a % b
    return b
  
def solve():
    S = single_input()
    YYMM = False
    MMYY = False
    if 1 <= int(S[2:]) <= 12: YYMM = True
    if 1 <= int(S[:2]) <= 12: MMYY = True

    if YYMM and MMYY: print("AMBIGUOUS")
    elif YYMM: print("YYMM")
    elif MMYY: print("MMYY")
    else: print("NA")
    return 0
  
if __name__ == "__main__":
    solve()

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

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

S=input()
A=int(S[:2])
B=int(S[2:])
if 1<=A<=12:
    if 1<=B<=12:
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if 1<=B<=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):
def mmyy():
  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")

if __name__ =="__main__":
  mmyy()
  

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


def mmyy():
  S=input()
  
  former=S[:2]
  later=S[2:]
  
  if(int(former)>0 and int(former)<13):
    
    if(int(later)>0 and int(later)<13):
      print("AMBIGUOUS")
    else:
      print("mmyy")
      
  else:
    if(int(later)>0 and int(later)<13):
      print("yymm")
    else:
      print("NA")

if __name__ =="__main__":
  mmyy()
  

def mmyy():
  S=input()
  
  former=S[:2]
  later=S[2:]
  
  if(int(former)>0 and int(former)<13):
    
    if(int(later)>0 and int(later)<13):
      print("AMBIGUOUS")
    else:
      print("MMYY")
      
  else:
    if(int(later)>0 and int(later)<13):
      print("YYMM")
    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

Wrong Answer

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 = int(input())

s1 = s // 100
s2 = s - s1

if s1 > 12 or s1 == 0:
    temp1 = 0
else:
    temp1 = 1

if s2 > 12 or s2 == 0:
    temp2 = 0
else:
    temp2 = 1


if temp1 == 0 and temp2 == 1:
    print("YYMM")
if temp1 == 0 and temp2 == 0:
    print("NA")
if temp1 == 1 and temp2 == 0:
    print("MMYY")
if temp1 == 1 and temp2 == 1:
    print("AMBIGUOUS")

s = int(input())

s1 = s // 100
s2 = s - (s1*100)

if s1 > 12 or s1 == 0:
    temp1 = 0
else:
    temp1 = 1

if s2 > 12 or s2 == 0:
    temp2 = 0
else:
    temp2 = 1


if temp1 == 0 and temp2 == 1:
    print("YYMM")
if temp1 == 0 and temp2 == 0:
    print("NA")
if temp1 == 1 and temp2 == 0:
    print("MMYY")
if temp1 == 1 and temp2 == 1:
    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=int(input())
a=s//100
b=s%100
if a>0 and a<=12:
  if b>0 and b<=12:
    print("AMBIGUOUS")
  else:
    print("MMYY")
else:
  if b>0 and b<=12:
    print("YYMM")
  else:
    print("NA")

s=int(input())
a=s//100
b=s%100
if a>0 and a<=12:
  if b>0 and b<=12:
    print("AMBIGUOUS")
  else:
    print("MMYY")
else:
  if b>0 and b<=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 = int(input())

b = s % 100
a = int((s-b)/100)

if a ==0 or b == 0
    print(‘NA’)
elif a> 12 and b>12
    print(‘NA’)
elif a>12
    print(‘YYMM’)
elif b>12
    print(‘MMYY’)
else
    print(‘AMBIGUOUS’)



s = int(input())

b = s % 100
a = int((s-b)/100)

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



s = int(input())

b = s % 100
a = int((s-b)/100)

flaga = False
flagb = False

if a > 0 and a < 13:
    flaga = True
if b > 0 and b < 13:
    flagb = True

if flaga == True and flagb == True:
    print('AMBIGUOUS')
if flaga == False and flagb == True:
    print('YYMM')
if flaga == True and flagb == False:
    print('MMYY')
if flaga == False and flagb == False:
    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()
be = s[0:2]
af = s[2:4]
if int(be) <= 12 and int(af) <= 12:
  print('AMBIGUOUS')
elif (int(be) > 12 and af == '00') or (be == '00' and int(af) > 12):
  print('NA')
else:
  if int(be) > 12:
    print('MMYY')
  elif int(af) > 12:
    print('YYMM')

s = input()
be = int(s[0:2])
af = int(s[2:4]) 
if 0 < be < 13:
  if 1 <= af <= 12:
    print('AMBIGUOUS')
  else:
    print('MMYY')
elif 0 < af < 13:
  if 1 <= be <= 12:
    print('AMBIGUOUS')
  else:
    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()
a = int(s[:2])
b = int(s[2:])
f_yymm = False
f_mmyy = False

if 1 <= a <= 12:
  f_yymm = True
if 1 <= b <= 12:
  f_mmyy = True:
    
if f_yymm and f_mmyy:
  print("AMBIGUOUS")
elif f_yymm and (not f_mmyy):
  print("YYMM")
elif (not f_yymm) and f_mmyy:
  print("MMYY")
else:
  print("NA")
  

s = input()
a = int(s[:2])
b = int(s[2:])
f_yymm = False
f_mmyy = False

if 1 <= a <= 12:
  f_yymm = True
if 1 <= b <= 12:
  f_mmyy = True
    
if f_yymm and f_mmyy:
  print("AMBIGUOUS")
elif f_yymm and (not f_mmyy):
  print("YYMM")
elif (not f_yymm) and f_mmyy:
  print("MMYY")
else:
  print("NA")
  

s = input()
a = int(s[:2])
b = int(s[2:])
f_yymm = False
f_mmyy = False

if 1 <= a <= 12:
  f_mmyy = True
if 1 <= b <= 12:
  f_yymm = True
    
if f_yymm and f_mmyy:
  print("AMBIGUOUS")
elif f_yymm and (not f_mmyy):
  print("YYMM")
elif (not f_yymm) and f_mmyy:
  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):
# coding: utf-8
s = input()
s_list=list(s)
s_len=len(s_list)
s_first=int(s_list[0]+s_list[1])
s_second=int(s_list[2]+s_list[3])
if s_first<13:#MMYY case
    if s_second<13:
        print('AMBIGOUS')
    else:
        print('MMYY')

else if: #YYMM case
    if s_second==0:
        print('NA')
    else:
        print('YYMM')

else
    print('NA')


# coding: utf-8
s = input()
s_list=list(s)
s_len=len(s_list)
s_first=int(s_list[0]+s_list[1])
s_second=int(s_list[2]+s_list[3])
if s_first<13 and s_first>0: #MMYY case
    if s_second<13 and s_second>0:
        print('AMBIGUOUS')
    else:
        print('MMYY')

else: #YYMM case
    if s_second<13 and s_second>0:
        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()
s_f = int(s[0]+s[1])
s_b = int(s[2]+s[3])

#print(s_f)
#print(s_b)
if s_f==0 or s_b==0:
    print('NA')
elif s_f<=12 and s_b<=12:
    print("AMBIGUOUS")
elif s_f<=12 and s_b>12:
    print('MMYY')
elif s_f>12 and s_b<=12:
    print('YYMM')
elif s_f>12 and s_b>12
    print('NA')
    
    

def solve(yy,mm):
    if 1<=yy<=12:
        if 1 <= mm <=12:
            return 'AMBIGUOUS'
        else:
            return 'MMYY'
    else:
        if 1<= mm <= 12:
            return 'YYMM'
        else:
            return "NA"


s = input()
yy = int(s[:2])
mm = int(s[2:])
print(solve(yy,mm))

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

a = int(n[0]+n[1])
b = int(n[2]+n[3])
if b = 0 or b > 12:
	if 1 <= a <= 12:
		print("MMYY")
	else:
		print("NA")
elif 1 <= a <= 12:
	print("AMBIGUOUS")
else:
	print("YYMM")

n = input()

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

s = str(input())
if s[0] == "0" and s[1] == "0" and int(s[2]+s[3]) > 12:
    print("NA")
elif s[2] == "0" and s[3] == "0" and int(s[0]+s[1]) > 12:
    print("NA")
elif s = "0000":
    print("NA")
elif int(s[0]+s[1]) > 12 and int(s[2]+s[3]) > 12:
    print("NA")
elif s[0] == "0" and s[1] == "0":
    print("YYMM")
elif s[2] == "0" and s[3] == "0":
    print("MMYY")
elif int(s[0]+s[1]) > 12 and int(s[2]+s[3]) <= 12:
    print("YYMM")
elif int(s[2]+s[3]) > 12 and int(s[0]+s[1]) <= 12:
    print("MMYY")
else:
    print("AMBIGUOUS")

s = str(input())
if s[0] == "0" and s[1] == "0" and int(s[2]+s[3]) > 12:
    print("NA")
elif s[2] == "0" and s[3] == "0" and int(s[0]+s[1]) > 12:
    print("NA")
elif s == "0000":
    print("NA")
elif int(s[0]+s[1]) > 12 and int(s[2]+s[3]) > 12:
    print("NA")
elif s[0] == "0" and s[1] == "0":
    print("YYMM")
elif s[2] == "0" and s[3] == "0":
    print("MMYY")
elif int(s[0]+s[1]) > 12 and int(s[2]+s[3]) <= 12:
    print("YYMM")
elif int(s[2]+s[3]) > 12 and int(s[0]+s[1]) <= 12:
    print("MMYY")
else:
    print("AMBIGUOUS")

Verdicts: Wrong Answer

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):
zenhan = int(S[:2])
kouhan = int(S[2:])
if zenhan == 0 or kouhan == 0:
    print('NA')
elif zenhan > 12 and kouhan > 12:
    print('NA')
elif zenhan <= 12 and kouhan <= 12:
    print('AMBIGUOUS')
elif zenhan <= 12 and kouhan > 12:
    print('MMYY')
elif zenhan > 12 and kouhan <= 12:
    print('YYMM')

S = input()
zenhan = int(S[:2])
kouhan = int(S[2:])
if zenhan == 0 and kouhan != 0:
    if kouhan <= 12:
        print('YYMM')
    else:
        print('NA')
elif kouhan == 0 and zenhan != 0:
    if zenhan <= 12:
        print('MMYY')
    else:
        print('NA')
elif zenhan == 0 and kouhan == 0:
    print('NA')
elif zenhan > 12 and kouhan > 12:
    print('NA')
elif zenhan <= 12 and kouhan <= 12:
    print('AMBIGUOUS')
elif zenhan <= 12 and kouhan > 12:
    print('MMYY')
elif zenhan > 12 and kouhan <= 12:
    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 = input()

if (1 <= S[:2] <= 12) & (1 <= S[2:] <= 12):
    print('AMBIGUOUS')
elif (1 <= S[:2] <= 12) & ((S[2:] == 0) or (13 <= S[2:])):
    print('MMYY')
elif (1 <= S[2:] <= 12) & ((S[:2] == 0) or (13 <= S[:2])):
    print('YYMM')
else:
    print('NA')

S = input()

#print(type(S[:2]))
#print(type(int(S[:2])))

if (1 <= int(S[:2]) <= 12) & (1 <= int(S[2:]) <= 12):
    print('AMBIGUOUS')
elif (1 <= int(S[:2]) <= 12) & ((int(S[2:]) == 0) or (13 <= int(S[2:]))):
    print('MMYY')
elif (1 <= int(S[2:]) <= 12) & ((int(S[:2]) == 0) or (13 <= int(S[:2]))):
    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 = str(input())
ss = s[:2]
sss = s[2:]

if "01" <= ss <= "12":
    if "01" <= sss <= "12":
        print("AMBIGUOUS")
    else:
        print("YYMM")
else:
    if "01" <= sss <= "12":
        print("MMYY")
    else:
        print("NA")

s = str(input())
ss = s[:2]
sss = s[2:]

if "01" <= sss <= "12":
    if "01" <= ss <= "12":
        print("AMBIGUOUS")
        exit()
    else:
        print("YYMM")
        exit()
if "01" <= ss <= "12":
    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()

f = int(S[0]+S[1])
s = int(S[2]+S[3])

if f >= 1 and f <= 12 and s >= 1 and s <= 12:
  print('AMBIGUOUS')
elif f >= 1 and f <=12 and (s >= 13 or s == 0):
  print('MMYY')
elif (f >= 13 or f == 0 and s >= 1 and s <= 12:
  print('YYMM')
else:
  print('NA')
  

S = input()

f = int(S[0]+S[1])
s = int(S[2]+S[3])

if f >= 1 and f <= 12 and s >= 1 and s <= 12:
  print('AMBIGUOUS')
elif f >= 1 and f <=12 and s => 13:
  print('MMYY')
elif f => 13 and s >= 1 and s <= 12:
  print('YYMM')
else:
  print('NA')

S = input()

f = int(S[0]+S[1])
s = int(S[2]+S[3])

if f >= 1 and f <= 12 and s >= 1 and s <= 12:
  print('AMBIGUOUS')
elif f >= 1 and f <=12 and (s >= 13 or s == 0):
  print('MMYY')
elif (f >= 13 or f == 0) and s >= 1 and s <= 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):
import sys
from collections import deque

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    head = int(inputs[0][:2])
    tail = int(inputs[0][2:])

    if head == 0 or tail == 0:
        return "NA"

    if head >= 1 and head <= 12:
        if tail >= 1 and head <= 12:
            return "AMBIGUOUS"
        return "MMYY"

    if tail >= 1 and head <= 12:
        return "YYMM"


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)


import sys
from collections import deque

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    head = int(inputs[0][:2])
    tail = int(inputs[0][2:])

    if head == 0 or tail == 0:
        return "NA"

    if head >= 1 and head <= 12:
        if tail >= 1 and head <= 12:
            return "AMBIGUOUS"
        return "MMYY"

    if tail >= 1 and head <= 12:
        return "YYMM"


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)


import sys
from collections import deque

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    head = int(inputs[0][:2])
    tail = int(inputs[0][2:])

    if head >= 1 and head <= 12:
        if tail >= 1 and tail <= 12:
            return "AMBIGUOUS"
        else:
            return "MMYY"

    if tail >= 1 and tail <= 12:
        return "YYMM"

    return "NA"


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)


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):
def is_month(input_str):
  if 1 <= int(input_str) and int(input_str) <= 12:
    return True
  else:
    return False
    
def is_year(input_str):
  if 0 <= int(input_str) and int(input_str) <= 99:
    return True
  else:
    return False

s=input().strip()
first_half = [is_month(s[:2]), is_year(s[:2])]
second_half = [is_month(s[2:]), is_year(s[2:])]

if (first_half == [True, True] and second_half == [True, True]):
  print('AMBIGUOUS')
elif first_half[0] is True and second_half[1] is True:
  print('MMYY')
elif first_half[1] == False and second_half[0] is True:
  print('YYMM')
else:
  print('NA')

def is_month(input_str):
  if 1 <= int(input_str) and int(input_str) <= 12:
    return True
  else:
    return False
    
def is_year(input_str):
  if 0 <= int(input_str) and int(input_str) <= 99:
    return True
  else:
    return False

s=input().strip()
first_half = [is_month(s[:2]), is_year(s[:2])]
second_half = [is_month(s[2:]), is_year(s[2:])]

if (first_half == [True, True] and second_half == [True, True]):
  print('AMBIGUOUS')
elif first_half[0] is True and second_half[1] is True:
  print('MMYY')
elif first_half[1] is True and second_half[0] is 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):
def is_mm(target):
    n = int(target)
    print(n)
    return 1 <= n <= 12


def get_result(first2_is_mm, last2_is_mm):
    if first2_is_mm and last2_is_mm:
        return "AMBIGUOUS"
    if not first2_is_mm and not last2_is_mm:
        return "NA"
    if first2_is_mm:
        return "MMYY"
    return "YYMM"


s = str(input())
first2, last2 = ((i + j) for (i, j) in zip(s[::2], s[1::2]))
print(get_result(is_mm(first2), is_mm(last2)))


def is_mm(target):
    n = int(target)
    return 1 <= n <= 12


def get_result(first2_is_mm, last2_is_mm):
    if first2_is_mm and last2_is_mm:
        return "AMBIGUOUS"
    if not first2_is_mm and not last2_is_mm:
        return "NA"
    if first2_is_mm:
        return "MMYY"
    return "YYMM"


s = str(input())
first2, last2 = ((i + j) for (i, j) in zip(s[::2], s[1::2]))
print(get_result(is_mm(first2), is_mm(last2)))


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=s[:1]
b=s[2:]
if (1<=a<=12 and 1<=b<=12):
  print('AMBIGUOUS')
elif (1<=a<=12 and (b=0 or 13<b):
      print('MMYY')
elif (1<=b<=12 and (a=0 or 13<a):
      print('YYMM')
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) and (b=0 or 13<b):
      print('MMYY')
elif (1<=b<=12) and (a=0 or 13<a):
      print('YYMM')
else:
      print('NA')

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

Verdicts: Runtime Error

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=int(input())
x=s//100
y=s-x*100

if x*y=0:
  print("NA")

else:
  if x<13:
    if y<13:
      print("AMBIGUOUS")
    else:
      print("MMYY")
     
  else:
    if y<13:
      print("YYMM")
    else:
      print("NA")

s=int(input())
x=s//100
y=s-x*100




if x>0 and x<13:
  if y>0 and y<13:
    print("AMBIGUOUS")
  else:
    print("MMYY")
     
else:
  if y>0 and y<13:
    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 = int(input())

first_half = round(S, -2) / 100
second_half = S - round(S, -2)

if 1 <= second_half <= 12 and 1 <= first_half <= 12 :
  print("AMBIGUOUS")
  elif 1 <= second_half <= 12 :
    print("YYMM")
  elif 1 <= first_half <= 12 :
    print("MMYY")
  else: 
    print("NA")

S = int(input())

first_half = round(S, -2) / 100
second_half = S - round(S, -2)

if 1 <= second_half <= 12 and 1 <= first_half <= 12 :
  print("AMBIGUOUS")
else:
  if 1 <= second_half <= 12 :
   		print("YYMM")
	elif 1 <= first_half <= 12 :
    	print("MMYY")
	else: 
        print("NA")

import math
 
S = int(input())
 
first_half = math.floor(S / 100)
second_half = S - first_half * 100
 
if 1 <= second_half <= 12 and 1 <= first_half <= 12 :
  print("AMBIGUOUS")
elif 1 <= second_half <= 12 :
   		print("YYMM")
elif 1 <= first_half <= 12 :
    	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):
def main():
    s  = int(input())
    k = s//100
    t = s%100

    if(k>0 and k<13) and (t>0 and t<13):
        res = "AMBIGUOUS"
    elif(k>0 and k<13) and
        res = "MMYY"
    elif(t>0 and t<13):
        res = "YYMM"
    else:
        res = "NA"
    print(res)






if __name__ == '__main__':
    main()


def main():
    s  = int(input())
    k = s//100
    t = s%100

    if(k>0 and k<13) and (t>0 and t<13):
        res = "AMBIGUOUS"
    elif(k>0 and k<13):
        res = "MMYY"
    elif(t>0 and t<13):
        res = "YYMM"
    else:
        res = "NA"
    print(res)






if __name__ == '__main__':
    main()


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

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

Verdicts: Runtime Error

Accepted