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 = list(str(1234))
pat1 = "YYMM"
pat2 = "MMYY"
pat3 = "AMBIGOUS"
pat4 = "NA"
mae =int(S[0] + S[1])
usiro = int(S[2] + S[3])
print(mae)
print(usiro)
if mae >= 13:
    if usiro >= 13 or usiro == 0:
        print(pat4)
    else:
        print(pat1)
elif mae != 0:
    if usiro == 0 or usiro >= 13:
        print(pat2)
    else:
        print(pat3)
else:
    if usiro >= 13 or usiro == 0:
        print(pat4)
    else:
        print(pat1)

s = str(input())
mae = s[:2]
usiro = s[2:]
if 0 < mae < 13:
    if 0 <usiro < 13:
        print("AMBIGUOUS")
    else:
         print("MMYY")
elif 0 < usiro < 13:
         print("YYMM")
else:
    print("NA")

s = input()
mae = s[:2]
usiro = s[2:]
if 0 < mae < 13:
    if 0 <usiro < 13:
        print("AMBIGUOUS")
    else:
         print("MMYY")
elif 0 < usiro < 13:
         print("YYMM")
else:
    print("NA")

S = list(str())
pat1 = "YYMM"
pat2 = "MMYY"
pat3 = "AMBIGOUS"
pat4 = "NA"
mae =int(S[0] + S[1])
usiro = int(S[2] + S[3])
print(mae)
print(usiro)
if mae >= 13:
    if usiro >= 13:
        print(pat4)
    elif usiro != 0:
        print(pat1)
elif mae != 0:
    if usiro == 0:
        print(pat2)
    else:
        print(pat1)
else:
    if usiro >= 13 or usiro == 0:
        print(pat4)
    else:
        print(pat1)

S = list(str(1234))
pat1 = "YYMM"
pat2 = "MMYY"
pat3 = "AMBIGOUS"
pat4 = "NA"
mae =int(S[0] + S[1])
usiro = int(S[2] + S[3])
print(mae)
print(usiro)
if mae >= 13:
    if usiro >= 13 or usiro == 0:
        print(pat4)
    else:
        print(pat1)
elif mae != 0:
    if usiro == 0 or usiro >= 13:
        print(pat2)
    else:
        print(pat1)
else:
    if usiro >= 13 or usiro == 0:
        print(pat4)
    else:
        print(pat1)

s = list(str(1234))
mae = s[:2]
usiro = s[2:]
if 0 < mae < 13:
    if 0 <usiro < 13:
        print("AMBIGUOUS")
    else:
         print("MMYY")
elif 0 < usiro < 13:
         print("YYMM")
else:
    print("NA")

s = str(input())
mae = int(s[:2])
usiro = int(s[2:])
if 0 < mae < 13:
    if 0 <usiro < 13:
        print("AMBIGUOUS")
    else:
         print("MMYY")
elif 0 < usiro < 13:
         print("YYMM")
else:
    print("NA")

Verdicts: Wrong Answer

Runtime Error

Runtime Error

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

n = list(input())
a,b = int(n[0]+n[1]),int(n[2]+n[3])
if (a==0 or a>12) and (b==0 or b>12):
  print("NA")
elif 1<=a<=12 and (b>12 or b==0):
  print("MMYY")
elif 1<=b<=12 and (a>12 or a==0):
  print("YYMM")
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):
YYMM = False
MMYY = False
f = input()
h1 = f[0] + f[1]
h2 = f[2] + f[3]

if 1 <= h2 <= 12:
  YYMM = True
if 1 <= h1 <= 12:
  MMYY = True

def ret(c1,c2):
  if c1 and c2:
    return "AMBIGUOUS"
  elif c1:
    return "YYMM"
  elif c2:
    return "MMYY"
  else:
    return "NA"
  
print(ret(YYMM,MMYY))

YYMM = False
MMYY = False
f = input()
h1 = f[0] + f[1]
h2 = f[2] + f[3]

if 1 <= int(h2) <= 12:
  YYMM = True
if 1 <= int(h1) <= 12:
  MMYY = True

def ret(c1,c2):
  if c1 and c2:
    return "AMBIGUOUS"
  elif c1:
    return "YYMM"
  elif c2:
    return "MMYY"
  else:
    return "NA"
  
