This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import os | |
import time | |
import datetime | |
from apscheduler.schedulers.background import BlockingScheduler | |
from apscheduler.triggers.interval import IntervalTrigger | |
from tzlocal import get_localzone | |
from selenium import webdriver | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
split = lambda x: x.split() | |
# 요일을 비교해 날짜 계산 | |
def calculate(date, dayWeek): | |
if dayWeek == "Monday": | |
l = [(date + datetime.timedelta(days=-1)).day, date.day, (date + datetime.timedelta(days=1)).day, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = int(input()) | |
l = [] | |
for i in range(x): | |
s = input() | |
p = s.split() | |
d = {"zero":0, "one":1,"two":2, "three":3, "four":4, "five":5, "six":6, "seven":7, "eight":8, "nine":9, "ten":10} | |
f = {0:"zero", 1:"one", 2:"two", 3:"three", 4:"four", 5:"five", 6:"six", 7:"seven", 8:"eight", 9:"nine", 10:"ten"} | |
a = d[p[0]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def solution(numbers): | |
answer = '' | |
l=[] | |
for i in numbers: | |
a=str(i) | |
if len(a)==4: | |
b=a*1 | |
b=b[0:4] | |
if len(a)==3: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def solution(citations): | |
answer = 0 | |
i = 0 | |
l=[] | |
while True: | |
a = b = 0 | |
if i > len(citations): | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def solution(n): | |
n = str(n) | |
sum = 0 | |
for i in range(len(n)): | |
sum += int(n[i]) | |
return sum | |
# 문제: https://programmers.co.kr/learn/courses/30/lessons/12931 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def solution(n): | |
n = str(n) | |
sum = 0 | |
for i in range(len(n)): | |
sum += int(n[i]) | |
return sum | |
# 문제: https://programmers.co.kr/learn/courses/30/lessons/12931 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a, b = map(int, input().strip().split(' ')) | |
for i in range(b): | |
for j in range(a): | |
print("*", end="") | |
print("") | |
# 문제: https://programmers.co.kr/learn/courses/30/lessons/12969 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def solution(d, b): | |
d.sort() | |
n = 0 | |
for i in d: | |
if i <= b: | |
b -= i | |
n += 1 | |
else: | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def solution(s): | |
up = '' | |
j = 0 | |
for i in range(len(s)): | |
if s[i] == ' ': | |
up += ' ' | |
j = 0 | |
continue |
NewerOlder