Problem:
塵劫記
大きな数を表そうとすると、文字数も多くなるし、位取りがわからなくなってしまうので、なかなか面倒です。大きな数をわかりやすく表すために、人々は数の単位を使ってきました。江戸時代に書かれた「塵劫記」という本の中では、数の単位が次のように書かれています。
たとえば、２の１００乗のようなとても大きな数は、１２６穣７６５０(じょ)６００２垓２８２２京９４０１兆４９６７億３２０万５３７６と表せます。それでは、正の整数
m
と
n
が与えられたとき、
m
の
n
乗を塵劫記の単位を使って上のように表すプログラムを作成してください。
入力
入力は複数のデータセットからなる。入力の終わりはゼロ２つの行で示される。各データセットは以下の形式で与えられる。
m
n
m
(2 ≤
m
≤ 20) が基数、
n
(1 ≤
n
< 240) が指数を表す。ただし、
m
n
は 10
72
未満である。
データセットの数は 100 を超えない。
出力
データセットごとに、
m
n
を塵劫記の単位で表した文字列を1行に出力する。ただし、各単位は以下の表記で出力する。
m
n
を表す文字列は、1 から 9999 までの数と上の表に現れる単位を表す文字列からなる。文字列には、余分な 0 や単位を含めない。
入出力例
入力例
2 10
5 20
10 8
20 17
0 0
出力例
1024
95Cho3674Oku3164Man625
1Oku
131Gai720Kei

Submitted solutions:

code_snippet: #include<iostream>
#include<string>
#include<cstring>
#include<vector>
#include<set>
#include<cmath>
using namespace std;
typedef vector<int> vi;
const string units[]={
  "","Man","Oku","Cho","Kei","Gai","Jo","Jou","Ko","Kan",
  "Sei","Sai","Gok","Ggs","Asg","Nyt","Fks","Mts"
};
const int MD=405;

struct LongInt
{
  LongInt(int i=0)
  {
    memset(digits,0,sizeof(digits));
    n=0;
    while(i>0)
      {
	digits[n++]=i%10;
	i/=10;
      }
  }
  LongInt(const string &s)
  {
    memset(digits,0,sizeof(digits));
    n=0;
    bool f=false;
    for(int j=(int)s.size()-1;j>=0;j--)
      {
	if(!isdigit(s[j])){continue;}
	if(s[j]!='0')
	  {
	    digits[n++]=s[j]-'0';
	    f=true;
	  }
	else if(f)
	  {
	    digits[n++]=s[j]-'0';
	  }
      }
  }
  int digits[MD],n;
};

LongInt operator*(const LongInt& lhs,const LongInt& rhs)
{
  LongInt res;
  for(int i=0;i<MD;i++)
    {
      for(int j=0;j<MD;j++)
	{
	  if(i+j>=MD){continue;}
	  int x=lhs.digits[i]*rhs.digits[j]+res.digits[i+j];
	  res.digits[i+j]=x%10;
	  if(i+j+1<MD)
	    {
	      res.digits[i+j+1]+=x/10;
	    }
	}
    }
  return res;
}

LongInt operator+(const LongInt& lhs,const LongInt& rhs)
{
  LongInt res;
  for(int i=0;i<MD;i++)
    {
      int x=lhs.digits[i]+rhs.digits[i]+res.digits[i];
      res.digits[i]=x%10;
      if(i+1<MD)
	{
	  res.digits[i+1]=x/10;
	}
    }
  return res;
}

int main()
{
  int m,n;
  while(cin >> m >> n && (m || n))
    {
      LongInt num(1),a(m);
      while(n>0)
	{
	  if(n&1){num=num*a;}
	  a=a*a;
	  n>>=1;
	}
      int mx;
      bool f=false;
      for(int i=MD-1;i>=0;i--)
	{
	  if(num.digits[i]!=0){f=true;}

	  if(f)
	    {
	      mx=i;
	      break;
	    }
	}
      string S="";
      for(int i=mx;i>=0;)
	{
	  int x=0;
	  while(1)
	    {
	      x=x*10+num.digits[i];
	      if(i%4==0){break;}
	      i--;
	    }
	  if(x>0)
	    {
	      S+=to_string(x)+units[i/4];
	    }
	  i--;
	}
      cout << S << endl;
    }
  return 0;
}
accuracy: 1
time_ms: 110
memory_kb: 3292
final_rank: 9

