Skip to main content

No project description provided

Project description

int set


Counts the number of integers. 整数を数えます。

What does this do?

Counts the number of integers that can be any integer multiple within a given start and end. 始まりと終了を指定すると、その中に含まれる任意の整数倍となる整数の数を数えます。

Very Fast!!


from int_set import IntSet, step

# IntSet makes range like object
# IntSetはrangeのようのオブジェクトを作成します。

_range = IntSet(100)       # start: 0 stop: 100
_range = IntSet(100, 1000) # start: 100 stop: 1000

s = step(2)   # a multiple of two(2の倍数)
s = step(2,5) # a multiple of 2 or a multiple of 5(2の倍数または5の倍数)

# Count multiples of 2 or 5 between 100 and 1000.
# 100 ~ 1000に含まれる2の倍数または5の倍数の数を数えます。
_range.count(s) # 541


pip install int-set

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

int_set-0.1.1.tar.gz (3.1 kB view hashes)

Uploaded source

Built Distribution

int_set-0.1.1-py3-none-any.whl (3.5 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page