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 |
Why wrong那位高手能指点我那里错了 我快疯了 那位高手能指点我那里错了 我快疯了 #include<stdio.h> #include<math.h> void main() { int n,a[10000],k,i; while(scanf("%d",&n)!=EOF) { for(i=0;i<n;i++) scanf("%d",&a[i]); k=0; for(i=0;i<n-1;i++) { if(n==1) { printf("Jolly\n"); k=1; break; } if(abs(a[i]-a[i+1])>n-1||abs(a[i]-a[i+1])<1) { printf("Not jolly\n"); k=1; break; } } if(k==0) printf("Jolly\n"); } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator