|
|
back to boardWhy WA 10? var AD,AC,BD,BC,X,Y:int64; CD:real;
BEGIN read(AD,AC,BD,BC);
X:=AD*AC-BD*BC; Y:=AD*AC*(BD*BD+BC*BC)-BD*BC*(AD*AD+AC*AC); if(X=0)or(Y*X<0) then write('Impossible.') else begin write('Distance is '); CD:=1000*sqrt(Y/X); write(CD:0:0,' km.'); end; END. |
|
|