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 6802115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:11:01+00:00 2026-05-26T19:11:01+00:00

I have to write some PHP code which determines what possible stackoverflow scores are.

  • 0

I have to write some PHP code which determines what possible stackoverflow scores are.

When a user registers he gets 1 point of reputation (lets call this POR).

From here I have to find out what the possible POR values are until the user reaches 100 POR

example:

user1 = 1 (registration) + 10 (good answer) - 2 (bad answer) = 9 POR
user2 = 1 (registration) + 5 (good question) + 10 (good answer) = 16 POR

The possible choices are:

+10 good answer
+5 good question
-2 bad answer/question

What I was thinking of doing is:

until 100 POR and start from 1
 for all 3 possibilites
  choose a random posibility and append the current score with - and the actual score
 end
end

Is there a way to do this which will avoid repetitions?

  • 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-26T19:11:02+00:00Added an answer on May 26, 2026 at 7:11 pm

    First abstract your problem: You are basically asking for the number of paths in a graph, with 100 nodes as the POR between 1 and 100 and 3 edges from each node (+10, +5, -2).

    You might be asking for the number of paths in this graph. Unfortunately, the graph is cyclic (1 good answer, 5 bad answers, and you are back to 1). The answer is thus “infinite”.

    You might also be asking for the scores that can be reached (the nodes reachable from node 1). You can figure that out on paper, as well, by looking sharply at the combination of one good question and two bad answers.

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

Sidebar

Related Questions

I'm an avid vim user and have started to write some SQL code recently.
I have some PHP code which runs a loop, spitting out a button and
So far I have managed to write some code that should print the source
I have a quad core machine and would like to write some code to
I have created a report in MS Access report and write some VBA code
I have a mobile platform that I am trying to write some communications code
I have 2 checkboxes in a form and onclick of these, some php code
I am trying to rewrite some server php code which logs into a website,
I have the following php code which I found here : function download_xml() {
I have been attempting to write some routines to read RSS and ATOM feeds

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.