HUST Online Judge WebBoard
Problem 4153 >> 求大佬赐教
201901030309 @ 2022-01-12 11:34:48
[ Quote ] [ Edit ] [ Delete ] 1#
#include<stdio.h>//自己写的代码 在devc++能够成功显示结果,但是在这上面说答案错误 ,希望有大佬赐教
int main()
{
int i,a[200][3],x;
scanf("%d",&x);//输入组数
if(x >= 1 && x <= 200)
{

for(i=0;i<x;i++)
{
scanf("%d %d %d",&a[i][0],&a[i][1],&a[i][2]);//输入三边的长
}
for(i=0;i<x;i++)
{
if(a[i][0]+a[i][1]>a[i][2]&&a[i][0]+a[i][2]>a[i][1]&&a[i][2]+a[i][1]>a[i][0])//两边之和大于第三边
{
printf("Case %d:YES\n",i+1);
}
else
{
printf("Case %d:NO\n",i+1);
}
}
}

}
202003020118 @ 2022-01-12 13:29:48
[ Quote ] [ Edit ] [ Delete ] 2#
输出的冒号后有一个空格
201901030309 @ 2022-01-12 14:18:48
[ Quote ] [ Edit ] [ Delete ] 3#
感谢
202401010613 @ 2024-10-29 13:28:56
[ Quote ] [ Edit ] [ Delete ] 4#