题解 | #包含数字9的数#
包含数字9的数
https://www.nowcoder.com/practice/0948f4f3344c452f843afd3585dd0f8d
int main() { int i = 0; int count = 0; for (i = 1; i <= 2019; i++) { int j = 0; int m = i; while (m) { j = m % 10; m /= 10; if (j == 9) { count++; break; } } } printf("%d", count); return 0; }