Go: package main

import (
        "fmt"
        "math"
)

var interests [101]float64

func main() {
        var m int
        fmt.Scanf("%d", &m)
        fmt.Printf("%d\n", int(math.Ceil(interest(m)*100))*1000)
}

func interest(m int) (i float64){
        if interests[m] > 0 {
                return interests[m]
        }

        if m == 0 {
                interests[0] = 1.0
                return interests[0]
        }

        if m == 1 {
                interests[1] = 1.05
                return interests[1]
        }
        interests[m] = interest(m/2) * interest(m/2) * interest(m%2)
        return interests[m]
}

C++: #include <iostream>

using namespace std;

int calcDebtByWeek(int);

int main(void){
	int n; cin >> n;
	cout << calcDebtByWeek(n);

	return 0;
}

int calcDebtByWeek(int n){
	int currentDebt = (int)1e5;

	while(n --){
		currentDebt = int(currentDebt * 1.05);

		if(currentDebt % 1000) {currentDebt /= 1000; currentDebt ++; currentDebt *= 1000; }
	}	
	return currentDebt;
}

C++: #include <iostream>

#include <math.h>

int main(int argc, char** argv)
{
  int n;

  std::cin >> n;

  int x = 100000;

  for (int i = 0; i < n; i ++)
    x = ceil(x * 1.05 / 1000) * 1000;
  
  std::cout << x << std::endl;
}

C++: #include <iostream>

using namespace std;
 

int main()
{ 
	int n;
	cin >> n;

	int debt = 100000;
	for (int i = 0; i < n; ++i)
	{
		debt *= 1.05;
		if (debt % 1000 > 0) debt += 1000;
		debt /= 1000, debt *= 1000;
	}

	cout << debt << endl;

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main()
{
	ll n, res = 100000;
	cin >> n;
	while (n--) {
		res = (res + res / 20 + 999) / 1000 * 1000;
	}
	cout << res << endl;
	return 0;
}

C++: #include<iostream>
using namespace std;

int main(){

	int n;
	int sum = 100000;

	while(cin>>n){

		for(int i=0;i<n;i++){

			sum *= 105/100.0;

			if(sum%1000>100){
				sum /= 1000;
				sum *= 1000;
				sum += 1000;
			}
		}
                cout<<sum<<endl;
	}
	return 0;
}

C++: 
#include <iostream>
#include <string>
#include <cmath>
using namespace std;

int main(void)
{
    int n;
    cin >> n;

    long loan = 100000;

    for (int i = n; i > 0; i--) {
        loan = ceil((loan * 1.05) / 1000.0) * 1000;
    }

    cout << loan;
}

C++: #include <iostream>
using namespace std;

int main()
{
	int n,money=100000;
	double debt;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		debt=money*1.05;
		money=debt;
		if((money%1000)!=0)
			money=money+1000;
	}
	cout<<money<<endl;
}

C++: #include<iostream>
#include<cmath>
using namespace std;

int main() {
        double n, debt=10, loan;
        cin>>n;
        for(int i=0; i<n; i++) {
                loan = debt*5/100;
                debt += loan;
        }
        cout << ceil(debt)<<"0000" << endl;
        return 0;
}

C++: #include <cstdio>

using namespace std;

int main() {
   int n = 0;
   double N = 0;
   int M = 0;
   int L = 100;
   int c = 0;
  scanf("%d", &n);
  for (int i = 0;i < n; i++) {
   N = L;
   M = L;
   c = 0;
   N *= 1.05;
   N -= M;
  while (N > 1) {
   N -= 1;
   c += 1;
  }
  if ( N > 0) {
   L += 1;
   }
   L += c;

  }

 L *= 1000;
 printf("%d", L);
  return 0;
}

