fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n,a,b,c,k=0;
  6. cin>>n;
  7. for (int i=10;i<=99;i++) {
  8. c=i*n;
  9. a=i/10+i%10;
  10. b=(c/10)%10+c%10+c/100;
  11. if (a==b) k++;
  12. }
  13. cout<<k;
  14. return 0;
  15. }
Success #stdin #stdout 0s 3416KB
stdin
Standard input is empty
stdout
Standard output is empty