print(ret(YYMM,MMYY))

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):
# input
S = input()
x, y = S[:2], S[2:]


not_YY_x = (int(x) >= 13)
not_YY_y = (int(y) >= 13)
zero_x = (x == "00")
zero_y = (y == "00")
checker = [not_YY_x, not_YY_y, zero_x, zero_y]

if checker == [True, False, False, False]:
    print("MMYY")
elif checker == [False, True, False, False]:
    print("YYMM")
elif checker == [False, False, False, False]:
    print("AMBIGUOUS")
else:
    print("NA")

# input
S = input()
x, y = S[:2], S[2:]


not_YY_x = (int(x) >= 13)
not_YY_y = (int(y) >= 13)
zero_x = (x == "00")
zero_y = (y == "00")
checker = [not_YY_x, not_YY_y, zero_x, zero_y]

if checker == [True, False, False, False]:
    print("MMYY")
elif checker == [False, True, False, False]:
    print("YYMM")
elif checker == [False, False, False, False]:
    print("AMBIGUOUS")
else:
    print("NA")

# input
S = input()
x, y = S[:2], S[2:]


not_MM_x = (int(x) >= 13)
not_MM_y = (int(y) >= 13)
zero_x = (x == "00")
zero_y = (y == "00")
checker = [not_MM_x, not_MM_y, zero_x, zero_y]

if checker in [[True, False, False, False], [False, False, True, False]]:
    print("YYMM")
elif checker in [[False, True, False, False], [False, False, False, True]]:
    print("MMYY")
elif checker == [False, False, False, False]:
    print("AMBIGUOUS")
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):
import sys
import copy
import math
import fractions

import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
import numpy as np
from decimal import *


if __name__ == '__main__':
    s = input()
    s1 = int(s[0:2])
    s2 = int(s[2:4])
    f1 = 0
    f2 = 0

    if s1 == 0:
        f1 = 0
    elif s1 >0 and 13 > s1:
        f1 = 1
    else:
        f1 =2

    if s2 == 0:
        f2 = 0
    elif s2 >0 and 13 > s2:
        f2 = 1
    else:
        f2 =2

    if f1 == 0 and f2 ==0:
        print("NA")
    elif (f1 ==0 and f2 == 2) or (f1 == 1 and f2 ==0) or (f1 == 2 and f2 ==2) :
        print("NA")
    elif (f1 ==0 and f2 == 1) or (f1 == 2 and f2 ==1) :
        print("MMYY")
    elif (f1 ==1 and f2 == 0) or (f1 == 1 and f2 ==2) :
        print("YYMM")

    else:
        print("AMBIGUOUS")









if __name__ == '__main__':
    s = input()
    s1 = int(s[0:2])
    s2 = int(s[2:4])
    f1 = 0
    f2 = 0

    if s1 == 0:
        f1 = 0
    elif s1 >1 and 13 > s1:
        f1 = 1
    else:
        f2 =2

    if s2 == 0:
        f1 = 0
    elif s2 >1 and 13 > s2:
        f1 = 1
    else:
        f2 =2

    if f1 == 0 and f2 ==0:
        print("NA")
    elif (f1 ==0 and f2 == 2) or (f1 == 1 and f2 ==0) or (f1 == 2 and f2 ==2) :
        print("NA")
    elif (f1 ==0 and f2 == 1) or (f1 == 2 and f2 ==1) :
        print("YYMM")
    elif (f1 ==1 and f2 == 0) or (f1 == 1 and f2 ==2) :
        print("MMYY")
    else:
        print("AMBIGUOUS")









import sys
import copy
import math
import fractions

import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
import numpy as np
from decimal import *


if __name__ == '__main__':
    s = input()
    s1 = int(s[0:2])
    s2 = int(s[2:4])
    f1 = 0
    f2 = 0

    if s1 == 0:
        f1 = 0
    elif s1 >0 and 13 > s1:
        f1 = 1
    else:
        f1 =2

    if s2 == 0:
        f2 = 0
    elif s2 >0 and 13 > s2:
        f2 = 1
    else:
        f2 =2

    if f1 == 0 and f2 ==0:
        print("NA")
    elif (f1 ==0 and f2 == 2) or (f1 == 2 and f2 ==2) or (f1 == 2 and f2 ==0) :
        print("NA")
    elif (f1 ==0 and f2 == 1) or (f1 == 2 and f2 ==1) :
        print("YYMM")
    elif (f1 ==1 and f2 == 0) or (f1 == 1 and f2 ==2) :
        print("MMYY")
    else:
        print("AMBIGUOUS")









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):
lst = list(input())
lst1 = []
lst1.append(lst[0]+lst[1])
lst1.append(lst[2]+lst[3])

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