code_snippet: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <sstream>
#include <cstdlib>

using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)


string sum(string a, string b) {
	if (a.size() > b.size()) swap(a, b);
	int c = 0;
	
	string res = "";
	REP(i, a.size()) {
		int x = a[a.size() - 1 - i] - '0' + b[b.size() - 1 - i] - '0' + c;
		res.push_back(x % 10 + '0');
		c = x / 10;
	}
	FOR(i, a.size(), b.size()) {
		int x = b[b.size() - 1 - i] - '0' + c;
		res.push_back(x % 10 + '0');
		c = x / 10;
	}
	if (c > 0) res.push_back(c + '0');
	
	reverse(res.begin(), res.end());
	return res;
}

string kake(string a, string b) {
	if (a == "0" || b == "0") return "0";
	string res = "";
	if (a.size() > b.size()) swap(a, b);
	
	string s = "0";
	REP(i, b.size()) {
		REP(j, a.size()) {
			int tmp = (a[a.size() - j - 1] - '0') * (b[b.size() - i - 1] - '0');
			if (tmp > 0) {
				stringstream ss;
				ss << tmp;
				REP(k, j) ss << "0";
				s = sum(s, ss.str());
			}
		}
		res.push_back(s[s.size() - 1]);
		s.erase(s.end() - 1);
		if (s.empty()) s = "0";
	}
	
	while (s != "0") {
		res.push_back(s[s.size() - 1]);
		
		s.erase(s.end() - 1);
		if (s.empty()) s = "0";
	}
	reverse(res.begin(), res.end());
	return res;
}

string pow(string x, int n) {
	if (n == 0) return "1";
	string res = pow(kake(x, x), n / 2);
	if (n & 1) res = kake(res, x);
	return res;
}

string jin[19] = {
	"", "Man","Oku","Cho","Kei","Gai","Jo","Jou","Ko","Kan","Sei","Sai","Gok","Ggs","Asg","Nyt","Fks","Mts"
};

int main() {
	string m;
	int n;
	
	while (cin >> m >> n, m != "0" || n) {
		string num = pow(m, n);
		int pos = (num.size() - 1) / 4 ;
		cout << num.substr(0, (num.size() - 1) % 4 + 1) << jin[pos];
		while (--pos >= 0) {
			string out = num.substr((num.size() - 1) % 4 + 1 + ((num.size() - 1) / 4 - pos - 1) * 4, 4);
			if (atoi(out.c_str()) > 0) cout << atoi(out.c_str()) << jin[pos];
		}
		puts("");
	}
}
accuracy: 1
time_ms: 50
memory_kb: 3184
final_rank: 8

code_snippet: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
string S(ll n){stringstream ss;string s;ss<<n;ss>>s;return s;}
ll N(string s){stringstream ss;ll n;ss<<s;ss>>n;return n;}
string Z(string s){int i;for(i=0;i<s.size()-1;i++)if(s[i]!='0')break;return s.substr(i);}
string ADD(string s,string t) {
  if(s.size()<t.size())swap(s,t);s='0'+s;
  while(s.size()>t.size())t='0'+t;int c=0;
  for(int i=s.size()-1; i>=0; i--) {
    if(c){if(s[i]=='9'){s[i]='0';c=1;}else{s[i]=(char)(s[i]+1);c=0;}}
    int sum=(int)s[i]+(int)t[i]-'0'*2;
    if(sum>=10){s[i]=(char)(sum-10+'0');c=1;}
    else s[i]=(char)(sum+'0');
  }
  return Z(s);
}
string MUL(string s,string t) {
  string z1="",ans="";
  for(int i=t.size()-1; i>=0; i--) {
    string z2="",r="";
    for(int j=s.size()-1; j>=0; j--){r=ADD(r,S((s[j]-'0')*(t[i]-'0'))+z2);z2+="0";}
    ans=ADD(ans,r+z1);z1+="0";
  }
  return Z(ans);
}
string a[]={"","Man","Oku","Cho","Kei","Gai","Jo","Jou","Ko","Kan","Sei","Sai","Gok","Ggs","Asg","Nyt","Fks","Mts"};

