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>

/*某国に住んでいる友達がお金に困って、あるヤミ金融業者から
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);}

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

int main(){
	int n;
	int m = 100000;
	cin >> n;
	for(int i = 0; i < n; ++i){
		m = (m*1.05+999)/1000;
		m = m*1000;
	}
	cout << m;
	return 0;
}

C++: #include <iostream>
#include "math.h"
using namespace std;
int Debt = 100000;

void RoundUp(int& Integer, int Power)
{
	int Place = pow(10, Power);
	if(Integer % Place != 0){
		Integer = Place * (Integer / Place + 1);
	}
}

int main()
{
	int n;
	cin >> n;
	for(int i = 0; i < n; i++){
		Debt *= 1.05;
		RoundUp(Debt, 3);
	}
	cout << Debt << endl;
	return 0;
}

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

C++: #include <algorithm>
#include <map>
#include <vector>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <cctype>
#include <cstdlib>
#include <cmath>
#include <string>
#include <queue>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define IREP(it,array) for(vector<int>::iterator it=array.begin(); it!=array.end(); ++it)
#define SREP(it,array) for(vector<string>::iterator it=array.begin(); it!=array.end(); ++it)
#define MP make_pair
typedef long long LL;


int main()
{
  cout.setf(ios::fixed, ios::floatfield);
  cout.precision(6);

  int INF = 1000000;

  LL debt = 100000L;
  int n;
  while(cin>>n){
    REP(i,n){
      double d = debt*1.05/1000;
      debt = (LL)(ceil(d) * 1000);
    }

    cout << debt  << endl;
  }


  return 0;
}

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

int main() {
	
	int m=100,n;
	cin>>n;
	
	for(int i=0;i<n;i++)m=ceil(m*1.05);
	
	cout<<m<<"000";
	return 0;
}

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

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

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

int main()
{
    int n, d = 100000;
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        d = (int)ceil(d * 1.05 / 1000) * 1000;
    }
    cout << d << endl;
    return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
using namespace std;
int main(){
  int n;
  cin >> n;
  int a = 100000;
  rep(i,n){
    a *= 1.05;
    if(a % 1000 != 0){
      a -= a%1000;
      a += 1000;
    }
    //cout << a << endl;
  }
  cout << a << endl;
  return 0;
}

C++: #include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
using namespace std;

long int money = 100000;

int main(){
	int n;
	int tmp;
	cin>>n;
	//while(n!=0){
		money = 100000;
	for(int i=0;i<n;i++){
		money*=1.05;
		//if(i==n-1) cout << "\nbefore  \n" << money <<"\nafter"<<endl;
		tmp = (money/100)%10;
		if(tmp!=0){
			money/=1000;
			money++;
			money*=1000;
			
		}
		//if(i==n-1)	cout << money << endl;
	}
	
	cout << money << endl;
		//cin >> n;
	//}
	return 0;
}

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