hdu 5138 CET-6 test

hdu 5138 CET-6 test
#include<stdio.h>
int main()
{
    int n,f;
    while(~scanf("%d",&n))
    {
        f=0;
        if(n-15>0) {if(f!=0) printf(" ");printf("%d",n-15);f++;}
        if(n-7>0) {if(f!=0) printf(" ");printf("%d",n-7);f++;}
        if(n-4>0) {if(f!=0) printf(" ");printf("%d",n-4);f++;}
        if(n-2>0) {if(f!=0) printf(" ");printf("%d",n-2);f++;}
        if(n-1>0) {if(f!=0) printf(" ");printf("%d",n-1);f++;}
        printf("\n");
    }
    return 0;
}

版权声明:本文为博主原创文章,未经博主允许不得转载。http://xiang578.top/

posted @ 2014-12-06 22:01  xryz  阅读(116)  评论(0编辑  收藏  举报