Submission #5746218


Source Code Expand

#include<bits/stdc++.h>
 
using namespace std;
 
int main(){
	
  string s;cin >> s;
  int x = stoi(s.substr(0,2));
  int y = stoi(s.substr(2));
  
  if(x == 0 || y == 0 || x > 31 || y > 31){
  	cout << "NA";
    return 0;
  }
  
  if(x > 12 && y > 12){
  	cout << "NA";
    return 0;
  }
  
  if(x > 12){
  	cout << "YYMM";
    return 0;
  }
  
  if(y > 12){
  	cout << "MMYY";
    return 0;
  }
  
  cout << "AMBIGUOUS";
  return 0;
  
}

Submission Info

Submission Time
Task A - Changing a Character
User akbar1214
Language C++14 (GCC 5.4.1)
Score 0
Code Size 471 Byte
Status RE
Exec Time 106 ms
Memory 256 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 100
Status
RE × 2
RE × 7
Set Name Test Cases
Sample 01.txt, 02.txt
All 01.txt, 02.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt
Case Name Status Exec Time Memory
01.txt RE 99 ms 256 KiB
02.txt RE 106 ms 256 KiB
11.txt RE 97 ms 256 KiB
12.txt RE 97 ms 256 KiB
13.txt RE 98 ms 256 KiB
14.txt RE 97 ms 256 KiB
15.txt RE 97 ms 256 KiB