Skip to content

Commit

Permalink
feat(190993): solve with python
Browse files Browse the repository at this point in the history
  • Loading branch information
HamidMolareza committed Nov 29, 2024
1 parent 9ee1581 commit 343c40c
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Solutions/190993/python3/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# About this solution

This solution has scored 100 in [Quera](https://quera.org/).

🌟 If you like this solution, please give it a star.

## Built With

Python 3

# Usage

`python3 program.py`

## Support

Reach out to the maintainer at one of the following places:

- [GitHub issues](https://github.com/HamidMolareza/QueraProblems/issues/new?assignees=&labels=question&template=04_SUPPORT_QUESTION.md&title=support%3A+)

## Authors & contributors

The original setup of this repository is by [Hamid Molareza](https://github.com/HamidMolareza).

## License

This solution is licensed under the [GPLv3](https://choosealicense.com/licenses/gpl-3.0/).
17 changes: 17 additions & 0 deletions Solutions/190993/python3/program.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
def get_inputs(num_of_lines: int) -> dict[str, str]:
"""Reads input lines and creates a dictionary mapping binary to label."""
return dict(input().split() for _ in range(num_of_lines))


def main():
"""Main function to process the dataset and handle queries."""
n, q, _ = map(int, input().split()) # Simplified input parsing
dataset = get_inputs(n) # Populate the dataset

for _ in range(q):
query = input()
print(dataset.get(query, "Unknown")) # Use `get` for safe lookups


if __name__ == "__main__":
main()

0 comments on commit 343c40c

Please sign in to comment.