int main() {
  int n;
  string m;
  while(cin >> m >> n && n) {
    string s="1";
    for(int i=0; i<n; i++) s=MUL(s,m);
    string ans="";
    for(int i=s.size()-4,k=0; i>=-3; k++,i-=4) {
      int d=min(4,4+i);
      string t=s.substr(max(0,i),d);
      int x=N(t);
      if(!x) continue;
      t=S(x);
      ans=t+a[k]+ans;
    }
    cout << ans << endl;
  }
  return 0;
}
accuracy: 1
time_ms: 130
memory_kb: 1248
final_rank: 4

code_snippet: #include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <set>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
#include <cstring>
#include <iterator>
#include <bitset>
#include <unordered_set>
#include <unordered_map>
#include <fstream>
#include <iomanip>
#include <cassert>
//#include <utility>
//#include <memory>
//#include <functional>
//#include <deque>
//#include <cctype>
//#include <ctime>
//#include <numeric>
//#include <list>
//#include <iomanip>

//#if __cplusplus >= 201103L
//#include <array>
//#include <tuple>
//#include <initializer_list>
//#include <forward_list>
//
//#define cauto const auto&
//#else

//#endif

using namespace std;


typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;

#define VV(T) vector<vector< T > >

template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
    v.assign(a, vector<T>(b, t));
}

template <class F, class T>
void convert(const F &f, T &t){
    stringstream ss;
    ss << f;
    ss >> t;
}

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define F first
#define S second
#define mkp make_pair
#define RALL(v) (v).rbegin(),(v).rend()
#define DEBUG
#ifdef DEBUG
#define dump(x)  cout << #x << " = " << (x) << endl;
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
#else
#define dump(x) 
#define debug(x) 
#endif

#define MOD 1000000007LL
#define EPS 1e-8
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3fLL
#define maxs(x,y) x=max(x,y)
#define mins(x,y) x=min(x,y)

string add(string a,string b){
	if(a.size()<b.size()) swap(a,b);
	while(a.size()!=b.size()) b='0'+b;
	string ret="";
	int t=0;
	reverse(ALL(a));
	reverse(ALL(b));
	rep(i,a.size()){
		ret=char('0'+(t+a[i]+b[i]-'0'-'0')%10)+ret;
		if((t+a[i]+b[i]-'0'-'0')>=10) t=1;
		else t=0;
	}
	if(t) ret='1'+ret;
	return ret;
}
string pro(string a,int b){
	string ret="0";
	rep(i,b) ret=add(ret,a);
	return ret;
}


void mainmain(){
	int m,n;
	vector<__int128> v(17);
	string a[]={
		"Man",
		"Oku",
		"Cho",
		"Kei",
		"Gai",
		"Jo",
		"Jou",
		"Ko",
		"Kan",
		"Sei",
		"Sai",
		"Gok",
		"Ggs",
		"Asg",
		"Nyt",
		"Fks",
		"Mts",
	};
	__int128 tmp=1;
	rep(i,17){
		tmp*=10000;
		v[i]=tmp;
	}
	while(cin>>m>>n,m){
		string s="1";
		rep(i,n){
			s=pro(s,m);
		}
		// cout<<s<<endl;
		reverse(ALL(s));
		for(int i=17;i>=1;i--){
			if(s.size()<=4*i) continue;
			string t=s.substr(i*4,4);
			reverse(ALL(t));
			int tt;
			convert(t,tt);
			if(tt==0) continue;
			cout<<tt<<a[i-1];
		}
		string t=s.substr(0,4);
		reverse(ALL(t));
		int tt;
		convert(t,tt);
		if(tt) cout<<tt;
		cout<<endl;
	}
}


signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout<<fixed<<setprecision(20);
    mainmain();
}
accuracy: 1
time_ms: 10
memory_kb: 3216
final_rank: 6

