题解 | #星际穿越#

星际穿越

https://www.nowcoder.com/practice/53e4c208b8cf497086ecd65ef45349bb

using System;
using System.Collections.Generic;

public class Program {
    public static void Main() {
        double max = double.Parse(Console.ReadLine());
        double res = (Math.Sqrt(4*max + 1) - 1) / 2;
        Console.WriteLine((long)res);

    }
}

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

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