弓虽太弱 @ 2017-04-22 22:57:34
#include<math.h>
#include<stdio.h>
int main()
{
int q,a[516]={0};
a[0]=1;
scanf("%d",&q);
int u=q%25;
for(int b=1;b<=q/25;b++)
{
for (int k=500;k>=0;k--)
if(a[k]==0)
continue;
else
a[k]*=33554432;
for(int k=0;k<=500;k++)
if(a[k]>=10)
{
a[k+1]+=a[k]/10;a[k]%=10;
}
}
for(int b=1;b<=u;b++)
{
for(int k=500;k>=0;k--)
{
if(a[k]==0)
continue;
else
a[k]*=2;
if(a[k]>9)
{
a[k+1]+=a[k]/10;a[k]%=10;
}
}
}
a[0]--;
int t=log(2)/log(10)*q+1;
printf ("%d\n",t);
for (int k=499;k>=0;k-=50)
{
for (int p=0;p<=49;p++)
printf ("%d",a[k-p]);
printf ("\n");
}
return 0;
}