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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:31:01+00:00 2026-05-25T14:31:01+00:00

Trying to figure out where to start with this. The equation contains two unknowns

  • 0

Trying to figure out where to start with this. The equation contains two unknowns and the solution for x or y is always a positive number.

Given a = 123 and b = 55 and c = 5. In this case x = 31 and y = 93 but I don’t know that ahead of time and I’m trying to write a function in C# to solve it.

a - (x + 1) * 96 - (y + 2) + 3104 - c = b

Also if a = 30 and b = 8 and c = 19 then x = 32 and y = 35

so for:
Round 1
function solveX(123, 55, 5) returns 31
function solveY(123, 55, 5) returns 93

Round 2
function solveX(30, 8, 19) returns 32
function solveY(30, 8, 19) returns 35

Any pointers on where to get started would be great.

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-25T14:31:02+00:00Added an answer on May 25, 2026 at 2:31 pm

    This is a linear Diophantine equation. Its solution is very well known. It can be rewritten in the form ex + fy = d. Find g = gcd(e, f). If d = g then there are infinitely many integral solutions, and these can be found using the extended Euclidean algorithm. Consequently, if d is merely a multiple of g, there are infinitely many solutions as well. If d is not a multiple of g, there are no solutions.

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

Sidebar

Related Questions

Hey I'm having a problem trying to figure this out: Lets start out with
I've been trying to figure out a solution to this problem but haven't been
I am trying to figure out how to grab the start directory for my
After trying to figure out why a Capistrano task (which tried to start a
Trying to figure out how I can do this properly. The print_r looks like
trying to figure out why this is happening - I have an input text
I am trying to figure out how to start and stop a serial interface.
I'm trying to figure out if I should start using the recently added object
I am trying to figure out the syntax to register a callback with this
I'm trying to figure out how to make this hack for attr_accessible to support

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.