122A

Copy
#include <stdio.h>
int main()
{
    int dig;
    int flag=0;
    scanf("%d", &dig);
    if(dig%4==0)
        flag=1;
    else if(dig%7==0)
        flag=1;
    else if(dig%44==0)
        flag=1;
    else if(dig%47==0)
        flag=1;
    else if(dig%74==0)
        flag=1;
    else if(dig%77==0)
        flag=1;
    else if(dig%447==0)
        flag=1;
    else if(dig%474==0)
        flag=1;
    else if(dig%477==0)
        flag=1;
    else if(dig%744==0)
        flag=1;
    else if(dig%747==0)
        flag=1;
    else if(dig%774==0)
        flag=1;
    else if(dig%777==0)
        flag=1;
    if(flag)
        printf("YES\n");
    else
        printf("NO\n");

    return 0;
}

  

上一篇:使用C# (.NET Core) 实现迭代器设计模式 (Iterator Pattern)


下一篇:HDFS之RPC机制