Submit solution

Points:
7

Time limit:
0.6s

Memory limit:
64M

Problem type

Allowed languages

Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, ~~CommonLisp~~, D, Dart, F#, Forth, Fortran, Go, ~~Groovy~~, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, ~~Nim~~, ~~ObjC~~, OCaml, ~~Octave~~, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Having covered addition, Xyene's teacher moves on to something much more challenging - analytical geometry. Once again out of his depth, Xyene approaches you for help with his homework.

For today's homework, Xyene has () triangles. Each triangle is defined by the points , , (). His task is to calculate both the area () and perimeter () of the triangle . A difficult task indeed, but thankfully he has you to help! Do Xyene's homework for him so he doesn't have to.

#### Input Specification

One line containing , the number of triangles to follow. The next lines contain 6 integers separated by single spaces: of each .

#### Output Specification

lines, containing and to at least 2 decimal places separated by a single space.

#### Sample Input

```
1
0 0 0 1 1 1
```

#### Sample Output

`0.50 3.41`

## Comments

This comment is hidden due to too much negative feedback. Click here to view it.

Can someone please look at my code? I'm not sure why it's wrong.

Precision is an important aspect of this problem, try to keep your values as precise as possible! You're also printing in a strange format, you'll need to print the numbers without scientific notation.

Ah thanks. I'm gonna try it using c++ instead.

I'm a bit confused, what's wrong with my code?

You need to print them

separated by a single space.In addition to the mighty Dingledooper (aka: Jack from Vic Park), a new line is required after each output

loool yea i totally forgot that the output should be seperated by spaces. thanks everyone

I'm also pretty sure you are supposed to print it to at least 2 decimal places, the way java has decimals is weird, so format it with

`string.format()`

or`printf()`

I don't think you're using the correct formula to approach this problem.

Can someone look at my solution? what is the 'value error'

You can check other status codes here.

Edit: I forgot to press the reply button. ;-;

What does IR mean?

This comment is hidden due to too much negative feedback. Click here to view it.

This comment is hidden due to too much negative feedback. Click here to view it.

I guess so, maybe it means like always in a positive quadrant, the triangle is arranged in the same sort of way on a Cartesian grid?

This comment is hidden due to too much negative feedback. Click here to view it.

id instead of is.

Fixed.

This comment is hidden due to too much negative feedback. Click here to view it.

This comment is hidden due to too much negative feedback. Click here to view it.