首页 > 代码库 > 题目588-money-nyoj20140816

题目588-money-nyoj20140816

#include <stdio.h>
int main()
{
    int m;
    scanf("%d",&m);
    while(m--)
    {
        int money,wujiao,erjiao,yijiao;
        int num;
        num=0;
        scanf("%d",&money);
        for(wujiao=0;wujiao<=money*10/5;wujiao++)
        for(erjiao=0;erjiao<=money*10/2;erjiao++)
        for(yijiao=0;yijiao<=money*10;yijiao++)
        if(wujiao*5+erjiao*2+yijiao==money*10)
        num++;
        printf("%d\n",num);
        }
        return 0;
    }