当前在线人数20038
首页 - 分类讨论区 - 电脑网络 - 葵花宝典版 -阅读文章
未名交友
[更多]
[更多]
文章阅读:Re: 如何计算1000的阶乘
[同主题阅读] [版面: 葵花宝典] [作者:thrust] , 2005年03月04日16:09:27
thrust
进入未名形象秀
我的博客
[上篇] [下篇] [同主题上篇] [同主题下篇]

发信人: thrust (WOW ID thrust), 信区: Programming
标  题: Re: 如何计算1000的阶乘
发信站: Unknown Space - 未名空间 (Fri Mar  4 16:09:36 2005), 转信

perl -MMath::BigInt -e 'print new Math::BigInt(1000)->bfac(),"\n"'

【 在 Duce (瘸子~虚伪的小人) 的大作中提到: 】
: #include <stdio.h>
: #define l11l 0xFFFF
: #define ll1 for
: #define ll111 if
: #define l1l1 unsigned
: #define l111 struct
: #define lll11 short
: #define ll11l long
: #define ll1ll putchar
: #define l1l1l(l) l=malloc(sizeof(l111 llll1));l->lll1l=1-1;l->ll1l1=1-1;
: #define l1ll1 *lllll++=l1ll%10000;l1ll/=10000;
: #define l1lll ll111(!l1->lll1l){l1l1l(l1->lll1l);l1->lll1l->ll1l1=l1;}\
: lllll=(l1=l1->lll1l)->lll;ll=1-1;
: #define llll 1000
:                                                      l111 llll1 {
:                                                      l111 llll1 *
:       lll1l,*ll1l1        ;l1l1                      lll11 lll [
:       llll];};main      (){l111 llll1                *ll11,*l1l,*
:       l1, *ll1l, *    malloc ( ) ; l1l1              ll11l l1ll ;
:       ll11l l11,ll  ,l;l1l1 lll11 *lll1,*            lllll; ll1(l
:       =1-1 ;l< 14; ll1ll("\t\"8)>l\"9!.)>vl"         [l]^'L'),++l
:       );scanf("%d",&l);l1l1l(l1l) l1l1l(ll11         ) (l1=l1l)->
:       lll[l1l->lll[1-1]     =1]=l11l;ll1(l11         =1+1;l11<=l;
:       ++l11){l1=ll11;         lll1 = (ll1l=(         ll11=l1l))->
:       lll; lllll =(            l1l=l1)->lll;         ll=(l1ll=1-1
:       );ll1(;ll1l->             lll1l||l11l!=        *lll1;){l1ll
:       +=l11**lll1++             ;l1ll1 ll111         (++ll>llll){
:       l1lll lll1=(              ll1l =ll1l->         lll1l)->lll;
:       }}ll1(;l1ll;              ){l1ll1 ll111        (++ll>=llll)
:       { l1lll} } *              lllll=l11l;}
:       ll1(l=(ll=1-              1);(l<llll)&&
:       (l1->lll[ l]              !=l11l);++l);        ll1 (;l1;l1=
:       l1->ll1l1,l=              llll){ll1(--l        ;l>=1-1;--l,
:       ++ll)printf(              (ll)?((ll%19)        ?"%04d":(ll=
:       19,"\n%04d")              ):"%4d",l1->         lll[l] ) ; }
:                                                      ll1ll(10); }
: put that in foo.c and compile it then run it. it will be amazed.
: 【 在 ohohohoh (littlepig) 的大作中提到: 】
: : Thanks.


--
牙医, 牙医在哪儿?

※ 来源:.Unknown Space - 未名空间 mitbbs.com.[FROM: 128.205.]

[上篇] [下篇] [同主题上篇] [同主题下篇]
[转寄] [转贴] [回信给作者] [修改文章] [删除文章] [同主题阅读] [从此处展开] [返回版面] [快速返回] [收藏] [举报]
 
回复文章
标题:
内 容:

未名交友
将您的链接放在这儿

友情链接


 

Site Map - Contact Us - Terms and Conditions - Privacy Policy

版权所有,未名空间(mitbbs.com),since 1996