517-least common multiple
Memory limit: 64MB time limit: 1000ms Special Award: No
number of Passes: 2 commits: 3 difficulty:
Title Description: Why is 1 hours 60 minutes instead of 100 minutes? This is the result of historical habits. But it is not purely accidental: 60 is a good number, it has more factors. In fact, it is a multiple of each number from 1 to 6. That is, 1,2,3,4,5,6 can be 60 apart.
We want to find the smallest integer m of every number that can be removed from 1 to N. Input Description:
Multiple sets of test data (less than 500 groups). There is only one number n (1<=n<=100) per line.
Output Description:
Output the corresponding m.
Sample input:Copy
234
Sample output:
2612
Python AC:
1X = [0, 1, 2, 6, 12]2 3 forIinchRange (5, 101):4j = 15 whileTrue:6temp = J * X[i-1]7 ifTemp% i = =0:8 x.append (temp);9 Break;TenJ + = 1 One A Try: - whileTrue: -n =int (input ()) the Print(X[n]) - exceptEoferror: - Pass
Nyoj 517-least common multiple (Python range (start, end) range (length))