250x250
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 |
Tags
- 파이썬 슬라이싱
- 단어 공부
- sql
- Join
- ORDER BY
- html
- 데이터
- 프로그래머스
- 코딩테스트 연습
- YOLOv5
- css
- 백준
- Django
- 아이엠어바텐더
- 파이썬
- where
- map
- 설계
- Len
- List Comprehension
- GIT
- 파이썬 몫
- count
- date_format
- Python3
- SQL 고득점 Kit
- pcce 기출문제
- 프로젝트
- 슬라이싱
- python
Archives
- Today
- Total
목록globals() (1)
nan + nan = 2nan
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bM7nVa/btrWghj96Sw/K3EG1oIMqzkJviKRuxbi4K/img.png)
코드 입력 class var: def __init__(self, price, cnt): self.price = price self.cnt = cnt total = int(input()) total_cnt = int(input()) def val_price(): for i in range(1, total_cnt+1): p, c = map(int, input().split()) globals()[f'stuff_{i}'] = var(p, c) val_total = 0 for g in globals(): if 'stuff' in g: val_total += globals()[g].price * globals()[g].cnt if val_total != total: return print('No') else: r..
Python/백준 알고리즘
2023. 1. 14. 20:01