lst = list(input())
lst1 = []
lst1.append(lst[0]+lst[1])
lst1.append(lst[2]+lst[3])

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

s = input()
a = s[:2]
b = s[2:]
if 0< int(a) <13:
  if 0<int(b)<13:
    print("AMBIGUOUS")
  else:
    print("MMYY")
else:
  if 0<int(b)<13:
    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=list(map(int,input().split))
t=10*s[0]+s[1]
k=10*s[2]+s[3]
if 1<=t<=12:
  if 1<=k<=12:
    print("AMBIGUOUS")
  elif:
    print("MMYY")
elif 1<=k<=12:
  print("YYMM")
else:
  print("NA")

s=list(input())
s=list(map(int,s))
t=10*s[0]+s[1]
k=10*s[2]+s[3]
if 1<=t<=12:
  if 1<=k<=12:
    print("AMBIGUOUS")
  else:
    print("MMYY")
elif 1<=k<=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())
if int(S[:2]) > 12 and int(S[2:]) <= 12:
  print('YYMM')
elif int(S[:2]) <= 12 and int(S[2:]) > 12 and int(S[2:]) != 0:
  print('MMYY')
elif int(S[:2]) <= 12 and int(S[2:]) <= 12 and int(S[:2]) != 0  and int(S[2:]) != 0:
  print('AMBIGUOUS')
else:
  print('NA')

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

if int(s[:2]) >= 13 or s[:2] != '00' and int(s[2:4]) >= 13 or s[2:4] != '00':
    print('NA')
elif int(s[:2]) <= 12 and int(s[2:4]) <= 12:
    print('AMBIGUOUS')
elif int(s[:2]) <= 12:
    print('MMYY')
elif int(s[:2]) >= 13:
    print('YYMM')
    


s = input()

if int(s[:2]) >= 13 or s[:2] == '00' and int(s[2:4]) >= 13 or s[2:4] == '00':
    print('NA')
elif int(s[:2]) <= 12 and int(s[2:4]) <= 12:
    print('AMBIGUOUS')
elif int(s[:2]) <= 12:
    print('MMYY')
elif int(s[:2]) >= 13:
    print('YYMM')
    


s = input()
if (int(s[:2]) >= 13 or s[:2] == '00') and (int(s[2:4]) >= 13 or s[2:4] == '00'):
    print('NA')
elif 0 < int(s[:2]) <= 12 and 0 < int(s[2:4]) <= 12:
    print('AMBIGUOUS')
elif 0 < int(s[:2]) <= 12:
    print('MMYY')
else:
    print('YYMM')
    


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):
import random

s = input()

# list = ["00", "01","02","03","04","05","06","07","08","09","10","11","12","13","14"]


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

print(s)

if len(s) != 4:
    print("NA 1")
elif (s1 == 0) or (s2 == 0):
    print("NA 2")
elif (s1 > 12) and (s2 > 12):
    print("NA 3")
elif s2 > 12:
    print("MMYY")
elif s1 > 12:
    print("YYMM")
else:
    print("AMBIGUOUS")



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

if (s1 == 0) and (s2 > 12):
    print("NA")
elif (s2 == 0) and (s1 > 12):
    print("NA")
elif (s1 <= 0) and (s2 == 0):
    print("NA")
elif (s1 > 12) and (s2 > 12):
    print("NA")
elif s2 > 12:
    print("MMYY")
elif s1 > 12:
    print("YYMM")
elif (s1 == 0) and (s2 <= 12):
    print("YYMM")
elif (s2 == 0) and (s1 <= 12):
    print("MMYY")
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):
i = list(input())
yy = int(i[0] + i[1])
mm = int(i[2] + i[3])
print(yy, mm)

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


