Ankit_132

B

Oct 28th, 2023
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int n;
  7.     cin>>n;
  8.  
  9.     auto check = [&](int x)
  10.     {
  11.         return (x%10 == (x/100)*((x/10)%10));
  12.     };
  13.  
  14.     while(!check(n))
  15.         n++;
  16.  
  17.     cout<<n<<"\n";
  18. }
Advertisement
Add Comment
Please, Sign In to add comment