Codeforces 122A. Lucky Division Solution

Solve in C++:

#include<iostream>
using namespace std;
int main(){

int n;
while(cin>>n)
{
    if(((n%4)==0)||((n%7)==0)||((n%47)==0)||((n%74)==0)||((n%474)==0)||((n%447)==0)||((n%774)==0)||((n%777)==0)||((n%444)==0)||((n%44)==0)||((n%77)==0)||((n%477)==0))
    cout<<"YES"<<endl;
    else
    cout<<"NO"<<endl;
    n=0;
}

}

No comments

Most View Post

Recent post

RESTful APIs with CRUD Operations in Laravel 12| (2025)

  RESTful APIs serve as the foundation of modern web development. They follow a set of rules called Representational State Transfer (REST) t...

Powered by Blogger.