Logo
(追記) (追記ここまで)

26548번 - Quadratics 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB46026624258.596%

문제

After hearing that the quadratic formula is used constantly in calculus, you decide that it would be more efficient to just write a program for it! Write a program that solves the equation shown below:

$$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$

The $\pm$ sign represents two different equations, one with $+$ and one with $-$. Your answer will be both answers, separated by a comma and a space.

입력

The first line will contain a single integer $n$ that indicates the number of data sets that follow. Each data set will contain three numbers (integer or decimal) on a single line, representing $a,ドル $b,ドル and $c$ respectively.

출력

Output the two answers to the equation, rounded to the thousandths digit and separated by a comma and one space. The $+$ sign will be the first answer, then the $-$ sign will be the second. The solutions will always be real numbers.

제한

예제 입력 1

2
1 6 3
4 10 6.1

예제 출력 1

-0.551, -5.449
-1.056, -1.444

힌트

출처

School > PLU High School Programming Contest > PLU 2018 > Novice 5번

School > PLU High School Programming Contest > PLU 2018 > Advanced 5번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /