Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int t = A[i];
- int sum = 0;
- while (t > 0) {
- sum += t % 10;
- t /= 10;
- }
- if (sum == k)
- ans++;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement