题解 | #BC45 小乐乐改数字#
小乐乐改数字
https://www.nowcoder.com/practice/fcd30aac9c4f4028b23919a0c649824d
#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; }