题解 | #牛牛的线段#

牛牛的线段

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

#include <stdio.h>

int main()
{
	int x1 = 0;
	int y1 = 0;
	int x2 = 0;
	int y2 = 0;
	scanf("%d %d", &x1, &y1);
	scanf("%d %d", &x2, &y2);
	int s = 0;
	s = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
	//s = (x1 - x2) ^ 2 + (y1 - y2) ^ 2;
	printf("%d", s);
	return 0;
}

全部评论

相关推荐

点赞 评论 收藏
分享
Twilight_m...:经典我朋友XXXX起手,这是那种经典的不知道目前行情搁那儿胡编乱造瞎指导的中年人,不用理这种**
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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