#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; }
天 : 20052
小时 : 467879
分钟 : 28072720
秒 : 1684363200