#include <stdio.h> int main(){ int n; if (scanf("%d",&n)!=EOF){ if (n==1){printf("1");} else{ for (int i=1;i<=n;i++){printf("%d ",i);} for (int i=n-1;i>1;i--){printf("%d ",i);} printf("1"); } } else{ printf("input wrong"); } return 0; }
#include <stdio.h> int main(){ int n; if (scanf("%d",&n)!=EOF){ if (n==1){printf("1");} else{ for (int i=1;i<=n;i++){printf("%d ",i);} for (int i=n-1;i>1;i--){printf("%d ",i);} printf("1"); } } else{ printf("input wrong"); } return 0; }
天 : 20083
小时 : 468606
分钟 : 28116345
秒 : 1686980700