From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:ac8:5991:0:b0:415:2360:d099 with SMTP id e17-20020ac85991000000b004152360d099mr20108qte.12.1694768597207; Fri, 15 Sep 2023 02:03:17 -0700 (PDT) X-Received: by 2002:a9d:7a92:0:b0:6b7:4ec4:cbb1 with SMTP id l18-20020a9d7a92000000b006b74ec4cbb1mr244990otn.7.1694768596969; Fri, 15 Sep 2023 02:03:16 -0700 (PDT) Path: eternal-september.org!news.eternal-september.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 15 Sep 2023 02:03:16 -0700 (PDT) Injection-Info: google-groups.googlegroups.com; posting-host=54.199.214.131; posting-account=fZvo4QoAAABi0pYBrtK7uR0nkDKUP_JT NNTP-Posting-Host: 54.199.214.131 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: project euler 29 From: "CSYH (QAQ)" Injection-Date: Fri, 15 Sep 2023 09:03:17 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 1736 Xref: news.eternal-september.org comp.lang.ada:65656 List-Id: Hello, everyone. Now this time, I am facing trouble for problem #29. As I know integer type is for 32 bits. but for this problem as me to find out the 2 ** 100 and even 100 ** 100. I used python to get the answer correctly in 5 minutes. context = [] for a in range(2,101): for b in range(2,101): context.append(a**b) len(list(set(context))) I know the algorithm is easy, but I am pretty interesting how to calculate a large like it. And thanks for the help from problem 26, your discussions come my every working hour. for this problem I want to know how to know is there an easy way to store a large number like 100 ** 100, and how do U make a similar function like "set(context)" to delete the duplicated value in a vector. Thanks >From CSYH(QAQ)