Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func calc(n int) float64 {
	tmp := 100000.0
	for i := 0; i < n; i++ {
		tmp *= 1.05
		tmp = ceil(tmp, -3)
	}
	return tmp
}

func ceil(f float64, places int) float64 {
	shift := math.Pow(10, float64(places))
	return math.Ceil(f*shift)/shift
}

func main() {
	scanner.Split(bufio.ScanWords)
	n := nextInt()
	ans := calc(n)
	fmt.Println(int(ans))
}

C++: #include <iostream>
#include <algorithm>
#include <stdlib.h>
#include <iomanip>
#include <string>
#include <cmath>
#define PI 3.14159265359
using namespace std;

int main()
{
	int debt = 100000, n;
	cin >> n;
	for (int i = 0; i < n; ++i) {
		debt *= 1.05;
		debt += (debt % 1000) ? 1000 : 0;
		debt -= debt % 1000;
	}
	cout << debt << endl;
	return 0;
}

C++: #include<iostream>
#include<math.h>

int main()
{
	int n;
	int ans = 100000;
	std::cin >> n;
	
	while( n-- ){
		ans *= 1.05;
		int temp = ans % 1000;
		if( temp ){
		 	ans -= temp;
			ans += 1000;
		}
	}
	
	std::cout << ans << std::endl;

	return 0;
}

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

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

int main(void)
{
  int n;
  cin >> n;
  double ans = 100000.0;
  for(int i = 0; i < n; i++){
    ans = ans*1.05;
  }
  ans = (int)ans/1000;
  ans = ans+1;
  ans = ans*1000;

  cout << ans << endl;

  return 0;
}

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;
}