Simplify code by dropping support for legacy Python (#1143)

* Simplify code by dropping support for legacy Python

* sort() --> sorted()
This commit is contained in:
Christian Clauss
2019-08-19 15:37:49 +02:00
committed by GitHub
parent 32aa7ff081
commit 47a9ea2b0b
145 changed files with 367 additions and 976 deletions

View File

@ -14,13 +14,10 @@ the following sequence of 15 distinct terms:
How many distinct terms are in the sequence generated by ab
for 2 <= a <= 100 and 2 <= b <= 100?
"""
from __future__ import print_function
def solution(n):
"""Returns the number of distinct terms in the sequence generated by a^b
for 2 <= a <= 100 and 2 <= b <= 100.
>>> solution(100)
9183
>>> solution(50)