fork(1) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n;
  6. cin >> n;
  7.  
  8. vector<int> v;
  9. string s;
  10. int a,b,c;
  11. for(int i=100;i<919;i++)
  12. {
  13. s = to_string(i);
  14. a = int (s[0]);
  15. b = int (s[1]);
  16. c = int (s[2]);
  17. if(a*b==c)
  18. {
  19. v.push_back(i);
  20. }
  21. }
  22. for(auto x : v)
  23. {
  24. if(n <= x)
  25. {
  26. cout << x << endl;
  27. break;
  28. }
  29. }
  30.  
  31.  
  32. return 0;
  33. }
Success #stdin #stdout 0s 5324KB
stdin
320
stdout
Standard output is empty