code_snippet: #include<bits/stdc++.h>
using namespace std;
const int MAX_D=400;
struct Integer{
    Integer(int i=0):n(0){
        fill_n(digits,MAX_D,0);
        while(i){digits[n++]=i%10;i/=10;}
    }
    int digits[MAX_D],n;
};
Integer operator*(const Integer& lhs,const Integer& rhs){
    Integer res;
    for(int i=0;i<MAX_D;i++){
        for(int j=0;j<MAX_D;j++){
            if(i+j>=MAX_D)continue;
            int x=lhs.digits[i]*rhs.digits[j]+res.digits[i+j];
            res.digits[i+j]=x%10;
            if(i+j+1<MAX_D)res.digits[i+j+1]+=x/10;
        }
    }
    return res;
}

const string unit[]={
    "","Man","Oku","Cho","Kei","Gai","Jo","Jou","Ko","Kan",
    "Sei","Sai","Gok","Ggs","Asg","Nyt","Fks","Mts",
};
int main(){
    int N,M;
    while(scanf("%d%d",&M,&N),N||M){
        Integer a(M),num(1);
        while(N){
            if(N&1)num=num*a;
            a=a*a;
            N>>=1;
        }


        int mx;
        for(int i=MAX_D-1;i>=0;i--){
            if(num.digits[i]!=0){
                mx=i;
                break;
            }
        }
        for(int i=mx;i>=0;){
            int x=0;
            while(true){
                x=x*10+num.digits[i];
                if(i%4==0)break;
                i--;
            }
            if(x>0){
                cout<<x<<unit[i/4];
            }
            i--;
        }
        cout<<endl;
    }
    return 0;
}
accuracy: 1
time_ms: 140
memory_kb: 1232
final_rank: 7

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

// ???????¨? ??? ???????????????
main(){
	int n,m ;
	string Jkk[] = {"","Man","Oku","Cho","Kei","Gai","Jo","Jou","Ko","Kan",
					"Sei","Sai","Gok","Ggs","Asg","Nyt","Fks","Mts"} ;
	while( cin >> m >> n , m ){
		int c[10000] = {} , mx = 1 ;
		c[0] = m%10 ; c[1] = m/10 ;
		if( c[1] ) mx++ ;
		
		for( int i=1 ; i<n ; i++ ){
			int tmp[10000] = {} ;
			for( int j=0 ; j<m ; j++ ){
				int k ;
				for( k=0 ; k<mx ; k++ ){
					tmp[k] += c[k] ;
					tmp[k+1] += tmp[k]/10 ;
					tmp[k] %= 10 ;
				}
				if( tmp[k] ) mx++ ;
			}
			swap(tmp,c) ;
		}
		
		int st = (mx-1)/4 ;
		if( st >= 17 ) st = 17 ;
		int flg = 0 ;
		for( int i=mx-1 ; i>=0 ; i-- ){
			if( i%4 == 3 ) flg = 0 ;
			if( c[i] != 0 ) flg = 1 ;
			if( flg != 0 ) cout << c[i] ;
			if( i%4 == 0 && flg ) cout << Jkk[st] ;
			if( i%4 == 0 && i/4 - 1 <= 16 ) st-- ;
		}
		cout << endl ;
	}
}
accuracy: 1
time_ms: 20
memory_kb: 1292
final_rank: 2

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

main(){
	int n,m ;
	string Jkk[] = {"Man","Oku","Cho","Kei","Gai","Jo","Jou","Ko","Kan",
					"Sei","Sai","Gok","Ggs","Asg","Nyt","Fks","Mts"} ;
	while( cin >> m >> n , m ){
		int c[10000] = {} , mx = 1 ;
		c[0] = m%10 ; c[1] = m/10 ;
		if( c[1] ) mx++ ;
		
		for( int i=1 ; i<n ; i++ ){
			int tmp[10000] = {} ;
			for( int j=0 ; j<m ; j++ ){
				int k ;
				for( k=0 ; k<mx ; k++ ){
					tmp[k] += c[k] ;
					tmp[k+1] += tmp[k]/10 ;
					tmp[k] %= 10 ;
				}
				if( tmp[k] ) mx++ ;
			}
			swap(tmp,c) ;
		}
		int st = mx/4 - 1 ;
		if( st >= 16 ) st = 16 ;
		int flg = 0 ;
		for( int i=mx-1 ; i>=0 ; i-- ){
			if( i%4 == 3 ) flg = 0 ;
			if( c[i] != 0 ) flg = 1 ;
			if( flg != 0 ) cout << c[i] ;
			if( i%4 == 0 ){
				if( flg && i/4 - 1 <= 16 && i!= 0 ) cout << Jkk[st] ;
				if( i/4 - 1 <= 16 ) st-- ;
			}
		}
		cout << endl ;
	}
}
accuracy: 0.25
time_ms: 10
memory_kb: 1292
final_rank: 10

