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 | 29 | 30 |
31 |
Tags
- html
- 파이썬 몫
- SQL 고득점 Kit
- 프로그래머스
- 슬라이싱
- 설계
- count
- 프로젝트
- List Comprehension
- 데이터
- 파이썬
- YOLOv5
- GIT
- 코딩테스트 연습
- 단어 공부
- ORDER BY
- sql
- python
- Python3
- 아이엠어바텐더
- Len
- date_format
- map
- 파이썬 슬라이싱
- where
- Join
- 백준
- css
- pcce 기출문제
- Django
Archives
- Today
- Total
목록2024/03/01 (1)
nan + nan = 2nan
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/c73Nr5/btsFeSHhXRx/P7oAZ5XDDBqKIxkjbwYm0K/img.png)
코드 입력 word = input() # 단어 길이가 짝수일 경우 if (len(word)%2)==0: # 중간 두 문자 중 첫째 문자 인덱스 (ex. abcd -> b) std = len(word) // 2 # 앞 문자열 (ab) start_ = word[0:std] # 뒤 문자열 (cd) end_ = word[std:] # 앞 문자열과 뒷 문자열의 역순이 일치하면 1, 아니면 0 if start_ == end_[::-1]: print(1) else: print(0) # 단어 길이가 홀수일 경우 else: # 중간 문자의 인덱스 (ex. abcde -> c) std = len(word) // 2 # 앞 문자열 (ab) start_ = word[0:std] # 뒤 문자열 (cd) end_ = word[s..
Python/백준 알고리즘
2024. 3. 1. 16:15