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

  • Home
  • SEARCH
  • 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 7031679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:50:06+00:00 2026-05-28T00:50:06+00:00

if there is an integer say 111 then there are 4 ways in which

  • 0

if there is an integer say 111 then there are 4 ways in which it can be said:
1. one one one
2. double two one
3. one double two
4. triple one

so how can one generate all possible ways for any integer eg. 33356777 etc.
I think this can be done by automata but can’t figure out how programatically
Thanks.

  • 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-05-28T00:50:07+00:00Added an answer on May 28, 2026 at 12:50 am

    The number of ways to “say” d^n where d is the digit and n is the number of repeats is simply 2^(n-1).

    Why? For each place between the repeating digit at place i and place (i+1): You can either “stop there” and tell the generated number so far, and advance to the next – or you can keep counting the d’s and go on. You repeat it for each i.

    To sum it all up, you go through your number, and multiply all of these: for exampe 33356777 will be 2^2 * 2^0 * 2^0 * 2^2 = 16

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

Sidebar

Related Questions

There are many ways of converting a String to an Integer object. Which is
Let's say I've got two integer values stored in double variables, e. g.: double
Say I have an integer, 9802, is there a way I can split that
For instance, there’s an integer column in a database table. Then in java model,
Lets say we have a negative integer say int a; is there a faster
We have a queue which contains only a single integer say a. Now this
Lets say I have these two tables: CREATE TABLE nodes ( id INTEGER PRIMARY
I have a relatively complicated generic type (say Map<Long,Map<Integer,String>> ) which I use internally
Let's say I have two same strings inside an ArrayList... is there a way
Let's say I have a type of lookup table which I can build for

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.