Skip to main content
deleted 9 characters in body; added 1 characters in body
Source Link
fR0DDY
  • 4.6k
  • 27
  • 38

Given equation of two lines in the format Ax+By=C, determine their intersection point. If they are parallel print 'parallel' without quotes. For input/output format refer sample input/output.

Input 1x+1y=1 1x-1y=1 Output (1.00,0.00) Input 0x+1y=0 1x+0y=0 Output (0.00,0.00) 
  1. -1000000 <= A,B,C are integers less than<= 1000000.
  2. Note their intersection point may not be integer. Print upto two decimal places.
  3. Shortest solution wins.

Given equation of two lines in the format Ax+By=C, determine their intersection point. If they are parallel print 'parallel' without quotes. For input/output format refer sample input/output.

Input 1x+1y=1 1x-1y=1 Output (1.00,0.00) Input 0x+1y=0 1x+0y=0 Output (0.00,0.00) 
  1. A,B,C are integers less than 1000000.
  2. Note their intersection point may not be integer. Print upto two decimal places.
  3. Shortest solution wins.

Given equation of two lines in the format Ax+By=C, determine their intersection point. If they are parallel print 'parallel' without quotes. For input/output format refer sample input/output.

Input 1x+1y=1 1x-1y=1 Output (1.00,0.00) Input 0x+1y=0 1x+0y=0 Output (0.00,0.00) 
  1. -1000000 <= A,B,C <= 1000000.
  2. Note their intersection point may not be integer. Print upto two decimal places.
  3. Shortest solution wins.
Tweeted twitter.com/#!/StackCodeGolf/status/59811873712910337
Source Link
fR0DDY
  • 4.6k
  • 27
  • 38

Intersection of Two Lines

Given equation of two lines in the format Ax+By=C, determine their intersection point. If they are parallel print 'parallel' without quotes. For input/output format refer sample input/output.

Input 1x+1y=1 1x-1y=1 Output (1.00,0.00) Input 0x+1y=0 1x+0y=0 Output (0.00,0.00) 
  1. A,B,C are integers less than 1000000.
  2. Note their intersection point may not be integer. Print upto two decimal places.
  3. Shortest solution wins.