i = list(input())
yy = int(i[0] + i[1])
mm = int(i[2] + i[3])
print(yy, mm)
 
if (yy > 12) and (0 < mm <= 12):
    print("YYMM")
elif (0 < yy <= 12) and ((mm > 12) or (mm == 0)):
    print("MMYY")
elif (0 < yy <= 12) and (0 < mm <= 12):
    print("AMBIGUOUS")
else:
    print("NA")

i = list(input())
yy = int(i[0] + i[1])
mm = int(i[2] + i[3])
 
if ((yy > 12) or (yy == 0))  and (0 < mm <= 12):
    print("YYMM")
elif (0 < yy <= 12) and ((mm > 12) or (mm == 0)):
    print("MMYY")
elif (0 < yy <= 12) and (0 < mm <= 12):
    print("AMBIGUOUS")
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):
d=input()
a,b=map([d[:2],d[2:]])
temp=[]
for i in [a,b]:
    if 1 <= i <=12:
        temp.append(2)
    elif 0 <= i <= 99:
        temp.append(1)
    else:
        temp.append(0)

if sum(temp) == 4:
    print('AMBIGUOUS')
elif sum(temp) == 3:
    if temp[0]==2:
        print('MMYY')
    else:
        print('YYMM')
else:
    print('NA')

d=input()
a,b=map(int, [d[:2],d[2:]])
temp=[]
for i in [a,b]:
    if 1 <= i <=12:
        temp.append(2)
    elif 0 <= i <= 99:
        temp.append(1)
    else:
        temp.append(0)

if sum(temp) == 4:
    print('AMBIGUOUS')
elif sum(temp) == 3:
    if temp[0]==2:
        print('MMYY')
    else:
        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):
N = input()
N = list(N)
# N = int(N)
print(N)

ab = N[0] + N[1]
cd = N[2] + N[3]


# cd = int(cd)

if N[0] == 0:
  ab = ab.zfill(2)

if N[2] == 0:
  cd = cd.zfill(2)

# print(ab)
# print(cd)


if ab == "00" or cd == "00":
  print("NA")  

elif int(ab) > 12 and int(cd) > 12:
  print("NA")  

elif 13 > int(ab) > 0 and 13 > int(cd) > 0:
  print("AMBIGUOUS")

elif int(ab) > 12 and int(cd) < 13:
  print("YYMM")

elif 13 > int(ab) > 0 and int(cd) > 12:
  print("MMYY")


N = input()
N = list(N)
# N = int(N)
# print(N)

ab = N[0] + N[1]
cd = N[2] + N[3]


# cd = int(cd)

if N[0] == 0:
  ab = ab.zfill(2)

if N[2] == 0:
  cd = cd.zfill(2)

# print(ab)
# print(cd)


if ab == "00" and cd == "00":
  print("NA")  

elif ab == "00" and int(cd) > 12:
  print("NA")  

elif int(ab) > 12 and cd == "00":
  print("NA")  

elif int(ab) > 12 and int(cd) > 12:
  print("NA")  

elif 13 > int(ab) > 0 and 13 > int(cd) > 0:
  print("AMBIGUOUS")

elif ab == "00" and 0 < int(cd) < 13:
  print("YYMM")

elif int(ab) > 12 and int(cd) < 13:
  print("YYMM")

elif 13 > int(ab) > 0 and int(cd) > 12:
  print("MMYY")

elif 0 < int(ab) < 13 and cd =="00":
  print("MMYY")


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

s1=s[0]*10+s[1]
s2=s[3]*10+s[4]

if s1<=12 and s2<=12:
    ans='AMBIGUOUS'
elif s1<=12 and s2>12:
    ans ='MMYY'
elif s1>12 and s2<=12:
    ans ='YYMM'
else:
    ans='NA'




s=list(input())

# s1 = (int)(s[0] + s[1])
s1=int(s[0])*10+int(s[1])
s2=int(s[2])*10+int(s[3])

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


s=list(input())

# s1 = (int)(s[0] + s[1])
s1=int(s[0])*10+int(s[1])
s2=int(s[2])*10+int(s[3])

if s1<=12 and s2<=12 and s1>0 and s2>0:
    ans='AMBIGUOUS'
