SoftUni Parking? Помощ!
Здравейте , решавам една от задачките за дикшънърита и всичко си работи като тествам и дебъгвам излизат всичките изходи но джъджа дава 0/100?
ето Кода =====>> https://pastebin.com/7ZEJgWAP
и условието -
SoftUni just got a new parking lot. It’s so fancy, it even has online parking validation. Except, the online service doesn’t work. It can only receive users’ data, but doesn’t know what to do with it. Good thing you’re on the dev team and know how to fix it, right?
Write a program, which validates parking for an online service. Users can register to park and unregister to leave.
The program receives 2 commands:
- "register {username} {licensePlateNumber}":
- The system only supports one car per user at the moment, so if a user tries to register another license plate, using the same username, the system should print:
"ERROR: already registered with plate number {licensePlateNumber}" - If the aforementioned checks pass successfully, the plate can be registered, so the system should print:
"{username} registered {licensePlateNumber} successfully"
- The system only supports one car per user at the moment, so if a user tries to register another license plate, using the same username, the system should print:
- "unregister {username}":
- If the user is not present in the database, the system should print:
"ERROR: user {username} not found" - If the aforementioned check passes successfully, the system should print:
"{username} unregistered successfully"
- If the user is not present in the database, the system should print:
After you execute all of the commands, print all the currently registered users and their license plates in the format:
- "{username} => {licensePlateNumber}"
Input
- First line: n – number of commands – integer
- Next n lines: commands in one of two possible formats:
- Register: "register {username} {licensePlateNumber}"
- Unregister: "unregister {username}"
The input will always be valid and you do not need to check it explicitly.
Благодаря!!
Благодаря !!!
Всичките грешки са от недоглеждане , аз се чудих защо чака да натисна Enter за да излезе принта ... Благодаря
Моля-моля, от личен опит идеално знам как се правят такива грешки, но това е част от процеса на учене, така че всичко е наред.