22 lines
536 B
Python
22 lines
536 B
Python
input("To start benchmark, press enter...")
|
|
print("Testing your computer...")
|
|
|
|
import time
|
|
|
|
fromStartTest = time.time_ns()
|
|
|
|
n = 100000
|
|
def factorial(kolvo):
|
|
fakt = 1
|
|
for i in range(1, kolvo + 1):
|
|
fakt = fakt * i
|
|
return fakt
|
|
schislo = factorial(n)
|
|
|
|
|
|
timeForBench1 = time.time_ns() - fromStartTest
|
|
|
|
|
|
print("Time elapsed for bench 1 is " + str(timeForBench1/1000000000) + "s")
|
|
print("Now it is time for benchmark 2, results of all bench and mark of computer you will see later")
|
|
input("To exit CatBench press enter...") |