์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 |
- java
- ํฉํ ๋ฆฌ์ผ ์ง๋ฒ
- ๋ค์ต์คํธ๋ผ ์๊ณ ๋ฆฌ์ฆ
- ์ด์ง์ ๋ณํ
- sql
- ํ์ ๋ณ์
- Extended Slices
- DFS
- ์์ด
- jdbc
- MacOS
- ์ ํ ํฌ ํ์ด์ฌ
- PYTHON
- ๋ฐฑ์ค
- dacon
- ์ด๊ฒ์ด ์ทจ์ ์ ์ํ ์ฝ๋ฉํ ์คํธ๋ค
- np.zeros_like
- ๋ธ๋ผ์ฐ์ ์คํ
- ์ต์
- BFS
- ์ฐธ์กฐ ๋ณ์
- ์๋ฐ
- ๋ฐ์ค๊ทธ๋ํ
- 2BPerfect
- ํ๋ก๊ทธ๋๋จธ์ค
- matplotlib
- mysql
- Do it
- Do_it
- ์ง ๊ฐ ์์ธก ๋ถ์
- Today
- Total
๋ชฉ๋ก์ ์ฒด ๊ธ (109)
๐ฆ ๊ณต๋ฃก์ด ๋์!
a[::]๋ฅผ Extended Slices๋ผ๊ณ ๋ถ๋ฅด๊ณ ์ฌ์ฉ๋ฒ์ ํ๊ธฐ ๋ด์ฉ๊ณผ ๊ฐ๋ค ์์ ๋ค์ด์๋ ๊ฒ์ ์ธ๋ฑ์ค์ ๋ฒํธ!! a[a:b:c] # a๋ถํฐ b๊น์ง c๊ฐ๊ฒฉ์ผ๋ก a[::3] # 3๊ฐ๊ฒฉ์ผ๋ก ์ฒ์๋ถํฐ ๋๊น์ง a[1::5] # a[1]์์๋ถํฐ 5์ ๊ฐ๊ฒฉ์ผ๋ก a[::-1] # -1 ๊ฐ๊ฒฉ ์ฆ ์ญ์์ผ๋ก ์ถ๋ ฅ a[::-5] # ์ญ์์ผ๋ก 5์ ๊ฐ๊ฒฉ์ผ๋ก
def solution(phone_book): phone_book.sort() for i, j in zip(phone_book, phone_book[1:]): if j.startswith(i): return False return True ํด์ฌ def solution(phone_book): answer = True hash_map = {} for phone_number in phone_book: hash_map[phone_number] = 1 for phone_number in phone_book: temp = "" for number in phone_number: temp += number if temp in hash_map and temp != phone_number: answer = False re..
a1='abcdefghijklmnopqrstuvwxyz' b1=int(input()) b2=list(input()) a3=[(a1.index(i)+1)*(31**j) for i,j in zip(b2,range(b1))] print(sum(a3)%1234567891) ๋ค๋ฅธ ๋ต์ L = int(input()) string = input() answer = 0 for i in range(L): answer += (ord(string[i])-96) * (31 ** i) #์์คํค ์ฝ๋ ๊ฐ์ ๋๋ ค์ฃผ๋ ordํจ์ print(answer % 1234567891)
def solution(participant, completion): p=sorted(participant) c=sorted(completion) for i in range(len(c)): if p[i] != c[i]: return p[i] return p[len(p)-1] hash๋ฅผ ์ด์ฉํ ํ์ด def solution(participant, completion): answer = '' temp = 0 dic = {} for part in participant: dic[hash(part)] = part temp += int(hash(part)) for com in completion: temp -= hash(com) answer = dic[temp] return answer ...ํ์์ ์ด๋ค.....
์์์ ๊ธธ์ด๋ฅผ ๊ฐ๋ ๋ฉ์์ง๋ฅผ ์ ๋ ฅ๋ฐ์ ๊ณ ์ ๋ ๊ธธ์ด์ ํด์๊ฐ์ ์ถ๋ ฅํ๋ ํจ์ ๋์ ๋๋ฆฌ ์ฝ์ hash=dict() hash={} hash[1]='apple' hash['banana']=3 hash[(4,5)]=[1,2,3] hash[10] = dict({1:'a',2:'b'}) ๋์ ๋๋ฆฌ ์์ hash[1]='melon' hash['banana']=10 ๋์ ๋๋ฆฌ ๊ฐ ์ถ์ถ hash.pop(1) 'melon' hash.pop('banana') 10 hash.pop((4,5)) [1,2,3] hash.pop(10) {1:'a',2:'b'} ๋์ ๋๋ฆฌ ์ญ์ del hash[1] del hash['banana'] ๋์ ๋๋ฆฌ ํ์ฉ ๋์ ๋๋ฆฌ ๋ฃจํ hash = dict() hash.keys() ํค ๊ฐ ์ถ์ถ hash.values..
JPA ๊ฐ์ฒด - ํ ์ด๋ธ ๋งตํ : @Entity, @Table ํ๋ - ์ปฌ๋ผ์ ํนํ : @Column ๊ธฐ๋ณธํค์ ๋งตํ : @Id ์กฐ์ธ ๋งตํ : @ManyToOne, @JoinColumn @Entity @Entity ์ด๋ ธํ ์ด์ ์ ํด๋์ค์ ์ ์ธํ๋ฉด ๊ทธ ํด๋์ค๋ JPA๊ฐ ๊ด๋ฆฌํ๋ค. ๊ทธ๋ฌ๋ฏ๋ก DB์ ํ ์ด๋ธ๊ณผ Class(VO, DTO)์ ๋งตํํ๋ค๋ฉด ๋ฐ๋์ @Entity๋ฅผ ๋ถ์ฌ์ฃผ์ด์ผ ํ๋ค. @Entity๊ฐ ๋ถ์ ํด๋์ค์๋ ๋ค์ ์ ์ฝ์ฌํญ์ด ํ์ํ๋ค. ํ๋์ final, enum, interface, class๋ฅผ ์ฌ์ฉํ ์ ์๋ค. ์์ฑ์์ค ๊ธฐ๋ณธ ์์ฑ์๊ฐ ๋ฐ๋์ ํ์ํ๋ค. @Entity์ ์์ฑ1. name : ์ํฐํฐ ์ด๋ฆ์ ์ง์ ํฉ๋๋ค. ๊ธฐ๋ณธ๊ฐ์ผ๋ก ํด๋์ค ์ด๋ฆ์ ๊ทธ๋๋ก ์ฌ์ฉํ๋ค. @Table @Table ์ด๋ ธํ ์ด์ ์ ๋งตํํ ..