mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-19 19:03:02 +08:00
Simplify code by dropping support for legacy Python (#1143)
* Simplify code by dropping support for legacy Python * sort() --> sorted()
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user