code_snippet: #include <cstdio>
#include <cstring>
#include <iostream>

const std::string units[] = {
    "", "Man", "Oku", "Cho", "Kei", "Gai", "Jo",
    "Jou", "Ko", "Kan", "Sei", "Sai", "Gok", "Ggs",
    "Asg", "Nyt", "Fks", "Mts"
};
const int MAX_D = 400;

struct Integer{
    Integer(int i = 0){
        memset(digits, 0, sizeof(digits));
        n = 0;
        
        while(i > 0){
            digits[n++] = i % 10;
            i /= 10;
        }
    }
    Integer(const std::string& s){
        memset(digits, 0, sizeof(digits));
        n = 0;
        
        bool f = false;
        for(int j=(int)s.size()-1;j>=0;j--){
            if(!std::isdigit(s[j])){continue;}
            
            if(s[j] != '0'){
                digits[n++] = s[j] - '0';
                f = true;
            }else if(f){
                digits[n++] = s[j] - '0';
            }
        }
    }
    int digits[MAX_D], n;
};

Integer operator*(const Integer& lhs, const Integer& rhs){
    Integer res;
    for(int i=0;i<MAX_D;i++){
        for(int j=0;j<MAX_D;j++){
            if(i + j >= MAX_D){continue;}
            int x = lhs.digits[i] * rhs.digits[j] + res.digits[i+j];
            res.digits[i+j] = x % 10;
            if(i + j + 1 < MAX_D){
                res.digits[i+j+1] += x / 10;
            }
        }
    }
    
    return res;
}

Integer operator+(const Integer& lhs, const Integer& rhs){
    Integer res;
    for(int i=0;i<MAX_D;i++){
        int x = lhs.digits[i] + rhs.digits[i] + res.digits[i];
        res.digits[i] = x % 10;
        if(i+1 < MAX_D){
            res.digits[i+1] = x / 10;
        }
    }
    
    return res;
}

int main(){
    int M, N;
    while(scanf("%d %d", &M, &N), M || N){
        Integer num(1), a(M);
        while(N > 0){
            if(N & 1){num = num * a;}
            a = a * a;
            N >>= 1;
        }

        int mx;
        bool f = false;
        for(int i=MAX_D-1;i>=0;i--){
            if(num.digits[i] != 0){f = true;}

            if(f){
                mx = i;
                break;
            }        
        }
        
        std::string S = "";
        for(int i=mx;i>=0;){
            int x = 0;
            while(true){
                x = x * 10 + num.digits[i];
                if(i % 4 == 0){break;}
                i--;
            }
            if(x > 0){
                S += std::to_string(x) + units[i/4];
            }
            i--;
        }

        std::cout << S << std::endl;
    }
}
accuracy: 1
time_ms: 130
memory_kb: 1248
final_rank: 4

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

string tani[]={
	"","Man","Oku","Cho","Kei","Gai","Jo","Jou","Ko","Kan","Sei","Sai","Gok","Ggs","Asg","Nyt","Fks","Mts"
};


string add(string a,string b){
	if(a.size()<b.size())swap(a,b);
	while(a.size()>b.size())b="0"+b;
	int c=0;
	for(int i=a.size()-1;i>=0;i--){
		a[i]+=(b[i]-'0'+c);
		if(a[i]>'9'){
			a[i]-=10;
			c=1;
		}
		else c=0;
	}
	if(c)a="1"+a;
	return a;
}

string x10(string a,int n){
	while(n--)a+="0";
	return a;
}

