■■C++で大きな数を作るスレ■■
■ このスレッドは過去ログ倉庫に格納されています
0501デフォルトの名無しさん
2010/07/24(土) 08:59:45(とはいっても >>493 の見積もりは超えられないが)
//指定step数以下で停止するcode以下のプログラムの数を数える
int ccnts(int code, int step){
int c = 0;
while (code){
c += emu(code--, step) > 0;
}
return c;
}
//ccnts の値が増えなくなるまでstepを増やし続ける
int cmax501(int n, int func(int)){
int x, y = 0, step = 9;
do {
x = y;
y = ccnts(1<<n*6, step);
step = func(step);
} while (y > x);
return cmaxs(1<<n*6, step);
}
■ このスレッドは過去ログ倉庫に格納されています