题解 | 牛牛的线段

牛牛的线段

https://www.nowcoder.com/practice/f72c56ed71664af082c921bf79861c85

using System;
public class Program {
    public static void Main() {
        string[] str1 = Console.ReadLine().Split();
        string[] str2 = Console.ReadLine().Split();
        int x1 = int.Parse(str1[0]);
        int y1 = int.Parse(str1[1]);
        int x2 = int.Parse(str2[0]);
        int y2 = int.Parse(str2[1]);
        int s = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
        Console.WriteLine(s);
    }
}

全部评论

相关推荐

许愿一个offer_...:不是啊,这个只代表你的面试官提交了你的面评,面试是否通过还是要看官网状态呢
腾讯2025实习生招聘
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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