题解 | #包含数字9的数#
包含数字9的数
https://www.nowcoder.com/practice/0948f4f3344c452f843afd3585dd0f8d
#include <stdio.h> int main() { int i, count = 0; for (i = 0; i <= 2019; i++) { int m = i; while (m) { if (m % 10 == 9) { count++; break; } m /= 10; } } printf("%d\n", count); return 0; }
c语言刷题 文章被收录于专栏
c语言刷题题目