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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <vector> | |
#include <math.h> | |
/* | |
Problem: calculate the number of digits required to write all numbers in an interval [1, N] where 1 <= N <= 10^9 | |
Rationale: store the number of digits required to write a single number in a particular interval and size of the interval itself. | |
In other words, for [1, 9], number of digits is 1 and size of the interval is 9 (i.e., we need 1 * 9 = 9 digits for this whole interval) | |
For [10, 99], number of digits is 2 and size of the interval is 90 (i.e., we need 2 * 90 = 180 digits for this whole interval) |
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
#------------------------------------------------------------------------------------------------------- | |
# Código feito para consolidar as informações dos extratos | |
# mensais do CEI. Para rodar o script: | |
# 1) Baixe todos os extratos do ano e coloque na mesma pasta que estiver esse script. | |
# 2) Rode o script na pasta. | |
# 3) Verifique a saída no arquivo chamado "cei_consolidado.csv", que vai estar dentro da mesma pasta. | |
# | |
# Autor: Paulo Freire | |
# Data: 2020-03-05 | |
#------------------------------------------------------------------------------------------------------- |
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
#------------------------------------------------------------------------------------------------------- | |
# Código feito para consolidar as informações dos extratos | |
# mensais do CEI (provisionados). A ideia é salvar informações apenas | |
# relacionadas ao ano de 2020, pois os de 2019 foram creditados em algum momento do ano. | |
# Para rodar o script: | |
# 1) Baixe todos os extratos do ano e coloque na mesma pasta que estiver esse script. | |
# 2) Rode o script na pasta. | |
# 3) Verifique a saída no arquivo chamado "cei_consolidado_prov.csv", que vai estar dentro da mesma pasta. | |
# | |
# Autor: Paulo Freire |
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
#------------------------------------------------------------------------------------------------------- | |
# Código feito para consolidar as informações dos extratos da Easynvest | |
# Para rodar o script: | |
# 1) Baixe todos os extratos pelo site da Easynvest. | |
# A corretora permite pegar janelas temporais de até 90 dias, então | |
# serão 4 ou 5 arquivos a serem baixados, no máximo | |
# 2) Rode o script na pasta. | |
# 3) Verifique a saída na pasta "output". Lá dentro terão arquivos de dividendos/rendimentos e JSCP. | |
# | |
# Autor: Paulo Freire |