Programming Fundamentals - Dictionaries and Lists More Exercises - Problem 5. Parking Validation
Здравейте някой може ли да ми помогне Judge ми дава 90/100 код
Examples
Input |
Output |
5 register some0ne CS1234JS register vankata JAVA123S register vankata AB4142CD register housey VR1223EE unregister housey |
some0ne registered CS1234JS successfully ERROR: invalid license plate JAVA123S vankata registered AB4142CD successfully housey registered VR1223EE successfully user housey unregistered successfully some0ne => CS1234JS vankata => AB4142CD |
4 register testUser AA4132BB register testuser AA4132BB register testuser AA9999BB unregister testUser |
testUser registered AA4132BB successfully ERROR: license plate AA4132BB is busy testuser registered AA9999BB successfully user testUser unregistered successfully testuser => AA9999BB |
7 register gosho mm1111XX register gosho MM1111xx register gosho MMaaaaXX unregister gosho register gosho MM1111XX unregister gosho unregister pesho |
ERROR: invalid license plate mm1111XX ERROR: invalid license plate MM1111xx ERROR: invalid license plate MMaaaaXX ERROR: user gosho not found gosho registered MM1111XX successfully user gosho unregistered successfully ERROR: user pesho not found |
Ясно мерси. Не бях намерил друга тема за това направих тази. Иначе грешката, за тези които искат да разберат е в това, че първо трябва да се проверява дали потребителя има регистриран номер и чак тогава дали е валиден. Проверките се правят една след друга, по реда даден в условието :)
Точно така !