[백준 바킹독] 0x09 - BFS 토마토(7576)
Introduction
https://www.acmicpc.net/problem/1748
1부터 N까지의 수를 이어서 쓰면 다음과 같이 새로운 하나의 수를 얻을 수 있다.
1234567891011121314151617181920212223…
이렇게 만들어진 새로운 수는 몇 자리 수일까? 이 수의 자릿수를 구하는 프로그램을 작성하시오.
첫째 줄에 N(1 ≤ N ≤ 100,000,000)이 주어진다.
첫째 줄에 새로운 수의 자릿수를 출력한다.
N = int(input())
result = 0
if N < 10:
result = N*1
elif N < 100:
result = 9+(N-9)*2
elif N < 1000:
result = 9+90*2+(N-99)*3
elif N < 10000:
result = 9+90*2+900*3+(N-999)*4
elif N < 100000:
result = 9+90*2+900*3+9000*4+(N-9999)*5
elif N < 1000000:
result = 9+90*2+900*3+9000*4+90000*5+(N-99999)*6
elif N < 10000000:
result = 9+90*2+900*3+9000*4+90000*5+900000*6+(N-999999)*7
elif N < 100000000:
result = 9+90*2+900*3+9000*4+90000*5+900000*6+9000000*7+(N-9999999)*8
elif N == 100000000:
result = 9+90*2+900*3+9000*4+90000*5+900000*6+9000000*7+90000000*8+9
print(result)
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
1167 트리의 지름
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Git 명령어를 사용한 하위 디렉토리 다운로드 Clone 할 로컬 저장소 생성
Introduction
# Fetch the submodule commits into the main repository git remote add submodule_origin git://url/to/submodule/origin git fetch submodule_origin
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Graph
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Spring Project
the page for java
가벼운 Base image를 사용
version: 3.0.0a10
WIDTH
version: 3.0.0a10
#include <iostream> #include <thread> #include <chrono> #include <mutex> #include <atomic> #include <string.h>
version: 3.0.0a10
https://cplusplus.com/reference/future/
Multithreading support was introduced in C++11.
how to costom github blog using jekyll
You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different wa...