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:414549269 at 2007-02-09 21:58:28 没太看懂,我自己作了一个,好像还行。。。 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