Go: package main

import (
	"fmt"
	"os"
	"bufio"
	"strconv"
	"math"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan() {
		n, _ := strconv.Atoi(scanner.Text())
		debt := float64(100000)
		for i:=1; i<=n; i++ {
			debt = debt*1.05
			debt = math.Ceil(debt*0.001) * 1000
		}		
		fmt.Println(int(debt))
	}
}

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

using namespace std;

signed main(){
    int n;
    double ret = 100000;
    scanf( "%d", &n );
    while( n > 0 ){
        ret *= 1.05;
        ret = ceil( ret / 1000 ) * 1000;
        n--;
    }
    printf( "%.0f\n", ret  );
    return 0;    
}

C++: #include<stdio.h>

int main(void){

	int ans,week,i,debt;
	
	debt=100000;				//ØàÌúl10
	scanf("%d",&week);

	ans=debt+debt*0.05;		//úqvZ
	
	for(i=1;i<week;i++){
		
		ans=ans+ans*0.05;
		
		if(ans%1000!=0){		//ç~¢Øèã°
			ans=ans-(ans%1000)+1000;
		}
	}
	printf("%d\n",ans);
}

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

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

int main(){
  int debt = 100000;

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

  cout<<debt<<endl;

  return EXIT_SUCCESS;
}

C++: #include <iostream>
#include <cmath>

using namespace std;

int main(int argc, char const* argv[])
{
  int weeks;
  cin >> weeks;

  int debt = 100;
  for (int i = 0; i < weeks; i++) {
    debt = ceil(debt * 1.05);
  }

  cout << debt * 1000 << endl;
  return 0;
}

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

int main(){
    int num=100000;
    int n;
    cin>>n;
    for(int a=0;a<n;a++){
        num+=num/20;
        if(num%1000!=0){
            num-=num%1000;
            num+=1000;
        }
    }
    cout<<num<<endl;
    return 0;
}

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

int main(){

  int n;
  int sum=100000;

  cin>>n;

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

    if(sum%10000!=0){
      sum=sum/10000;
      sum=sum+1;
      sum=sum*10000;
    }
  }
  cout<<sum<<endl;

}

C++: #include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
typedef long long int ll;

