游客 Signup | Login
中文 | En

2752 - 判断整除

判断一个整数能不能被2,3,5整除,若能输出’yes’,反之输出’no’

Input

30

Output

yes

Examples

Input

15

Output

no

Solution C++

#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
    int n;
    cin>>n;
    if((n%2==0) && (n%3==0) && (n%5==0))
    {
        cout<<"yes"<<endl;
    }
    else
    {
        cout<<"no"<<endl;
    }    
    return 0;
}
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题