Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- leetcode
- Baekjoon
- 프로그래머스
- 자연어처리
- AI 경진대회
- Kaggle
- SW Expert Academy
- programmers
- Git
- 백준
- 코로나19
- Real or Not? NLP with Disaster Tweets
- gs25
- 맥북
- 편스토랑
- dacon
- ChatGPT
- hackerrank
- PYTHON
- 데이콘
- 파이썬
- 편스토랑 우승상품
- 프로그래머스 파이썬
- Docker
- 금융문자분석경진대회
- 더현대서울 맛집
- ubuntu
- github
- 캐치카페
- 우분투
Archives
- Today
- Total
솜씨좋은장씨
[Programmers] 7의 개수 (Python) 본문
728x90
반응형

코딩 1일 1문제! 오늘의 문제는 프로그래머스의 7의 개수 입니다.
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
👨🏻💻 문제 풀이
array list 에서 숫자를 하나씩 꺼내온 다음
꺼낸 숫자를 str 형식으로 바꾼 뒤
.count 로 구한 7의 개수를 answer 에 더하면 끝!
👨🏻💻 코드 ( Solution )
def solution(array):
answer = 0
for num in array:
answer += str(num).count("7")
return answer
GitHub - SOMJANG/CODINGTEST_PRACTICE: 1일 1문제 since 2020.02.07
1일 1문제 since 2020.02.07. Contribute to SOMJANG/CODINGTEST_PRACTICE development by creating an account on GitHub.
github.com
'Programming > 코딩 1일 1문제' 카테고리의 다른 글
[Programmers] 문자열 계산하기 (Python) (0) | 2023.02.27 |
---|---|
[BaekJoon] 6581번 : HTML (Python) (0) | 2023.02.26 |
[Programmers] 짝수 홀수 개수 (Python) (0) | 2023.02.23 |
[Programmers] 명예의 전당 (1) (Python) (0) | 2023.02.22 |
[Programmers] 분수의 덧셈 (Python) (0) | 2023.02.21 |