Last active
December 13, 2022 10:20
-
-
Save pranithan-kang/fceeb26c99314ee607c21dd3b3ca4198 to your computer and use it in GitHub Desktop.
forget_app_pass_code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# โจทย์ | |
# ---- | |
# ลืมรหัสเข้า app บนมือถือจำได้แค่เพียงว่ารหัสมี 4 หลัก ขึ้นต้นด้วยเลข 6 และหารด้วย 69 และ 96 ลงตัว | |
# คำถามคือรหัสผ่านคืออะไร | |
# ที่มาของโจทย์: asiamediasoft | |
def find_forgotten_passcode(): | |
set_a = {i for i in range(6000, 7000) if i % 69 == 0} | |
set_b = {i for i in range(6000, 7000) if i % 96 == 0} | |
return set_b.intersect(set_a) | |
find_forgotten_passcode() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment