Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
dictionary = {} count = int(input()) for _ in range(count): line = input() line_split = line.split() command = line_split[0] name = line_split[1] if command == "register": plate_number = line_split[2] if name in dictionary: print(f"ERROR: already registered with plate number {dictionary[name]}") else: dictionary[name] = plate_number print(f"{name} registered {plate_number} successfully") else: if name not in dictionary: print(f"ERROR: user {name} not found") else: dictionary.pop(name) print(f"{name} unregistered successfully") for name, plate_number in dictionary.items(): print(f"{name} => {plate_number}")
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)