Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:用笨办法太慢了,高手能指点指点吗?In Reply To:Re:用笨办法太慢了,高手能指点指点吗? Posted by:simbaforrest at 2007-05-25 22:33:39 > 没太看懂,我自己作了一个,好像还行。。。 > scanf("%d%ld",&id,&s); > for(i=1;s>=(i+1)*i/2;i++) > if((s-(i-1)*i/2)%i==0)cnt++; > printf("%d %d\n",id,cnt-1); > > 可不可以说说你是怎么推出来的啊?? Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator