It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
>>> import math; from time import perf_counter as pk; start,f,n,k = pk(), math.factorial,525,450; f(n) // (f(k) * f(n-k)); perf_counter() - start
160238594860256432756426324474230582470146598379168712962500960567057295818091919639830840080
0.0005006769933970645
Python 3.11.3 (main, Apr 7 2023, 00:39:07) [Clang 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0 on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> f, n, k = math.factorial, 525, 35
>>> f(n) // (f(k) * f(n-k))
4875197867478707228958513876216391120239539892113911200
>>>
n! / (k! * (n-k)!) => 525! / (35! * (525-35)!) => 525! / (35! * 490!)
BigInteger dividend = 1;
for (int i = 491; i <= 525; i++)
{
dividend *= i;
}
BigInteger divisor = 1;
for (int i = 2; i <= 35; i++)
{
divisor *= i;
}
BigInteger result = dividend / divisor;
n! / (k! * (n-k)!) => 525! / (35! * (525-35)!) => 525! / (35! * 490!)
def factorial_loop(n):
factorial = 1
for i in range(1, n + 1):
factorial *= i
return factorial
from decimal import Decimal, getcontext
getcontext().prec = 500
n = int(input("Enter a number n: "))
k = int(input("Enter a number k: "))
numerator = Decimal(factorial_loop(n))
denominator = Decimal(factorial_loop(k) * factorial_loop(n-k))
result = numerator / denominator
print("numerator: ", numerator)
print("denominator: ", denominator)
print("result: ", result)
4875197867478707228958513876216391120239539892113911200
Python 3.11.3 (main, Apr 7 2023, 00:39:07) [Clang 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0 on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import itertools
>>> a = set(range(1, 526))
>>> len(list(itertools.combinations(a, 35)))
import itertools
a = set(range(1, 526))
n = itertools.combinations(a, 35) # returns a generator, not a list
count = 0
try:
while True:
element = next(n)
count += 1
# Process the element
except StopIteration:
pass
print(count)
Python 3.11.3 (main, Apr 7 2023, 00:39:07) [Clang 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0 on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import itertools
>>> a = set(range(1, 526))
>>> len(list(itertools.combinations(a, 35)))