본문 바로가기

컴퓨터과학

(32)
[SQL] [Codewars] 6Kyu - SELECT prime numbers Codewars: Achieve mastery through coding challenge Codewars is a coding practice site for all programmers where you can learn various programming languages. Join the community and improve your skills in many languages! www.codewars.com 문제 Write a SELECT query which will return all prime numbers smaller than 100 in ascending order. Your query should return one column named prime. 코드 CREATE OR REP..
[SQL] [Codewars] 7Kyu - SQL: Regex Replace Codewars: Achieve mastery through coding challenge Codewars is a coding practice site for all programmers where you can learn various programming languages. Join the community and improve your skills in many languages! www.codewars.com 문제 You are given a table named repositories, format as below: ** repositories table schema ** project commits contributors address The table shows project names o..
[SQL] [Codewars] 7kyu - Simple Fun #74: Growing Plant Codewars: Achieve mastery through coding challenge Codewars is a coding practice site for all programmers where you can learn various programming languages. Join the community and improve your skills in many languages! www.codewars.com 문제 Task Each day a plant is growing by upSpeed meters. Each night that plant's height decreases by downSpeed meters due to the lack of sun heat. Initially, plant ..
[Python] [백준] 1076번 저항 문제 1076번: 저항 전자 제품에는 저항이 들어간다. 저항은 색 3개를 이용해서 그 저항이 몇 옴인지 나타낸다. 처음 색 2개는 저항의 값이고, 마지막 색은 곱해야 하는 값이다. 저항의 값은 다음 표를 이용해서 구한 www.acmicpc.net 코드 color = ['black', 'brown', 'red', 'orange', 'yellow', 'green', 'blue', 'violet', 'grey', 'white'] a = int(color.index(input())) b = int(color.index(input())) c = int(color.index(input())) print((a*10+b)*(10**c)) 설명 입력으로 저항의 색 세 개가 차례로 주어진다. 딕셔너리로 색과 값을 연결지을..
[SQL] [Codewars] 7Kyu - SQL with LOTR: Elven Wildcards Codewars: Achieve mastery through coding challenge Codewars is a coding practice site for all programmers where you can learn various programming languages. Join the community and improve your skills in many languages! www.codewars.com 문제 Deep within the fair realm of Lothlórien, you have been asked to create a shortlist of candidates for a recently vacated position on the council. Of so many wo..