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:看看还能比这个简单么? 我瞎蒙的.... Posted by:jessekidddd at 2006-01-18 12:25:59 #include<stdio.h> int main() { int n,m,b,s; scanf("%d",&n); b=m=2,s=2-n; while(s+1<=-m) s+=++m; if(s<1-m) b++,s+=m++-1; for(n=b;n<=m;n++) printf("%d ",n>s+m?n+1:n); return 0; } 我这个简单多了,速度略慢! Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator