{"id":21126387,"url":"https://github.com/lilpolymath/python-codes","last_synced_at":"2025-03-14T11:42:50.006Z","repository":{"id":101609944,"uuid":"129722029","full_name":"lilpolymath/Python-Codes","owner":"lilpolymath","description":"A repo containing my Python codes. More classification would be made later.","archived":false,"fork":false,"pushed_at":"2019-02-09T00:01:06.000Z","size":33,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-21T05:42:01.531Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lilpolymath.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-16T09:55:49.000Z","updated_at":"2020-06-23T11:43:08.000Z","dependencies_parsed_at":"2023-06-06T12:38:32.173Z","dependency_job_id":null,"html_url":"https://github.com/lilpolymath/Python-Codes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lilpolymath%2FPython-Codes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lilpolymath%2FPython-Codes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lilpolymath%2FPython-Codes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lilpolymath%2FPython-Codes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lilpolymath","download_url":"https://codeload.github.com/lilpolymath/Python-Codes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243573168,"owners_count":20312879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T04:41:27.287Z","updated_at":"2025-03-14T11:42:49.985Z","avatar_url":"https://github.com/lilpolymath.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python-Codes\nA repo containing my Python codes. More classifications would be made later.\nThis would contain solutions to various questions, Algorithms, OOP codes and miscellaneous codes. Time Complexity would be reduced to the barest minimum.\nPlease note that this is just the beginning don't get disappointed if your hopes are not dashed(smiles)\n\n# Smallest Common Multiple Explanation\n* Question\nFind the smallest common multiple of the provided parameters that can be evenly divided by both, as well as by all sequential numbers in the range between these parameters.\n\nThe range will be an array of two numbers that will not necessarily be in numerical order.\n\nFor example, if given 1 and 3, find the smallest common multiple of both 1 and 3 that is also evenly divisible by all numbers between 1 and 3. The answer here would be 6.\n\n* Explanation to Solution\n\nSmallest common multiple is the same thing as LCM. That can be evenly divided means to divide with no remainder. \n\nAn array would be the input but it may not be in numerical order so you have to find the max and min of the range for proper formatting.\n\nLCM of two numbers = the product of those two numbers divided by their GCD.\n\nLuckily for us, LCM operation is associative i.e\nLCM (a, b, c) = LCM ( LCM (a, b) , c) or vice versa and you can spread it.\n\nSo, we just have to keep iterating through the array to figure the final LCM.\n\nIt is normal to think how would that work, but it does all thanks to our GCD that gives us a very small number. \n\nAnd my code uses space as delimiter but you'll have to find a way to parse in array.\nFor frequent updates make sure you watch and star thie repo. Thanks.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flilpolymath%2Fpython-codes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flilpolymath%2Fpython-codes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flilpolymath%2Fpython-codes/lists"}