C++: #include<iostream>
using namespace std;
int main(void){
     int first=100000;
     int n;
     cin >> n;
     for(int i=0;i<n;i++){
	  first = first*1.05;
	  if(first%1000!=0){
	       first = (first/1000+1)*1000;
	  }
     }
     cout << first << endl;
     
     return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<string>
#include<math.h>
#include<iomanip>
#include<algorithm>
#include<string.h>
#include<cctype>
#include<map>
#include<set>
#include<vector>
#include<sstream>
 
using namespace std;
 
int main()
{
  int n;
  int total=100000;
  cin>>n;
  while(n--)
  {
    total=(int)(total*1.05);
    if(total%1000==0) continue;
    else total=(total/1000+1)*1000;          
  }
  cout<<total<<endl;
  //while(1);      
  return 0;    
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <cmath>

using namespace std;



int main()
{
	int sum = 100000;
	int tmp;
	int n;

	scanf("%d",& n);

	for (int i = 0; i < n; i++) {
		sum += sum / 20;
		tmp = sum;
		sum -= sum % 1000;
		if (tmp != sum) sum += 1000;
	}
	printf("%d\n", sum);

	return (0);
	
}

C++: #include <iostream>
#include <cmath>
using namespace std;

int main(){
	long long int n,i,price = 100000;
	cin >> n;
	for(i=0;i<n;i++){
		price = price * 1.05;
		if(price % 1000 != 0){
			price -= price%1000;
			price += 1000;
		}
	}
	cout << price;
	return 0;
}

C++: #include<stdio.h>
#include<math.h>
int main(){
int a,i;
double b=100,d=0,c=0;
scanf("%d",&a);
for(i=0;i<a;i++){
b*=1.05;
b+=0.9999;
double c=floor(b);
b=c;
}
printf("%d\n",(int)b*1000);
}

C++: #include <iostream>

/*某国に住んでいる友達がお金に困って、あるヤミ金融業者から
10 万円の借金をしたまま、全く返済していないといいます。
この業者は、一週間ごとに 5% の利子を借金に加え、
さらに借金の 1,000 円未満を切り上げます。*/

/*整数 n を入力し、n 週間後の借金の残高を出力するプログラムを作成して下さい。*/

int addInteresOfTheDebt(int);

int main(){
	int n;  //入力される整数
	int money = 100000;  //元金
	std::cin >> n;

	for (int i = 0; i < n; i++)
	{
		money = addInteresOfTheDebt(money);
	}

	std::cout << money  << std::endl;
}

//借金に利子を加算する関数
//加算後、借金の1000未満を切り上げる
//入力：現在の借金
//出力：利子加算後の借金
int addInteresOfTheDebt(int money){
	money = money * 1.05;
	if (money % 1000 != 0){
		money =  money - (money % 1000) + 1000;
	}
	return money;
}

C++: #include <iostream>

using namespace std;

int main()
{
    unsigned long long debt = 100000;
    int n;
    
    for (int i = 0; i < n; ++i) {
        debt *= 1.05;
        const int under
        debt -= (debt % 2000) - 2000;
    }
    cout << debt << endl;
    
    return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;

int main(){
  int debt=100000, n;
  cin >> n;
  for(int i=0;i<n;i++){
    debt += debt*(5.0/100.0);
    if(debt%1000!=0){
      debt=(debt/1000)*1000+1000;
    }
  }
  if(debt%1000!=0){
      debt=(debt/1000)*1000+1000;
  }
  cout << debt << endl;
  return 0;}

C++: #include <iostream>
#include <string>
using namespace std;
int main() {
	int m = 100000, n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		m *= 1.05;
		if(m%1000)
			m += 1000 - m % 1000;
	}
	cout << m << endl;
	return 0;
}

C++: #include<cstdio>
using namespace std;
int main(){
    int n;
    scanf("%d",&n);
    int val=100000;
    while(n--){
        val=val/100*105;
        if(val%1000){
            val=val/1000*1000;
            val+=1000;
        }
    }
    printf("%d\n",val);

    return 0;
}

C++: #include <iostream>
using namespace std;
 
int main()
{
    int n,a = 100000;
    cin >> n;
    for(int i=0;i<=n;i++)
    {
        a *= 1.05;
        
            a += 1000-cur%1000;
        
    }
    cout << a << endl;
     
}

C++: #include <bits/stdc++.h>

using namespace std;

int main(){
  int n;
  scanf("%d",&n);
  int m=100000;
  for (int i=0;i<n;i++){
    m*=1.05;
    if (m%1000){
      m=m/1000*1000+1000;
    }
  }
  printf("%d\n",(int)m);
  return 0;
}

C++: #include <iostream>
using namespace std;

int n;
int syakin = 100000;

void kiri()
{
	if(syakin%1000 > 0){
		syakin = syakin/1000*1000+1000;
	}
}

int risi(int n)
{
	if(n == 0){
		return syakin;
	}else{
		syakin = static_cast<int>(static_cast<double>(syakin*1.05));
		kiri();
		risi(n-1);
	}
}

int main()
{
	cin >> n;
	cout << risi(n) << endl;
	return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
#define loop(i,x,n) for(int i=(x);i<(n);i++)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
#define ub upper_bound
#define lb lower_bound
#define int long long
using namespace std;
const int MOD=1000000007;
const int INF=1000000009;

signed main(){
  int n;
  cin>>n;
  int debt=100000;
  rep(i,n){
    debt*=1.05;
    int a=debt%1000;
    if(a)debt+=1000;
    debt-=a;
  }
  cout<<debt<<endl;
  return 0;
}

C++: #include<bits/stdc++.h>
int main(){int d;std::cin>>d;printf("%d\n",ceil(pow(1.05,d)*10)*10000);}