#include <stdio.h> #include <math.h> int main() { int n, i = 0, s = 0; scanf("%d", &n); while (n > 0) { s += (int)pow(10, i) * ((n%10)%2==0? 0: 1); i++; n /= 10; } printf("%d", s); return 0; }
#include <stdio.h> #include <math.h> int main() { int n, i = 0, s = 0; scanf("%d", &n); while (n > 0) { s += (int)pow(10, i) * ((n%10)%2==0? 0: 1); i++; n /= 10; } printf("%d", s); return 0; }