반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- N과M
- level2
- dfs
- 파이썬
- 다익스트라
- 백준
- level0
- 코딩테스트
- level1
- level3
- 가상메모리
- programmers
- MYSQL
- 가상메모리 관리
- 힙
- 스택
- BOJ
- 재귀
- 딕셔너리
- 다이나믹 프로그래밍
- 브루트포스
- 운영체제
- python
- 에라스토테네스의 체
- 구현
- 그리디
- BFS
- 프로그래머스
- 수학
- DP
Archives
- Today
- Total
목록다각형의 면적 (1)
동캄의 코딩도장
백준 2166 [다각형의 면적] 파이썬
https://www.acmicpc.net/problem/2166 2166번: 다각형의 면적 첫째 줄에 N이 주어진다. 다음 N개의 줄에는 다각형을 이루는 순서대로 N개의 점의 x, y좌표가 주어진다. 좌표값은 절댓값이 100,000을 넘지 않는 정수이다. www.acmicpc.net # 백준 2166 import sys input = sys.stdin.readline n = int(input()) pos = [] for _ in range(n): cardi = list(map(int, input().split())) pos.append(cardi) pos.append(pos[0]) answer = 0 for i in range(n): answer += (pos[i][0]*pos[i+1][1]) answ..
코테/BOJ
2022. 2. 12. 00:11