Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #define _CRT_NONSTDC_NO_DEPRECATE
- #include <stdio.h>
- #include <ctype.h>
- #include <string.h>
- #include <math.h>
- #include <stdlib.h>
- #include <stdbool.h>
- #include <limits.h>
- #include <time.h>
- #include <stddef.h>
- #include <float.h>
- #define N 10005
- #define PI 3.14
- int main()
- {
- int tcase;
- scanf("%d", &tcase);
- while (tcase--)
- {
- unsigned long long sum = 0;
- unsigned long long n;
- scanf("%llu", &n);
- while (n != 0)
- {
- if ((n % 10) % 2 == 0)
- {
- sum += n % 10;
- }
- n /= 10;
- }
- printf("%d\n", sum);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement