递推或者指数级母函数。真的好恶心
http://blog.csdn.net/acdreamers/article/details/9314913
指数型母函数学习地址。另外自己再去百度泰勒级数推导吧。抱歉原博主,因为有个地方加号他打成称号所以不得已自己复制下来改正
#include <iostream>
using namespace std;
int main()
{
__int64 n, m, Lu[21] = {4,8,16,32,64,28,56,12,24,48,96,92,84,68,36,72,44,88,76,52};
while (cin >> n)
{
if (n == 0)
break;
int x = n;
while (x > 0)
{
for (int i = 1; i <= n; i++)
{
cin >> m;
cout << "Case " << i << ": ";
if (m == 1)
cout << 2 << endl;
else if (m == 2)
cout << 6 << endl;
else
cout << (Lu[(m-3)%20]+Lu[(2*m-4)%20])%100 << endl;
x--;
}
}
cout << endl;
}
return 0;
}