elif s1<=12 and  (s2>12 or s2 == 0)and s1>0:
    ans ='MMYY'
elif (s1>12 or s1==0) and s2<=12 and s2>0:
    ans ='YYMM'
else:
    ans='NA'
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):
n =  str(input())

a = n[0:2]
b = n[2:]

c = int(a)
d = int(b)
print(c)
print(d)
yymm = False
mmyy = False
ambiguous = False
na = False

if (c < 1) or (12 < c):
    if (d < 1) or (12 < d):
        na = True

if (1 <= c) and (c <= 12):
    if (d < 1) or (12 < d):
        mmyy = True

if (1 <= d) and (d <= 12):
    if (c < 1) or (12 < c):
        yymm = True

if na == False and mmyy == False and yymm == False:
    ambiguous = True

if na == True:
    print("NA")
if mmyy == True:
    print("MMYY")
if yymm == True:
    print("YYMM")
if ambiguous == True:
    print("AMBIGUOUS")


n =  str(input())

a = n[0:2]
b = n[2:]

c = int(a)
d = int(b)
yymm = False
mmyy = False
ambiguous = False
na = False

if (c < 1) or (12 < c):
    if (d < 1) or (12 < d):
        na = True

if (1 <= c) and (c <= 12):
    if (d < 1) or (12 < d):
        mmyy = True

if (1 <= d) and (d <= 12):
    if (c < 1) or (12 < c):
        yymm = True

if na == False and mmyy == False and yymm == False:
    ambiguous = True

if na == True:
    print("NA")
if mmyy == True:
    print("MMYY")
if yymm == True:
    print("YYMM")
if ambiguous == True:
    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):
import re
S = input()
ans = ''
YYMMFlag = False
MMYYFlag = False
YYMM = '[0-9][0-9]0[0-9] | [0-9][0-9]1[0-9]'
MMYY = '0[0-9][0-9][0-9] | 1[0-9][0-9][0-9]'
if re.match(YYMM, S):
    YYMMFlag = True
elif re.match(MMYY, S):
    MMYYFlag = True

if YYMMFlag and MMYYFlag:
    print("AMBIGUOUS")
elif YYMMFlag:
    print("YYMM")
elif MMYYFlag:
    print("MMYY")
else:
    print("NA")

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

S = input()
Fa = int(S[:2])
Se = int(S[2:])
if 1 <= Fa,Se <= 12:
	print("AMBIGIOUS")
elif 1 <= Fa <= 12:
	print("MMYY")
elif 1 <= Se <= 12:
	print("YYMM")
else:
	print("NA")

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

Verdicts: Wrong Answer

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()
front, back = map(int, [s[:2], s[2:]])

yymm = False
mmyy = False
if 1 <= front and front <= 12:
  mmyy = True
  if 1 <= back and back <= 12:
    yymm = True
else:
  if 1 <= back and back <= 12:
    mmyy = True
  else:
    pass
    

if yymm and mmyy:
  print('AMBIGUOUS')
elif yymm:
  print('YYMM')
elif mmyy:
  print('MMYY')
else:
  print('NA')

n=input()
if 1<=int(n[:2])<=12 and 1<=int(n[2:])<=12:
  print("AMBIGUOUS")
elif 1<=int(n[:2])<=12:
  print("MMYY")
elif 1<=int(n[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):
A=input()
B=int(A[:2])
C=int(A[2:4])
if B<=12 and C<=12:
  print("AMBIGUOUS")
elif 12>=B>=1:
  print("YYMM")
elif 12>=C>=1:
  print("MMYY")
else:
  print("NA")

a=(input())
b=int(a[0:2])
c=int(a[2:4])
if b==0 or c==o:
  print("NA")
elif b => 12 and c=>12:
  print("NA")
elif b =>12:
  print("YYMM")
elif c=>12:
  print("MMYY")
else:
  print("AMBIGUOUS")

A=input()
B=int(A[:2])
C=int(A[2:4])
  
if(1<=B<=12):
    if(1<=C<=12):
        print('AMBIGUOUS')
    else:
        print('MMYY')
elif(1<=C<=12):
    print('YYMM')    
else:
    print('NA')
    

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


s = input()
f, b = int(s[:2]), int(s[2:])
if ((0 < f and f <= 12) and (b > 12 or b == 0)): print("MMYY")
elif ((0 < b and b <= 12) and (f > 12 or f == 0)): print("YYMM")
elif (f == 0 or b == 0 or (f > 12 and b > 12)): 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):
A=input()
S=[int(A[i:i+2]) for i in range(0,len(A),2)]
if 0<=S[0] and S[0]<=12:
    if 0<=S[1] and S[1]<=12:
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if 0<=S[1] and S[1]<=12:
        print('MMYY')
    else:
        print('NA')

