Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9149247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:27:04+00:00 2026-06-17T11:27:04+00:00

So, I was trying to do problem # 16 on Project Euler, from http://projecteuler.net

  • 0

So, I was trying to do problem # 16 on Project Euler, from http://projecteuler.net if you haven’t seen it. It is as follows:

2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.

What is the sum of the digits of the number 2^1000?

I am having trouble figuring out how to represent the number 2^1000 in C++. I am guessing there is a trick to this, but I am really stuck. I don’t really want the answer to the problem, I just want to know how to represent that number as a variable, or if perhaps there is a trick, maybe someone could let me know?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:27:05+00:00Added an answer on June 17, 2026 at 11:27 am

    Represent it as a string. That means you need to write two pieces of code:

    1. You need to write a piece of code to double a number, given that number as a string.

    2. You need to write a piece of code to sum the digits of a number represented as a string.

    With those two pieces, it’s easy.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on problem 14 of Project Euler ( http://projecteuler.net/problem=14 ). I'm trying to
I am trying to solve project euler problem 18 . http://projecteuler.net/problem=18 I tried a
I'm trying to solve Project Euler #9, which is http://projecteuler.net/index.php?section=problems&id=9 . I've looked through
I'm trying to solve a mathematical problem from http://projecteuler.net using javascript: to find the
I'm trying to solve Problem 13 of project euler, which involves the sum of
I'm trying to solve Project Euler problem #16, where I need to sum all
While trying problem 41 from the Euler Project, I ran across what seems to
So I'm trying out Problem 7 of Project Euler. By listing the first six
I am trying to solve Project Euler problem in Clojure using recursion. The following
I'm trying to solve Problem #5 in Project Euler. The code works for the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.