int main()
{
    int n;
	int ans=100000;
	cin >> n;
	for(int i=0;i<n;i++){
		ans=ans*21/20;
		if(ans%1000!=0){
			ans+=(1000-ans%1000);
		}
	}
	printf("%d\n",ans);
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define repr(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;

int main(){
    int n;
    ll total=100000;
    cin >> n;
    rep(i,n){
        total+=total*0.05;
        if(total%1000>0) total+=1000-total%1000;
    }
    cout << total << endl;
    return 0;
}

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

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

int main(){
	int week,i;
	int debt = 100000;

	cin >> week;

	for(i=0;i<week;i++){
		debt=debt*105/100;
		if(debt%1000){
			debt = debt - (debt%1000) + 1000;
		}
	}
	
	cout << debt << endl;
}

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

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

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

int main(){
  int n,money=100000;
  cin>>n;
  for( int i=0;i<n;i++ ){
    money=(money/100)*105;
    if(money-money/1000*1000){
      money-=(money-money/1000*1000);
      money+=1000;
    }
  }
  cout<<money<<endl;
  return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
  int n,i;
  int temp;
  double ans = 100;
  cin >> n;
  for(i = 0;i < n;i++){
    ans *= 1.05;
    ans -= 0.01;
    temp = (int)ans;
    ans = (double)temp + 1;
  }
  cout << ans << "000" << endl;
  return(0);
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n, m;
	
	cin >> n;
	
  m = 100000;
	m = (((m / 100) * 5) * n) + m;
	if (m % 1000 != 0){
		m = m - (m % 1000) + 1000;
	}

	cout << m;
}

C++: #include<iostream>
#include<iomanip>
#include<math.h>
using namespace std;

// advance_nはansのn桁目以降が0出なければ切り上げ、0ならそのままにする
//  12000 12345 - (12345 % 10^3
int advance_n(int ans,int n)
{
	cout << "ans % int(pow(10,n+2)))10=" << ans % int(pow(10,n)) << endl;
	cout << "pow(10,n+2)=" << pow(10,n+2) << endl;
	cout << "(ans - ans % int(pow(10,n+2)))=" << (ans - ans % int(pow(10,n+2))) << endl;
	return (ans - ans % int(pow(10,n)) + (ans % int(pow(10,n+2)) != 0)*int(pow(10,n)));
}

int how_much_debt(int n)
{
	if (n==0)
		return 100000;
	else
		return 1.05 * how_much_debt(n-1);
}

int main()
{
	int a;
	cin >> a;
	cout << advance_n(how_much_debt(a),3) << endl;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	int long long s=100000,l;
	int n;
	cin>>n;
	for(int p=0;p<n;p++){
		s=s+s/20;
		l=(s/1000)*1000;
		if(s>l){
			s+=1000;
			s=(s/1000)*1000;
		}
	}
	printf("%lld\n",s);
}

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

void test();
int  interest(int debt, float interest_rate, int n);

int main(void)
{
	test();
	return 0;
}

void test()
{
	int debt,n;
	float interest_rate;
	debt = 100000;
	interest_rate = 1.05;
	cin >> n;

	debt = interest(debt, interest_rate, n);

	if (debt % 1000 > 0)
	{
		debt = debt - debt % 1000 + 1000;
	}
	cout << debt << endl;
}

int interest(int debt, float interest_rate,int n)
{

	if (n == 1)
		return debt * interest_rate;
	else
		return interest(debt, interest_rate, n - 1) * interest_rate;
}

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

int main(){
int n;
scanf("%d",&n);
double base = 100000;
for(int i=0;i<n;i++){
base*=1.05;
if((int)base < 1000 && (int)base %1000 !=0) {
int tmp = (int)base / 1000;
base = tmp + 1000;
}

}
printf("%d\n",(int)base);
}

C++: #include<iostream>

using namespace std;

int main()
{
	int n;
	int debt = 100000;
	int temp = 100000;
	
	cin >> n;
	
	for(int i = 0; i < n; i++){
		debt *= 1.05;
	}
	
	for(int i = 0; i < n; i++){
		temp += (10000*i);
		if(temp > debt){
			break;
		}
	}
	
	cout << temp << endl;
}

C++: #define _USE_MATH_DEFINES

#include <iostream>
#include <string>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#include <numeric>

using namespace std;

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

	int m = 100000;
	for (int i = 0; i < n; i++)
	{
		m += (int)(0.05 * m);
		m = (m / 1000 + (m%1000 == 0 ? 0 : 1)) * 1000;
	}

	cout << m << endl;
}

C++: #include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
int main(){
  int n;
  cin>>n;
  double m = 100000;
  for(int i = 0; i < n; i++){
    m*=1.05;
    m/=1000;
    m=ceil(m);
    m*=1000;
   // cout<<i<<','<<m<<endl;
	printf("%.0lf\n",m);  
}
  cout<<m<<endl;
}

C++: #include <stdio.h>

using namespace std;


int main(){
	int debt = 100000,n;
	scanf("%d",&n);

	for(int i=0;i<n;i++){
		debt=(debt/100)*105;
		if((debt%1000)>0){
			debt+=(1000-(debt%1000));
		}
	}

	printf("%d\n",debt);

    return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int n,m;
	
	m=100000;
	scanf("%d",&n);
	
	while(n>0)
	{
		m=(m*105)/100;
		if(m%1000>0)
		{
			m=((m/1000)+1)*1000;
		}
		n--;
	}
	
	printf("%d\n",m);
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int a=100000,b=0,t;
    cin>>t;
      for(int k=0;k<t;k++){
         b=a*1.05;
         b=(b+999)/1000*1000;
         a=b;
       }
     cout<<a<<endl;
}