A=input()
S=[int(A[i:i+2]) for i in range(0,len(A),2)]
if 0<=A[0] and A[0]<=12:
    if 0<=A[1] and A[1]<=12:
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if 0<=A[1] and A[1]<=12:
        print('MMYY')
    else:
        print('NA')

A=input()
S=[int(A[i:i+2]) for i in range(0,len(A),2)]
if 1<=S[0] and S[0]<=12:
    if 1<=S[1] and S[1]<=12:
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if 1<=S[1] and S[1]<=12:
        print('YYMM')
    else:
        print('NA')


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):
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))


n = int(input())
a = []
for i in range(n):
    s, p = map(str, input().split())
    p = int(p)
    a.append((s,p,i+1))

a.sort(key=lambda x:x[1], reverse=True)

a.sort(key=lambda x:x[0])

for i in range(n):
    print(a[i][2])


#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))


s = input()

temp1 = int(s[0:2])
temp2 = int(s[2:4])

if temp1 >= 1 and temp1 <= 12:
    if (temp2 < 1 or temp2 > 12):
        print("MMYY")
    else:
        print("AMBIGUOUS")
else:
    if (temp2 >= 1 and temp2 <= 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):
N = list(input())
if 1 <= int(N[0]+N[1]) <=12 and 1 <= int(N[2]+N[3]) <= 12:
  print('AMBIGUOUS')
elif 1 <= int(N[0]+N[1]) <=12 and 12<int(N[2]+N[3])<1:
  print('MMYY')
elif 12<int(N[0]+N[1])<1 and 1 <= int(N[2]+N[3]) <=12:
  print('YYMM')
else:
  print('NA')


N = list(input())
if 1 <= int(N[0]+N[1]) <=12 and 1 <= int(N[2]+N[3]) <=12:
  print('AMBIGUOUS')
elif 1 <= int(N[0]+N[1]) <=12:
  print('MMYY')
elif 1 <= int(N[2]+N[3]) <=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):
 s = input()
l = s[:2]
r = s[2:]
yy = [str(i).zfill(2) for i in range(100)]
mm = [str(i).zfill(2) for i in range(1, 13)]

if l in mm and r in mm:
    print("AMBIGUOUS")
elif l in yy and r in mm:
    print("YYMM")
elif l in mm and r in yy:
    print("MMYY")
else:
    print("NA")

s = input()
l = s[:2]
r = s[2:]
yy = [str(i).zfill(2) for i in range(100)]
mm = [str(i).zfill(2) for i in range(1, 13)]

if l in mm and r in mm:
    print("AMBIGUOUS")
elif l in yy and r in mm:
    print("YYMM")
elif l in mm and r in yy:
    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()

x = int(s[0:2])
y = int(s[3:])

if x > 12:
    if y > 12:
        print("NA")
    elif y >= 1:
        print("YYMM")
    else:
        print("NA")
elif x >= 1
    if y > 12:
        print("MMYY")
    elif y >= 1:
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if y > 12:
        print("NA")
    if y >= 1:
        print("YYMM")
    else:
        print("NA")
        

s = input()

x = int(s[0:2])
y = int(s[2:])

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


s=input()
if str(s[2:])!=0 and str(s[2:])<=12:
  if str(s[:2])!=0 str(s[:2])<=12:
    print('AMBIGUOUS')
  else:
    print('YYMM')
else:
  if str(s[:2])!=0 str(s[:2])<=12:
    print('MMYY')
  else:
    print('NA')

s=input()
if int(s[2:])!=0 and int(s[2:])<=12:
  if int(s[:2])!=0 and int(s[:2])<=12:
    print('AMBIGUOUS')
  else:
    print('YYMM')