string mlt(string a,string b){
	string tmp[10];
	tmp[0]="0";
	tmp[1]=a;
	for(int i=2;i<=9;i++)tmp[i]=add(tmp[i-1],a);
	string res=tmp[b[b.size()-1]-'0'];
	for(int i=1;i<b.size();i++){
		res=add(res,x10(tmp[b[b.size()-1-i]-'0'],i));
	}
	return res;
}

string pow(string a,int n){
	string res=a;
	for(n--;n--;)res=mlt(res,a);
	return res;
}

int main(){
	
	string s;
	int n;
	while(cin>>s>>n){
		if(s=="0"&&n==0)break;
		string ans=pow(s,n);
		reverse(ans.begin(),ans.end());
		vector<string>V;
		for(int i=0;i<ans.size();i+=4){
			string tmp="";
			for(int j=0;j<4;j++){
				if(i+j>=ans.size())break;
				tmp+=ans[i+j];
			}
			reverse(tmp.begin(),tmp.end());
			V.push_back(tmp);
		}
		reverse(V.begin(),V.end());
		for(int i=0;i<V.size();i++){
			if(V[i]=="0000")continue;
			while(V[i][0]=='0')V[i]=V[i].substr(1);
			cout<<V[i];
			cout<<tani[V.size()-i-1];
		}
		cout<<endl;
	}
	
	return 0;
}
accuracy: 1
time_ms: 10
memory_kb: 1224
final_rank: 1

code_snippet: #include<iostream>
using namespace std;

void make_name(char *dist[]);
char *name[20];
int m, n;

//data[i]はi桁目(10進数)、これをn乗。
void pwd(int *data, int n) {
	int i, j, k;
	int BigNum[201] = {0}, MBigNum[201] = {0};
	
	BigNum[0] = 1;
	for( i = 0; i < n; i++ ) {
		for( j = 0; j < 100; j++ ) {
			for( k = 0; k < 100; k++ ) {
				MBigNum[j+k] += BigNum[j] * data[k];
				MBigNum[j+k+1] += MBigNum[j+k]/10;
				MBigNum[j+k] %= 10;
			}
		}
		for( j = 0; j < 100; j++ ) {
			BigNum[j] = MBigNum[j];
			MBigNum[j] = 0;
		}
	}
	
	for( j = 0; j < 100; j++ ) {
		data[j] = BigNum[j];
	}
}

int main() {
	int i;
	int BigNum[200] = {0};
	make_name(name);
	while(cin >> m >> n) {
		if(!m) break;
		BigNum[0] = m%10;
		BigNum[1] = m/10;
		pwd(BigNum, n);
		int l, r;
		for(i = 0; i < 100; i++ ) {
			if( BigNum[i] )
				break;
		}
		l = i;
		for(i = 99; i >= 0; i--) {
			if( BigNum[i] )
				break;
		}
		r = i;
		
		bool disp0 = true;
		for(i = r; i >= l; i--) {
			if( BigNum[i] == 0 && !disp0 )
				continue;
			cout << BigNum[i];
			if( BigNum[i] != 0 ) {
				disp0 = true;
			}
			if( i % 4 == 0 ) {
				cout << name[i/4];
				disp0 = false;
			}
		}
		
		if( i % 4 != 3)
			l = i/4 * 4;
		else
			l = i+1;
		for(; i >= l; i--) {
			cout << BigNum[i];
			if( i % 4 == 0 ) {
				cout << name[i/4];
			}
		}
		cout << endl;
		
		for( i = 0; i < 100; i++ )
			BigNum[i] = 0;
	}
	return 0;
}

void make_name(char *dist[]) {
	dist[0] = "";
	dist[1] = "Man";
	dist[2] = "Oku";
	dist[3] = "Cho";
	dist[4] = "Kei";
	dist[5] = "Gai";
	dist[6] = "Jo";
	dist[7] = "Jou";
	dist[8] = "Ko";
	dist[9] = "Kan";
	dist[10] = "Sei";
	dist[11] = "Sai";
	dist[12] = "Gok";
	dist[13] = "Ggs";
	dist[14] = "Asg";
	dist[15] = "Nyt";
	dist[16] = "Fks";
	dist[17] = "Mts";
}
accuracy: 1
time_ms: 100
memory_kb: 1168
final_rank: 3