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+1)
	}

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

C++: #include<iostream>

#define     MAX_N_NUMBER     (100)

using namespace std;

int main(){
	const double rate = 0.05;
	const int init_money = 100000;
	int n,i,money;
	double buf;

	// 入力
	cin >> n;

	// 入力値のチェック
	if((n <= 0) || (n > ((int)(MAX_N_NUMBER)))){
		cerr << "Error!!" << endl;
		return 0;
	}

	// 倍々ゲーム
	money = init_money;
	for(i=1;i<=n;i++){
		buf = money * (1 + rate);
		money = (int)buf;
		money += 999;
		money /= 1000;
		money *= 1000;
	}

	// 出力
	cout << money << endl;

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int a,n,x;
	a=100000;
	cin >> n;
	for(x=0;x<n;x++){
		a+=a/20;
		a+=999;
		a/=1000;
		a*=1000;
	}
	cout << a << endl;
	return 0;
}

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

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

	int loan = 100000;
	loan += loan * 0.05 * n;

	std::cout << ceil((double) loan / 10000) * 10000 << std::endl;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <stdio.h>
#include <algorithm>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
using namespace std;
int main(){
	int n;
	scanf("%d", &n);
	double money = 100;
	for (int i = 0;i < n;++i) {
		money = money * 1.05;
		money = ceil(money);
	}
	int hoge = money;
	printf("%d000\n", hoge);
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#include <string>
#include <sstream>
#include <cstdlib>
#include <cmath>
 
using namespace std;

int main(){
    long long int debt = 100000;
    long long int temp;
    int n;
    cin >> n;
    for(int i = 0; i < n; i++){
    	debt +=  debt * 0.05;
    	temp = debt;
    	debt /= 1000.0;
    	if(temp - debt * 1000 != 0){ debt++; }
    	debt *= 1000.0;
    }
    cout << debt << endl;
    return 0;
}

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

C++: #include<stdio.h>

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

C++: #include<iostream>
using namespace std;
int main(){
	int n;
	cin>>n;
	int lend=100000;
	for(int i=1;i<=n;i++){
		lend=(lend*1.05-1)/1000;
		lend=(lend+1)*1000;
	}
	cout<<lend<<endl;
}

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

int main(){
  int debt = 100000, n;
  cin >> n;
  while(n--){
  	debt = debt * 105 / 100;
  	if(debt % 1000 > 0){
  		debt /= 1000;
  		debt++;
  		debt *= 1000;
  	}
  }
  cout << debt << endl;
}

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

int n;
int debt = 100000;
const int DIGITS = 1000;
const float INTEREST_RATE = 1.05;

int main()
{
    cin >> n;

    for (int i = 0; i < n; ++i) {
        debt = ((int)((debt * INTEREST_RATE + DIGITS - 1) / DIGITS)) * DIGITS;
    }

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

C++: 
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cmath>
#include <utility>
    
#define ll (long long)
#define REP(i,n) for(int i = 0;i<(int)n;i++)
#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (a);i>(b);i--)
#define risi (0.05)

using namespace std;


int main(void)
{
    unsigned int week;
    int i;
    double money = 100;
    
    
    cin >> week;
    for(i = 1; i<= week; i++)
    {
        money += money*risi;
        money  = (int)(money+(0.99999999));
        cout << money << endl;
        
    }
    
    cout << money*1000 << endl;
}

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

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

	return 0;
}

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

int main()
{
	int money = 100000;
	int n;
	cin >> n;
	while (n--)
	{
		money *= 1.05;
	}
	if (money % 10000 != 0)
	{
		money -= (money % 10000);
		money += 10000;
	}
	cout << money << endl;

	return 0;
}

C++: //"push hoge"と言われたらhogeを最後に入れ、"pop"と言われたら最後尾を取りだす。"quit"で終わり。
#include<iostream>
using namespace std;

int main(){
	int n,money = 100000;

	cin >> n;
	for(int i=0;i<n;i++){
		money = money * 1.05;
		if(money % 1000)
			money = money / 1000 * 1000 + 1000;
	}
	cout << money << endl;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
	double a;
	cin>>a;
	int ans=100000;
	for(int b=0;b<a;b++)
	{
		double rev=0;
	   ans=ans*1.05;
	   rev=ans%1000;
	   if(rev!=0)
	   ans=ans-rev+1000;
		}
		cout<<ans<<endl;
	}

C++: #include <iostream>
#include <cmath>
#include <cstdio>
#define DEFAULT 100000
using namespace std;

typedef long long ll;

double ceiler(double start) {
    //cout << start << endl;
    start /= 1000;
    //cout << start << endl;
    start = ceil(start);
    start *= 1000;
    return(start);
}

void check(int num) {
    cout << ceiler(num) << endl;
}

int main(void) {
    double start = DEFAULT;
    int num; cin >> num;
    for(int r = 0; r < num; r++) {
        start *= 1.05;
        start = ceiler(start);
    }
    cout << start << endl;
    return(0);
}

C++: #include<cstdio>
int main(void)
{
	int week,ans=100000;
	scanf("%d",&week);
	for(int f1=0;f1<week;f1++){
		ans+=ans*0.05;
	}
	ans-=ans%10000;
	ans+=10000;
	printf("%d\n",ans);
	//int a;
	//scanf("%d",&a);
	return 0;
}

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

using namespace std;


int main(){
    int week;
    cin >> week;
    double money =10;
    
    for(int i=0; i<week; i++){
        money=money * 1.05;
    }
    printf("%d\n",int(money+0.9)*10000);
}

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)
{
	return (ans - ans % int(pow(10,n)) + (ans % int(pow(10,n)) != 0)*int(pow(10,n)));
}

int how_much_debt(int n)
{
	if (n==0)
		return 100000;
	else{
		// cout << "(advance_n (how_much_debt(n-1),3))=" << (advance_n (how_much_debt(n-1),3)) << endl;
		return 1.05 * (advance_n (how_much_debt(n-1),3));
	}
		
}

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

C++: #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#pragma warning(disable:4996)

int main()
{

	int Debt = 100000;
	int Weeks = 0;
	scanf("%d", &Weeks);

	for (int nCnt = 0; nCnt < Weeks; nCnt++)
	{
		Debt += Debt * 0.05f;
		if (Debt % 1000 > 0)
			Debt += 1000 - (Debt % 1000);
	}

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

	return 0;
}

C++: #include <stdio.h>
#include <iostream>
#define rep(i,n) for(int i = 0; i < (n); ++i)
using namespace std;
int n;
int main() {
	int k = 100000;
	cin >> n;
	rep(i,n) {
		int r = (int)(k * 1.05) % 1000;
		if(r == 0) {
			k = (int)((k * 1.05) / 1000) * 1000;
		} else {
			k = (int)((k * 1.05) / 1000 + 1) * 1000;		
		}
	}
	cout << k << endl;
	return 0;
}

C++: #include <iostream>

const int debt(const int n)
{
    return (int)(((100000 * 0.05 * n) / 10000) + 0.9) * 10000 + 100000;
}

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

    std::cout << debt(n) << std::endl;

    return 0;
}

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

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin>>n;
    int debt=100000;
    for(int i=0; i<n; i++){
        debt=debt/20*21+999;
        debt-=debt%1000;
    }
    cout<<debt<<'\n';
    return 0;
}