def j(): a,b,c=map(float,input('请输入三角形三条边的长度,用空格隔开:').split()) if a>0 and b>0 and c>0 and a+b>c and a+c>b and b+c>a: l=a+b+c p=l/2 s=p*(p-a)*(p-b)*(p-c)#海伦公式 print('三角形的周长:{:.2f}\n三角形的面积:{:.2f}'.format(l,s)) else: print('三角形不成立,请重新输入') j…
package zhongqiuzuoye; //自己写的方法 public class Rect { public double width; public double height; Rect(double width,double height) //带有两个参数的构造方法,用于将width和height属性初化; { this.width=width; this.height=height; } Rect() //不带参数的构造方法,将矩形初始化为宽和高都为10. { width=10…
Picture 题目链接 http://poj.org/problem?id=1177 Description A number of rectangular posters, photographs and other pictures of the same shape are pasted on a wall. Their sides are all vertical or horizontal. Each rectangle can be partially or totally cov…
Picture Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3310 Accepted Submission(s): 1723 Problem Description A number of rectangular posters, photographs and other pictures of the same shape…
描述 The Archeologists of the Current Millenium (ACM) now and then discover ancient artifacts located at vertices of regular polygons. The moving sand dunes of the desert render the excavations difficult and thus once three vertices of a polygon are di…