diff --git a/Solutions/190993/python3/README.md b/Solutions/190993/python3/README.md new file mode 100644 index 0000000..e840813 --- /dev/null +++ b/Solutions/190993/python3/README.md @@ -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/). \ No newline at end of file diff --git a/Solutions/190993/python3/program.py b/Solutions/190993/python3/program.py new file mode 100644 index 0000000..10647c2 --- /dev/null +++ b/Solutions/190993/python3/program.py @@ -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()