dr + (sun)eam = er
close
프로필 배경
프로필 로고

dr + (sun)eam = er

  • 분류 전체보기
    • Hello, World!
      • dr-sun-eamer
      • tr-sun-aveler
    • TIL
      • FrontEnd
      • BackEnd
      • Linux
      • Cloud
      • AI
      • Java
      • C
      • DB
      • CS
      • etc
    • Algorithm
      • BOJ
      • programmers
      • LeetCode
      • SWEA
      • JUNGOL
      • SQL
    • ERROR
    • HRM
    • SSAFY
      • SSAFYcial
      • PJT
    • ESCAPE
    • ARCHIVE
  • 홈
  • Hello, world
  • TIL
  • ERROR

[BOJ] 7369. Maya Calendar (python)

백준 7369 Maya Calendar (파이썬) 7369번: Maya Calendar During his last sabbatical, professor M. A. Ya made a surprising discovery about the old Maya calendar. From an old knotted message, professor discovered that the Maya civilization used a 365 day long year, called Haab, which had 19 months. Each of the fir www.acmicpc.net ✔️ 문제 개요 Haab: 365일 1년, 19달 첫 18개월은 20일 (달의 이름들)pop, no, zip, zotz, tzec, xu..

  • format_list_bulleted Algorithm/BOJ
  • · 2023. 1. 2.
  • textsms

[BOJ] 2635. 수 이어가기 (python)

백준 2635. 수 이어가기 (파이썬) 2635번: 수 이어가기 첫 번째 수가 주어진다. 이 수는 30,000 보다 같거나 작은 양의 정수이다. www.acmicpc.net import sys N = int(sys.stdin.readline()) ans = 0 ANS = [] for n in range(1, N + 1): a = 1 A = [N, n] # 배열에 주어진 수와 선택한 정수 입력하고 시작 while A[-1] >= 0: A.append(A[-2] - A[-1]) a += 1 if a > ans: ans = a ANS = A print(ans) for a in ANS: if a >= 0: print(a, end=" ")

  • format_list_bulleted Algorithm/BOJ
  • · 2022. 12. 31.
  • textsms

[BOJ] 1622. 공통 순열 (python)

백준 1622. 공통 순열 (파이썬) 1622번: 공통 순열 알파벳 소문자로 이루어진 두 문자열 a와 b에 대해, a의 부분 수열의 순열이자 b의 부분 수열의 순열이 되는 가장 긴 문자열 x를 구하여라. www.acmicpc.net # [BOJ] 1622. 공통 순열 while True: try: a = input() b = input() bd = {} for bb in b: if bb in bd: bd[bb] += 1 else: bd[bb] = 1 ans = '' for aa in a: if aa in b and bd[aa] > 0: ans += aa bd[aa] -= 1 print(''.join(sorted(ans))) except EOFError: break 딕셔너리 이용해서 여러 번 카운팅되지 않..

  • format_list_bulleted Algorithm/BOJ
  • · 2022. 12. 19.
  • textsms

[BOJ] 19844. 단어 개수 세기 (python)

백준 19844. 단어 개수 세기 (파이썬) 19844번: 단어 개수 세기 첫째 줄에 “문장”을 나타내는 문자열이 주어진다. 이 문자열은 영어 소문자, 띄어쓰기, -(하이픈), '(어포스트로피)로만 이루어져 있다. 이때 띄어쓰기, 하이픈, 어포스트로피 중 어느 것도 인 www.acmicpc.net # [BOJ] 19844. 단어 개수 세기 S = list(input().replace(' ', '-').split('-')) ans = len(S) words = ["c'", "j'", "n'", "m'", "t'", "s'", "l'", "d'", "qu'"] for s in S: # 줄인 단어로 시작하는 경우만 카운트, 이후에 모음이 올 때만 if s[0:2] in words: if s[2] in ['a'..

  • format_list_bulleted Algorithm/BOJ
  • · 2022. 12. 18.
  • textsms

[BOJ] 11976. Promotion Counting (python)

백준 11976. Promotion Counting (파이썬) 11976번: Promotion Counting Input consists of four lines, each containing two integers in the range 0..1,000,000. The first line specifies the number of bronze participants registered before and after the contest. The second line specifies the number of silver participants before and www.acmicpc.net 📑 문제 대회는 브론즈, 실버, 골드, 플래티넘의 등급으로 이루어져 있고, 만점을 받으면 다음 등급으로 승급이 가..

  • format_list_bulleted Algorithm/BOJ
  • · 2022. 12. 17.
  • textsms

[BOJ] 2805 나무 자르기 (python)

백준 2805: 나무 자르기 (파이썬) 2805번: 나무 자르기 첫째 줄에 나무의 수 N과 상근이가 집으로 가져가려고 하는 나무의 길이 M이 주어진다. (1 ≤ N ≤ 1,000,000, 1 ≤ M ≤ 2,000,000,000) 둘째 줄에는 나무의 높이가 주어진다. 나무의 높이의 합은 항상 M보 www.acmicpc.net # [BOJ] 2805. 나무 자르기 # N: 나무의 수, M: 가져가고자 하는 나무의 길이 N, M = map(int, input().split()) L = list(map(int, input().split())) # 적어도 M 미터의 나무를 집에 가져가기 위해서 절단기에 설정할 수 있는 높이의 최댓값 min_v = 0 max_v = max(L) while min_v mid: a +..

  • format_list_bulleted Algorithm/BOJ
  • · 2022. 12. 12.
  • textsms
  • navigate_before
  • 1
  • ···
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • navigate_next
인기 글
최근 글
전체 카테고리
  • 분류 전체보기
    • Hello, World!
      • dr-sun-eamer
      • tr-sun-aveler
    • TIL
      • FrontEnd
      • BackEnd
      • Linux
      • Cloud
      • AI
      • Java
      • C
      • DB
      • CS
      • etc
    • Algorithm
      • BOJ
      • programmers
      • LeetCode
      • SWEA
      • JUNGOL
      • SQL
    • ERROR
    • HRM
    • SSAFY
      • SSAFYcial
      • PJT
    • ESCAPE
    • ARCHIVE
Copyright © 쭈미로운 생활 All rights reserved.
Designed by JJuum

티스토리툴바