else:
  if int(s[:2])!=0 and int(s[:2])<=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):
s = list(input())
def month(i):
  if "1" <= i <='12':
    return True
  else:
    return False
a = month("".join(s[0:2]))
b = month("".join(s[2:4]))
if a and b:
  print('AMBIGUOUS')
elif not a and b:
  print('YYMM')
elif a and not b:
  print('MMYY')
else:
  print('NA')
  
  
  

s = list(input())
def month(i):
  if 1 <= int(i) <=12:
    return True
  else:
    return False
a = month("".join(s[0:2]))
b = month("".join(s[2:4]))
if a and b:
  print('AMBIGUOUS')
elif not a and b:
  print('YYMM')
elif a and not b:
  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):
import sys

a = []
for l in sys.stdin:
    a.append(l)

_input = a[0]

def is_month(x):
    
    if 12 >= x > 0:
        return True
    else:
        return False

input_l = _input[:2]
input_r = _input[2:]

if is_month(input_l):
    if is_month(input_r):
        result = 'AMBIGUOUS'
    else:
        result = 'MMYY'
else:
    if is_month(input_r):
        result = 'YYMM'
    else:
        result = 'NA'
        
print(result)


import sys

a = []
for l in sys.stdin:
    a.append(l)

_input = a[0]

def is_month(x):
    
    if 12 >= x > 0:
        return True
    else:
        return False


input_l = int(_input[:2])
input_r = int(_input[2:])

if is_month(input_l):
    if is_month(input_r):
        result = 'AMBIGUOUS'
    else:
        result = 'MMYY'
else:
    if is_month(input_r):
        result = 'YYMM'
    else:
        result = 'NA'

print(result)


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:2])
B = int(S[2:4])

if 0 < A and A <= 12:
  if 0 < B and B <= 12:
    print(AMBIGUOUS)
  else:
    print(MMYY)
else:
  if 0 < B and B <= 12:
    print(YYMM)
  else:
    print(NA)

S = input()
A = int(S[0:2])
B = int(S[2:4])

if 0 < A and A <= 12:
  if 0 < B and B <= 12:
    print("AMBIGUOUS")
  else:
    print("MMYY")
else:
  if 0 < B 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())
a=s//100
b=s-a
if a<13 and b<13 and a>0 and b>0:
    print("AMBIGUOUS")
elif a<13 and a>0:
    print("MMYY")
elif b<13 and b>0:
    print("YYMM")
else:
    print("NA")

s=int(input())
a=s//100
b=s-a*100
if a<13 and b<13 and a>0 and b>0:
    print("AMBIGUOUS")
elif a<13 and a>0:
    print("MMYY")
elif b<13 and b>0:
    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[:2]) and int(s[2:]) < 13:
    print("AMBIGUOUS")
elif 0 < int(s[:2]) < 13 and int(s[2:]) != 0:
    print("MMYY")
elif 0 < int(s[2:]) < 13 and int(s[:2]) != 0:
    print("YYMM")
else:
    print("NA")

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

s = input()
if 0 < int(s[:2]) <13 and 0< int(s[2:]) < 13:
    print("AMBIGUOUS")
elif 0 < int(s[:2]) < 13:
    print("MMYY")
elif 0 < int(s[2:]) < 13:
    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=list(input())
ss=s[:2]
sss=s[2:]
x=int("".join(ss))
y=int("".join(sss))
print(x,y)
if 1<=x<=12 and 1<=y<=12:
    print("AMBIGUOUS")
elif 1<=x<=12 :
    print("MMYY")
elif 1<=y<=12:
    print("YYMM")
elif x==0 and y==0:
    print("NA")
elif x>=13 and y==0:
    print("NA")
elif x==0 and y>=13:
    print("NA")
elif x>=13 and y>=13:
    print("NA")

s=list(input())
ss=s[:2]
sss=s[2:]
x=int("".join(ss))
y=int("".join(sss))

if 1<=x<=12 and 1<=y<=12:
    print("AMBIGUOUS")
elif 1<=x<=12 :
    print("MMYY")
elif 1<=y<=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):
print("AMBIGUOUS")

print("MMYY")

print("NA")

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

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

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

S = input()

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

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

Verdicts: Wrong Answer

Accepted