题解 | 包含数字9的数

包含数字9的数

https://www.nowcoder.com/practice/0948f4f3344c452f843afd3585dd0f8d

using System;
public class Program {
    public static void Main() {
        int n = 0;
        for (int i = 0; i <= 2019; i++){
            if(i.ToString().Contains("9")){
                n++;
            }
        }
        Console.WriteLine(n);
    }
}

全部评论

相关推荐

回家当保安:今天刚过字节一面,接佬的好运
我的求职进度条
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务