Go: package main

import "fmt"

var (
	dept    int = 100000
	addDept int = dept / 100 * 5
)

func main() {
	var week, nWeekDept int
	fmt.Scan(&week)

	if week != 0 {
		nWeekDept = dept + addDept*week
	}

	if nWeekDept/addDept%2 != 0 {
		nWeekDept += addDept
	}
	fmt.Println(nWeekDept)
}

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <complex>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <stdio.h>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<double> VEC;
typedef vector<VEC> MAT;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<int, PII> TIII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
//container util

//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define MT(a,b,c) MP(a, MP(b, c))
#define T1 first
#define T2 second.first
#define T3 second.second.first
#define T4 second.second.second

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define EPS 1.0e-9

int main(){
	LL p = 100;
	int n;
	cin>>n;
	REP(i,n){
		if(p%20)p+=p/20+1;
		else p+=p/20;
	}
	p*=1000;
	cout << p<< endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

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

	int debt=100000;

	for (int i = 0; i < n; i++) {
		debt = debt*1.05;
	}


	if (debt % 10000 != 0) {
		cout << (debt / 10000) + 1 << "0000" << endl;
	}
	else {
		cout << debt << endl;
	}

	return 0;
}

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

int main(){

	int n, ans = 100000;
	
	cin >> n;
	
	for(int i = 0; i < n; i++) {
		ans *= 1.05;
		ans = 1000 * (ans / 1000 + (ans % 1000 != 0));
	}
	
	cout << ans << endl;

    return 0;
}

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
template<typename V> constexpr typename V::value_type sum(const V &v) { return accumulate(all(v), 0); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  int n;
  cin >> n;
  int x = 100000;
  rep(i, n) x = (x * 21 / 20 + 999) / 1000 * 1000;
  cout << x << endl;
}

C++: /*http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0007&lang=jp*/

#include <iostream>
#include <cmath>

using namespace std;

int main(){
    int n,r=100;
    cin>>n;
    for (int i = 0; i < n; ++i) {
        r=ceil(r*1.05);
    }
    cout<<(int)(r*10e3)<<endl;
    return 0;
}

C++: #include <stdio.h>
#include <string.h>

int main(void){
	int week,money=100000,i;
	scanf("%d",&week);
	for(i=1;i<=week;i++){
		money=money*1.05;
		if(money%1000!=0){
			money=money+(1000-money%1000);
		}
	}
	printf("%d\n",money);
}

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

int main(){
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);

    int a;
    uint b = 100000;
    while (std::cin >> a) {
        for (int i=1; i <= a; i++){
            b = b*1.05;
            if (b%1000 != 0) {
                b -= b%1000;
                b += 1000;
            }
        }
        std::cout << b << std::endl;
    }
    return EXIT_SUCCESS;
}

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

int money = 100000;
double risi = money * 0.05;

void up() {
    int judge = money % 10000;
    //cout << money % 10000 << endl;
    if(judge >= 1000) {
        money -= judge; money += 10000;
    }
}

int main(void) {
    int n; cin >> n;
    for(int r = 0; r < n; r++) {
        money += risi;
        //up();
    }
    up();
    cout << money << endl;
    return(0);
}

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

using namespace std;

long my_round(long value, int near);

int main(){
  int n;
  long debt = 100000;
  cin >> n;

  for(int i=0; i<n; i++){
    debt = my_round(debt,1000);
  }
  cout << debt << endl;
}

long my_round(long value, int near){
  int a, b;
  long loan;
  
  loan = value*0.05;
  value += loan;
  a = value / near;
  b = value % near;
  if(b != 0){
    a++;
  }
  return a*near;
}

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

int main()
{
    int n, d = 100000;
    cin >> n;
    for(; n-- ;)
    {
       if(int(d*1.05)%1000 == 0) d = (int)d*1.05;
       else
       {
            d = (int)d*1.05 + (1000- int(d*1.05)%1000);
       }
    }
    cout << d;
}

C++: /*****include*****/
#include <iostream>
#include <fstream>

/*****デバッグ定義*****/
//#define DEBUG
/*****マクロ定義*****/

/*****名前空間*****/
using namespace std;

/*****グローバル変数置き場*****/

/*****その他関数置き場*****/

/*****main関数*****/
int main(){
	/*****ファイルオープン*****/
#ifdef DEBUG
	ofstream fout("output.txt");
	ifstream fin("input.txt");
	if(!fout || !fin){
		cout << "Can't open the file.\n";
		return;
	}
#endif
	/*****変数置き場*****/
	int year;
	long int money = 100000;
	/*****処理部*****/
	cin >> year;
	for(int i=1;i<=year;i++){
		money += money*0.05;
	}
	money /= 1000;
	if(money % 10 > 4){
		money /= 10;
		money++;
		money *= 10000;
	}else{
		money /= 10;
		money *= 10000;
	}
	cout << money << endl;
	/*****処理終了後*****/
#ifdef DEBUG
	fout.close();
	fin.close();
#endif
	return 0;
}

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

using namespace std;

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

    double debt = 100;    // * 1000 yen
    while (week--) {
        debt = ceil(debt * 1.05);
    }

    cout << fixed << setprecision(0)
         << (debt * 1000) << endl;

    return 0;
}

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

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

int main(){
  int n;
  cin >>n;
  int sum=100000;
  int interest;
  for(int i =1 ; i<=n;i++){
    interest=sum*0.05;
    if (interest%1000>0)
    interest=(interest-interest%1000) + 1000;

    sum+= interest;
  }
  cout << sum;
}