当前位置:网站首页>ZZULIOJ:1029: 三角形判定
ZZULIOJ:1029: 三角形判定
2022-08-10 03:39:00 【追上】
1029: 三角形判定
时间限制: 1 Sec 内存限制: 30 MB
[状态] [讨论版] [提交] [命题人:admin]
题目描述
给你三个正整数,判断用这三个整数做边长是否能构成一个三角形。
输入
输入为三个int范围的正整数,中间有一个空格隔开。
输出
如果能构成三角形,输出"Yes",否则输出"No"
样例输入 Copy
3 4 5
样例输出 Copy
Yes
参考代码
#include <stdio.h>
#include <math.h>
int main()
{
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if(a+b>c&&a+c>b&&b+c>a)
printf("Yes");
else
printf("No");
return 0;
}
边栏推荐
猜你喜欢
随机推荐
一种能让大型数据聚类快2000倍的方法,真不戳
搭建Prometheus+Grafana框架监控Hyperledger Fabric的运行
请问mindspore支持l1范数归一化吗
golang gin 框架读取无法用 body 传递的表单参数
结构体的内存对齐问题
快35了,还在“点点点”?那些入行几年的测试点工后来都怎么样了?
Dijkstra求最短路
云程发轫,万里可期 | 云扩科技再次入选Gartner《2022年中国ICT技术成熟度曲线报告》
MySQL数据库初体验
Recommend several easy-to-use MySQL open source clients, it is recommended to collect
mindspore gpu版本安装问题
MindSpore官方RandomChoiceWithMask算子用例报错
It's almost 35, still "did a little"?What happened to the test workers who had been in the industry for a few years?
质量小议13 -- 侥幸
同样是初级测试,凭什么他比我薪资高 5000 块?
微信小程序相互跳转如何携带参数
matlab simulink响应谱计算
使用 requestAnimationFrame 提升 web 性能
leetcode-218.天际线问题
The same is a primary test, why does he pay 5,000 yuan more than me?