Home > Problem, Projects/Experiments, Python > Python: Smallest Multiple

Python: Smallest Multiple



Python: Smallest multiple
Problem 5 @ projecteuler
Completed on: Thu, 4 Jul 2019, 22:30

Here I am quoting form ProjectEuler site:”

2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?”


So to solve this simple task all we need to loop through numbers and divide it by a list of (1,20) if yes return True otherwise return False and got to another number.
and so we done..



The Code:


codes here






Follow me on Twitter..



Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s