| Task: | Polygon area |
| Sender: | aalto26jm_002 |
| Submission time: | 2026-11-09 16:38:01 +0200 |
| Language: | Python3 (PyPy3) |
| Status: | READY |
| Result: | WRONG ANSWER |
| test | verdict | time | |
|---|---|---|---|
| #1 | ACCEPTED | 0.04 s | details |
| #2 | ACCEPTED | 0.04 s | details |
| #3 | WRONG ANSWER | 0.04 s | details |
Code
import sys
input = list(map(int,sys.stdin.read().split()))
n = input[0]
res = 0
i = 1
x1 = input[1]
y1 = input[2]
while i < 2*n:
if i == 2*n-1 :
x,y = input[i], input[i+1]
tmp = x*y1 - x1*y
res +=tmp
i +=2
else :
x = input[i]
y = input[i+1]
x_n = input[i+2]
y_n = input[i+3]
i +=2
tmp = x*y_n - x_n*y
res += tmp
print(res)Test details
Test 1
Verdict: ACCEPTED
| input |
|---|
| 100 -7 -19 91 77 100 100 64 60 ... |
| correct output |
|---|
| 43582 |
| user output |
|---|
| 43582 |
Test 2
Verdict: ACCEPTED
| input |
|---|
| 1000 365625896 -113418831 278762563 38777445 250367343 -96991975 175866909 -129766978 ... |
| correct output |
|---|
| 4053466653883387139 |
| user output |
|---|
| 4053466653883387139 |
Test 3
Verdict: WRONG ANSWER
| input |
|---|
| 4 -1000000000 -1000000000 -1000000000 1000000000 1000000000 1000000000 1000000000 -1000000000 |
| correct output |
|---|
| 8000000000000000000 |
| user output |
|---|
| -8000000000000000000 |
Feedback: Incorrect character on line 1 col 1: expected "800000000000...", got "-80000000000..."
