Advertisement
vov44k

Untitled

Jan 12th, 2022
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.20 KB | None | 0 0
  1.             int t = A[i];
  2.             int sum = 0;
  3.             while (t > 0) {
  4.                 sum += t % 10;
  5.                 t /= 10;
  6.             }
  7.             if (sum == k)
  8.                 ans++;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement