We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c819e8d commit c4bffa9Copy full SHA for c4bffa9
김지호/5주차/260126.py
@@ -0,0 +1,18 @@
1
+# https://www.acmicpc.net/problem/2166
2
+
3
+import sys
4
5
+sys.stdin = open("./input.txt",'r')
6
7
+N = int(input())
8
+coordinates = []
9
10
+for _ in range(N):
11
+ coordinates.append(list(map(int,input().split(' '))))
12
+coordinates.append(coordinates[0])
13
14
+answer = 0
15
+for i in range(N):
16
+ answer += (coordinates[i][0] * coordinates[i+1][1]) - (coordinates[i+1][0]*coordinates[i][1])
17
18
+print(abs(answer)/2)
0 commit comments