This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
kse-02/tests/test_exponentiation.py

10 lines
2 KiB
Python
Raw Normal View History

2023-12-09 13:43:29 +00:00
from unittest import TestCase
from benchmark.exponentiation import exponentiation
class Test_exponentiation(TestCase):
2023-12-25 21:24:01 +00:00
# distances_true = {1: [0, 0, 0, 0, 0, 0, 0, 0, 0, 1], 3: [0], 2: [1, 0, 1, 0, 1, 0, 1, 1, 1]}
# distances_false = {1: [679, 339, 169, 84, 41, 20, 9, 4, 1, 0], 3: [1], 2: [0, 1, 0, 1, 0, 1, 0, 0, 0]}
2023-12-09 13:43:29 +00:00
def test_exponentiation_1(self):
2023-12-25 21:24:01 +00:00
assert exponentiation(baseNumber=273, power=680) == 3895829911570928427062789161404619914280587771868641368230047219958283345300450942897840323420791983227798964155996689168523437566770315575583013976403957872742182353547463597025702302902832229086505206794667167898163934216590804080800733688120376430395338105859000612063507722208813216463729860745825987959359261789071423513895716311721748115129973945455387902352811050072692137174188206432034223389947642057171762532443123845107375361110833977798080587890468684612289410208695964211522638003354245409255507983104542683355382317518977114366295148467288902108644080093389079060315506570882647437359202448921746467958494827152271151409822952703502092414977688648082960249156331982392167922155653098989699335892059699361415118388425849978057627932625853662432314879750773240572688797268782645610220407914772433232815718897161329409011757811650965412399303355317182165903778708510492810189246784961371248406019716330925132073748574311471381406856686563502008322111913444321152997673213749133497305507944474723081065221727352562980326137327122607087182234700957778053610249838737764681707961211892627389095734978445860126630875401467771828849380219936663564390488252632365445815860667399405147173712004117843019973408114982416950170127509936321352740444103690166146920102943006785619658810173984204313195394806290104680248135955773591764204824995379131427455872719071405823820721924895558772558138790298999583595141680838833952767448791324515927781329111543905447682668609169946357479866063142378522581199077752915958479926692022074057503083311484355723701186263368366885202884101517116580212732955571601354373596263954677080515220048136220941141669130397916801