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
- Petri net
- One-Sided Selection
- Gausian Density Estimation
- auto encoder
- Data Imbalance
- OCSVM
- GAN
- 프로세스 마이닝
- 거리 기반 이상탐지
- Condensed neares neighbor rule
- Fixed Learning
- Digital Pathology
- Generative modeling
- SQL 데이터 분석 첫걸음
- Sequence data
- Meta heuristic
- Process Mining
- Inatance segmentation
- Tomek links
- Random Undersampling
- multi modal
- 밀도 기반 이상탐지
- XAI
- PM4Py
- 딥러닝
- Clustering 기반 이상탐지
- Text generation
- Grad-CAM
- 국비지원교육
- 병리 AI
Archives
- Today
- Total
Create Opportunities
[알고리즘] 개인정보 수집 유효기간 본문
List 형태로 주어진 term의 형태는 ['A 6', 'B 12', 'C 3'] 와 같은 형태이다. 이를 Dictionary로 아래와 같이 변환할 수 있다.
termsInfo = dict()
term = term.split()
termsInfo[term[0]] = int(term[1]) * 28 #(x28은 month to day를 위해서)
Lv. 1
def dateToDay(date):
y, m, d = map(int, date.split("."))
return (y * 12 * 28) + (m * 28) + d
def solution(today, terms, privacies):
answer = []
# today
today = dateToDay(today)
# terms
termsInfo = dict()
for term in terms:
term = term.split()
termsInfo[term[0]] = int(term[1]) * 28
# privacies
for i in range(len(privacies)):
date, term = privacies[i].split()
if dateToDay(date) + termsInfo[term] <= today:
answer.append(i+1)
return answer
'알고리즘' 카테고리의 다른 글
[알고리즘] 상담예약제, 티셔츠 (0) | 2023.03.16 |
---|---|
[알고리즘] Hash, Greedy, Sort (0) | 2023.03.10 |
[알고리즘] 뒤에 있는 큰 수 찾기 (0) | 2023.03.06 |
[알고리즘] 둘만의 암호 (1) | 2023.03.06 |
[알고리즘] 숫자 변환 (0) | 2023.03.02 |