Submission details
Task:Polygon area
Sender:Abduvohid
Submission time:2025-11-10 16:30:17 +0200
Language:Python3 (PyPy3)
Status:READY
Result:
Test results
testverdicttime
#10.04 sdetails
#20.06 sdetails
#30.04 sdetails

Code

n = int(input())
corners = []

def area(coords):
    t=0
    for count in range(len(coords)-1):
        y = coords[count+1][1] + coords[count][1]
        x = coords[count+1][0] - coords[count][0]
        z = y * x
        t += z
    return abs(t/2.0)

for i in range(n):
    x, y = map(int, input().split())
    corners.append((x, y))

print(int(2 * area(corners)))

Test details

Test 1

Verdict:

input
100
-7 -19
91 77
100 100
64 60
...

correct output
43582

user output
44042

Feedback: Incorrect character on line 1 col 2: expected "43582", got "44042"

Test 2

Verdict:

input
1000
365625896 -113418831
278762563 38777445
250367343 -96991975
175866909 -129766978
...

correct output
4053466653883387139

user output
4081219450719990272

Feedback: Incorrect character on line 1 col 3: expected "405346665388...", got "408121945071..."

Test 3

Verdict:

input
4
-1000000000 -1000000000
-1000000000 1000000000
1000000000 1000000000
1000000000 -1000000000

correct output
8000000000000000000

user output
4000000000000000000

Feedback: Incorrect character on line 1 col 1: expected "800000000000...", got "400000000000..."