コード例 #1
0
def main():
    numbers = [
        22, 19, 65, 76, 60, 3, 15, 27, 53, 1, 23, 45, 38, 72, 54, 73, 29, 78,
        47, 21, 0, 42, 63, 39, 13, 7, 59, 28, 51, 36, 11, 18, 74, 6, 50, 8, 17,
        33, 64, 4, 12, 9, 79, 24, 62, 56, 14, 70, 41, 69, 67, 5, 48, 16, 71,
        52, 58, 34, 68, 49, 40, 43, 26, 30, 32, 66, 35, 10, 20, 2, 61, 31, 77,
        55, 37, 25, 46, 75, 57, 44
    ]
    benchmark(100, answer, numbers)
コード例 #2
0
def main():
    N = 600851475143
    benchmark(100, answer, N)
コード例 #3
0
def main():
    benchmark(10000, answer, [1, 2, 3], 11)
コード例 #4
0
def main():
    seq = [44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64]

    benchmark(1000, answer, seq)
    benchmark(1000, answer2, seq)
コード例 #5
0
def main():
    benchmark(100, answer, 1, 2)
コード例 #6
0
def main():
    numbers = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
    benchmark(100, bubble_sort, numbers)
コード例 #7
0
def main():
    benchmark(100, prime_factors_using_trial_division, 99999999999999999999)
コード例 #8
0
def main():
    benchmark(100, answer, 'a=1, b=2')
    benchmark(100, answer, '1, 2')
コード例 #9
0
def main():
    N = 10000
    benchmark(1000, sieve_of_eratosthenes, 1000)
コード例 #10
0
def main():
    upper_bound = 4000000
    benchmark(1000, answer, upper_bound)
コード例 #11
0
def main():
    N = 10000
    benchmark(1000, sieve_of_eratosthenes, 1000)
コード例 #12
0
def main():
    benchmark(100, answer)
    benchmark(100, answer, 100, 999)
コード例 #13
0
def main():
    vertices = [[91207, 89566], [-88690, -83026], [67100, 47194]]
    expected = 1730960165
    benchmark(100, answer, vertices)
コード例 #14
0
def main():
    benchmark(100, answer)
    benchmark(100, answer, 100, 999)
コード例 #15
0
def main():
    benchmark(100, answer, 'a=1, b=2')
    benchmark(100, answer, '1, 2')
コード例 #16
0
def main():
    numbers = [22, 19, 65, 76, 60, 3, 15, 27, 53, 1, 23, 45, 38, 72, 54, 73, 29, 78, 47, 21, 0, 42, 63, 39, 13, 7,
               59, 28, 51, 36, 11, 18, 74, 6, 50, 8, 17, 33, 64, 4, 12, 9, 79, 24, 62, 56, 14, 70, 41, 69, 67, 5,
               48, 16, 71, 52, 58, 34, 68, 49, 40, 43, 26, 30, 32, 66, 35, 10, 20, 2, 61, 31, 77, 55, 37, 25, 46,
               75, 57, 44]
    benchmark(100, answer, numbers)
コード例 #17
0
def main():
    seq = [44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64]

    benchmark(1000, answer, seq)
    benchmark(1000, answer2, seq)
コード例 #18
0
def main():
    upper_bound = 4000000
    benchmark(1000, answer, upper_bound)
コード例 #19
0
def main():
    benchmark(100, is_fermat_prime, 999998727899999, 1000)
コード例 #20
0
def main():
    N = 1000
    benchmark(100, answer, N)