์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 |
- np.zeros_like
- ๋ฐฑ์ค
- ํ๋ก๊ทธ๋๋จธ์ค
- ์ง ๊ฐ ์์ธก ๋ถ์
- sql
- ์์ด
- Do it
- java
- PYTHON
- matplotlib
- BFS
- ํฉํ ๋ฆฌ์ผ ์ง๋ฒ
- jdbc
- Extended Slices
- ๋ฐ์ค๊ทธ๋ํ
- ํ์ ๋ณ์
- DFS
- 2BPerfect
- ๋ธ๋ผ์ฐ์ ์คํ
- ์ต์
- ์ฐธ์กฐ ๋ณ์
- ์ ํ ํฌ ํ์ด์ฌ
- ์ด๊ฒ์ด ์ทจ์ ์ ์ํ ์ฝ๋ฉํ ์คํธ๋ค
- Do_it
- ์๋ฐ
- ์ด์ง์ ๋ณํ
- mysql
- ๋ค์ต์คํธ๋ผ ์๊ณ ๋ฆฌ์ฆ
- dacon
- MacOS
- Today
- Total
๋ชฉ๋ก๋ถ๋ฅ ์ ์ฒด๋ณด๊ธฐ (109)
๐ฆ ๊ณต๋ฃก์ด ๋์!
import java.util.*; class Solution { public static int[] solution(int[] answers) { int[][] patterns = { {1, 2, 3, 4, 5}, {2, 1, 2, 3, 2, 4, 2, 5}, {3, 3, 1, 1, 2, 2, 4, 4, 5, 5} }; int[] hit = new int[3]; for(int i = 0; i < hit.length; i++) { for(int j = 0; j < answers.length; j++) { if(patterns[i][j % patterns[i].length] == answers[j]) hit[i]++; } } int max = Math.max(hit[0], Math.max(hit[1], h..
์กฐ๊ฑด์์ฐธ์ด๋ฉด success ๊ฑฐ์ง์ด๋ฉด failure message = "success" **if** score >= 60 **else** "failure" ์ฐธ์ด๋ฉด success ๊ฑฐ์ง์ด๋ฉด failure ๋ฐ๋ณต๋ฌธ ํ๋กฌํํธ ๋ง๋ค๊ธฐ prompt = """ ... 1. Add ... 2. Del ... 3. List ... 4. Quit ... ... Enter number: """ >>> number = 0 >>> while number != 4: ... print(prompt) ... number = int(input()) ... 1. Add 2. Del 3. List 4. Quit Enter number: ์์ >>> a = [(1,2), (3,4), (5,6)] >>> for (first, last) in a..
๋ฌธ์์ด ์๋ฃํ formatํจ์ "I eat {0} apples".format(3) 'I eat 3 apples' f๋ฌธ์์ด ํฌ๋งคํ >>> name = 'ํ๊ธธ๋' >>> age = 30 >>> f'๋์ ์ด๋ฆ์ {name}์ ๋๋ค. ๋์ด๋ {age}์ ๋๋ค.' '๋์ ์ด๋ฆ์ ํ๊ธธ๋์ ๋๋ค. ๋์ด๋ 30์ ๋๋ค.' ์ด์ค์ผ์ดํ ์ฝ๋์ฝ๋์ค๋ช \n ๋ฌธ์์ด ์์์ ์ค์ ๋ฐ๊ฟ ๋ ์ฌ์ฉ \t ๋ฌธ์์ด ์ฌ์ด์ ํญ ๊ฐ๊ฒฉ์ ์ค ๋ ์ฌ์ฉ \\ ๋ฌธ์ \๋ฅผ ๊ทธ๋๋ก ํํํ ๋ ์ฌ์ฉ \' ์์๋ฐ์ดํ(')๋ฅผ ๊ทธ๋๋ก ํํํ ๋ ์ฌ์ฉ \" ํฐ๋ฐ์ดํ(")๋ฅผ ๊ทธ๋๋ก ํํํ ๋ ์ฌ์ฉ \r ์บ๋ฆฌ์ง ๋ฆฌํด(์ค ๋ฐ๊ฟ ๋ฌธ์, ํ์ฌ ์ปค์๋ฅผ ๊ฐ์ฅ ์์ผ๋ก ์ด๋) \f ํผ ํผ๋(์ค ๋ฐ๊ฟ ๋ฌธ์, ํ์ฌ ์ปค์๋ฅผ ๋ค์ ์ค๋ก ์ด๋) \a ๋ฒจ ์๋ฆฌ(์ถ๋ ฅํ ๋ PC ์คํผ์ปค์์ '์'..
Mybatis ์ ์ฉ 1. mybatis๋ฅผ ๋ค์ด ๋ฐ๊ณ jar๋ฅผ mysql-connector๊ณผ ๊ฐ์ ๊ฒฝ๋ก์ ๋ถ์ฌ๋ฃ์ด์ค๋ค. 2. mybatis-config.xmlํ์ผ์ srcํ์ผ๋ด ์์ฑ์ ํ๊ณ ํ๊ธฐ ๋ด์ฉ์ mybatis docs์์ ๊ฐ์ ธ์จ๋ค. 3. eclipse source ํญ์ ๋ถ์ฌ๋ฃ์ด์ค๋ค. 4. value๊ฐ๊ณผ resoure ๊ฐ์ ๊ณ ์ณ์ค๋ค. resource๋ ๋ค์์ ๋ง๋ค xmlํ์ผ๊ณผ ์ด๋ฆ์ด ๋์ผํด์ผํ๋ค. 5. member.xml์ ๋ง๋ค๊ณ source ํญ์ ๋ถ์ฌ๋ฃ์ด์ค๋ค. 6. namespace, id, resultType์ ๋ง๊ฒ ์์ ํ๊ณ ์ํ๋ sql๊ตฌ๋ฌธ์ selectํ๊ทธ ์์ ์์ฑํ๋ค. 7. class์์๋ ํด๋น ๋ด์ฉ์ main๋ฉ์๋ ์์ ๋ถ์ฌ๋ฃ์ด์ฃผ๊ณ import๋ฅผ ์์ผ์ค๋ค. resource ํ์ผ๊ณผ ์ ํ์๋ฅผ..
Mybatis...2 ํ์๋ฑ๋ก > insert into member(no,name,tel,intro,addr) values(#{no},#{name},#{tel},#{intro},#{addr}) ์๊ธฐ ์ฝ๋๋ฅผ member.xml์ mapper ํ๊ทธ ์์ ์ง์ด๋ฃ๊ณ ์์ ๋ณด์ด๋ insert ํ๊ทธ ๊ฐ์ ๊ฒฝ์ฐ์ ๊ผญ insert๊ฐ ๋ ํ์๋ ์๋ค try (SqlSession session = sqlSessionFactory.openSession(true)) { MemberVo vo =new MemberVo(20,"ํ1","010-221","ํ1์ ์ ","์์ธ1"); session.insert("member.insert",vo); System.out.println("๋ฑ๋ก์ฑ๊ณต"); } main ๋ฉ์๋ ์๋์ ํด๋น ์ฝ๋๋ฅผ ..
๊ธฐ์กด์๋ queue๋ฅผ array๋ฆฌ์คํธ๋ก ์ด๋ป๊ฒ๋ ํ์๋๋ฐ ๊ทธ๊ฑธ ์ฐ์ง ์๊ณ ์๋ ๋๋ฌด ๋ณต์กํ๊ฒ ์ฝ๋๊ฐ ์ง์ฌ์ ธ์ ์๊ฐ์ด ๋ง์ด ๊ฑธ๋ ธ๋ค. ์๋๋ queue๋ฅผ ์ด์ฉํ ํด๋ต์ด๋ค. import java.util.LinkedList; import java.util.Queue; import java.util.List; import java.util.ArrayList; public class Truck { int w; int d; public Truck(int w, int d) { this.w = w; this.d = d; } } class Solution { public int solution(int bridge_length, int weight, int[] truck_weights) { int wL = weight; i..