Notice
Recent Posts
Recent Comments
Link
반응형
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- pybithumb
- JavaScript Obejct Notation
- JSON 형식
- 단순 반복 자동화
- string format
- 리눅스
- 오라클
- 즐겨찾기가 가장 많은 식당 정보 출력하기
- 프로그래머스 소수
- Web Service Architecture
- 빗썸 API 사용
- spring
- JSON특징
- 파이썬 가상환경
- 프로그래머스
- 리눅스 rwx
- Python
- WAS WebServer 차이
- WAS란
- Web Server란
- 프로그래머스 SQL
- beautifulsoup
- 트레이딩 봇 만들기
- java
- 리눅스 777
- BigDecimal
- 변동성 돌파전략
- 와스 웹서버의 차이
- 파이썬 주식
- 파이썬
Archives
- Today
- Total
목록해커랭크 Viral Advertising (1)
IT 개발자_S
해커랭크 Viral Advertising
1. 입력값 days 받는다 2. 회사의 사람은 5명이며 3. 로직은 5/2 2명이 추천 나머지는 제외한다. 4. days 추천 받은 사람은 누적으로 계산한다. 5. 이때 나머지는 floor 버린다 #!/bin/python3 import math import os import random import re import sys # Complete the viralAdvertising function below. def viralAdvertising(n): res = 0 sh = 5 lk =0 for i in range(n): lk = math.floor(sh /2) res = res+lk print("end", sh, lk,res) sh = lk*3 return res if __name__ == '__ma..
IT/알고리즘_Python
2020. 5. 7. 23:14