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>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <cstring>
#include <climits>
#include <cmath>
#include <cfloat>

#define FOR(i,b,n) for(int i=b;i<n;i++)
#define CLR(mat) memset(mat, 0, sizeof(mat))
#define INF 1<<25

using namespace std;

int n;
int dept = 100000;

int main()
{
	while( cin >> n, !cin.eof())
	{
		
		FOR(i, 0, n)
		{
			dept += dept*0.05;
			
			if(dept%1000 != 0)
				dept += 1000 - dept%1000;
		}
		
		cout << (int)(dept) << endl;
		
	}

	return 0;
}

C++: #include<cstdio>

int main(){
	int n;
	int a = 100;
	scanf("%d", &n);
	for(int i = 0; i < n; i++){
		if(a % 20){
			a = a * 1.05 + 1;
		}else{
			a *= 1.05;
		}
	}
	printf("%d000\n", a);
	return 0;
}

C++: #include <iostream>
using namespace std;
//1000未満切り上げ
int main(){
  int weeks;
  int debt = 100000;
  cin >> weeks;
  for(int i=0;i<weeks;i++){
    debt *= 1.05;
    if(debt%1000)
      debt += (1000 - debt%1000);
  }
  cout << debt <<endl;
}

C++: #include <iostream>

using namespace std;

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

	cin >> n;

	for (int i = 1; i <= n; i++)
	{
		k = static_cast<int>(k * 1.05 + 999) / 1000 * 1000;
	}

	cout << k << endl;

	return 0;
}

C++: #include <iostream>

using namespace std;

int main(int argc, char const* argv[])
{
	int n;

	cin >> n;

	double money = 100000;
	for( int i = 0;i < n;i++ ){
		money *= 1.05;
		money /= 1000;
		money = int( money + 0.9 );
		money *= 1000;
	}
	cout << money << endl;
	return 0;
}

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

int main(void){
    int n, money=100000;
    cin >> n;
    while(n--){
        money*=1.05;
        money+=(money%1000==0? 0:1000-money%1000) ;
    }
    cout << money << "\n";
}

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

int main(){
    double money = 100;
    int n;
    cin >> n;
    for(int i=0;i<n;++i){
        money *= 1.05;
        money = ceil(money);
    }
    cout << (int)(money*1000) << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1e9 + 7/*998244353*/;
const ll INF = 1LL << 60;
ll mod_pow(ll, ll, ll); ll mod_fact(ll, ll); ll mod_inv(ll, ll); ll gcd(ll, ll); ll lcm(ll, ll);
//
int main(){
    int s;
    cin >> s;
    ll n = 1e5;
    for(int i = 0; i < s; i++){
        n = n + n / 20;
        if(n % 1000 != 0) n = (n / 1000 + 1) * 1000;
    }
    cout << n << "\n";
}

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

int main(){
	double n;
	int money = 100000;
	cin >> n;
	while (n--){
		money *= 1.05;
		if (money % 1000 != 0){
			money += 1000 - (money % 1000);
		}
		

	}
	cout << money << '\n';

	return 0;
}

C++: #include <iostream>

int main(void)
{
  const int kLoan = 100000;
  const double kInterestRate = 0.05;

  int n;
  std::cin >> n;

  int total = kLoan;
  for (int i = 0; i < n; i++) {
    total += kInterestRate * total;
    int mod = total % 1000;
    if (mod != 0) {
      total += 1000 - mod;
    }
  }

  std::cout << total << '\n';
  return 0;
}

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

C++: //#include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <math.h>
#include<algorithm>
#include <utility>
using namespace std;
int main() {
	double n, add, money = 100000;
	while (cin >> n) {
		add = 0;
		money = 100000;
		for (int i = 0; i < n; i++) {
			add = money*0.05;
			money += add;
		}
		int ans = money;
		cout << ans << endl;
		if (ans % 1000 < 1000 ) {
			ans /= 10000;
			ans *= 10000;
			ans += 10000;
		}
		cout << ans << endl;
	}
	return 0;
}

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

C++: // Problem A

#include <iostream>
#include <iomanip>
#include <cmath>

using namespace std;

int main(void) {
	int n;
	double sum;

	sum = 100000;

	cin >> n;

	for (int i; i < n; i++){
		sum = ceil((sum * 1.05)/1000) * 1000;
	}

	cout << (int)sum << endl;

	return 0;
}

C++: #include <cstdio>

int main(int argc, char const *argv[]){
//	freopen("in.txt", "r", stdin);

	int n;
	scanf("%d", &n);
	double x = 10;
	for(int i = 0; i < n; i ++)
		x = x + x * 0.05;
	int ans = x + 0.5;
	printf("%d\n", ans * 10000);

	return 0;
}

C++: #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <vector>
using namespace std;

const double interest = 0.05;
const int roundYen = 1000;

int weeklyAdd(double debt) {
  debt = debt * (1 + interest);
  debt = ceil(debt / roundYen) * roundYen;
  // std::cout << debt << '\n';
  return debt;
}

int main(int argc, char const *argv[]) {
  // int week = 5;
  int week;
  std::cin >> week;
  double debt = 100000;

  for (size_t i = 0; i < week; i++) {
    debt = weeklyAdd(debt);
  }
  std::cout << debt << '\n';

  return 0;
}

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

int main(){
  int n;
  int debt = 100000;
  
  std::cin >> n;
  for(int i=0; i<n; i++){
    debt = round((double)debt * 1.05);
    int under = debt % 1000;
    if(under==0){}
    else{
      debt = debt - under + 1000;
    }
  }
  std::cout << debt << std::endl;
  
  return 0;
}

C++: #include<cstdio>
int main(){
    int n;
    scanf("%d",&n);
    int a=100000;

    for(int i=0;i<n;i++)
    {
        a*=1.05;
        if(a%1000!=0){
            a=(a/1000)*1000;
            a+=1000;
        }
    }
    printf("%d\n",a);
    return 0;
}

C++: #include <stdio.h>

int main(){
    long int money = 100000;
    int n;
    scanf( "%d",&n );
    for( int i = 0;i < n;i++ ){
        money = ( float )money * 1.05;
        if( money % 1000 > 0 ) money += 1000-( money%1000 );
    }
    return 0;
}

C++: #include <iostream>
#include <cstring>
#include <cstdio>
 
using namespace std;
void sort(char *str){
    int len, len2 = 0;
    char work; 
    len = strlen(str);
 
    // 両端から交換
    for(len = len - 1; len > len2; len--, len2++){
        work = str[len];
        str[len] = str[len2];
        str[len2] = work;
    }
}
 
int main(){
    char str[21];
 
    cin >> str;
    sort(str);
    cout << str << endl;
    return 0;
}

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	double cap = 100000.0;
	int n;
	cin >> n;
	for (int i=0;i<n;i++){
		cap *= 1.05;
		cap /= 1000;
		cap = ceil(cap);
		cap *= 1000;
	}
	cout << int(cap) << endl;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

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