본문 바로가기

데이터와 코드로 세상을 바라봅니다.

검색하기
데이터와 코드로 세상을 바라봅니다.
프로필사진 코드우드

  • Data & Code (35)
    • Data (0)
      • Statics & Math (0)
      • Deep Learning Algorithm (0)
      • Machine Learning Algorithm (0)
    • Code (34)
      • Python (30)
      • Java (0)
      • Mac OS (3)
      • Linux (1)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/06   »
일 월 화 수 목 금 토
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
Tags
  • List to String
  • 알고리즘
  • 피보나치 수
  • Python
  • Algorithm
  • List
  • homebrew-core is a shallow clone.
  • list.sorted()
  • cask
  • index
  • zip()
  • set to list
  • 프로그래머스
  • COUNT
  • 알고리즘 풀이
  • sting position
  • Split
  • list.pop(0)
  • list to set
  • permutations
  • python3
  • Python 나머지
  • Modified Date
  • Boto3
  • string
  • Python 몫
  • RecursionError
  • sort()
  • List 초기화
  • Unknown command: cask
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록알고리즘 풀이 (1)

데이터와 코드로 세상을 바라봅니다.

[Python 3] - Dictionary, Key, Value, Max, Min, Sort, Desc

def solution(answers): answer = [] answer1 = [1, 2, 3, 4, 5] answer2 = [2, 1, 2, 3, 2, 4, 2, 5, 2, 1, 2, 3, 2, 4, 2, 5] answer3 = [3, 3, 1, 1, 2, 2, 4, 4, 5, 5, 3, 3, 1, 1, 2, 2, 4, 4, 5, 5] data = {'1': 0, '2': 0, '3': 0} for i in range(0,len(answers)): if answer1[i%len(answer1)] == answers[i] : data['1'] += 1 if answer2[i%len(answer2)] == answers[i] : data['2'] += 1 if answer3[i%len(answer3)] ..

Code/Python 2020. 11. 4. 14:41
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바