Advertisement
Guest User

Untitled

a guest
Sep 26th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <string>
  2. #include <iostream>
  3.  
  4.  
  5. using namespace std;
  6.  
  7.  
  8. int main() {
  9.     freopen("input.txt", "r", stdin);
  10.     freopen("output.txt", "w", stdout);
  11.     int n;
  12.     cin >> n;
  13.     int a = n % 10;
  14.     int b = n / 10 % 10;
  15.     int c = n / 100 % 10;
  16.     int d = n / 1000;
  17.  
  18.     if (100 <= a * b * c * d && a * b * c * d <= 999) {
  19.         cout << "YES\n";
  20.     } else
  21.         cout << "NO\n";
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement