>>106

/*
 File : test.cpp
 Compile : g++ test.cpp -lgmpxx -lgmp
*/
#include <iostream>
#include <gmpxx.h>

typedef mpz_class BigInteger;

BigInteger fact(int n){
  BigInteger ans = 1;
  do { ans *= n; } while( --n );
  return ans;
}

BigInteger f(){
  return fact(100);
}

int main(){
  std::cout << f() << std::endl;
  return 0;
}

「ライブラリ使用不可」ってのを破ってるけど
「int と float は十分な精度があるとします 」
を守るためだけに使いました
この例では単純な factorial(100) を出力するやつを書いてみた
要は上の f() を main() に変えて大きな数を作るってことでOK?