三角形 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 156024 Accepted Submission(s): 50080 Problem Description 给定三条边,请你判断一下能不能组成一个三角形. Input 输入数据第一行包含一个数M,接下有M行,每行一个实例,包含三个正数A,B,C.其中A,B,C <1…
JAVA程序改错 1. abstract class Name { private String name; public abstract boolean isStupidName(String name) { } } 答案: 错.abstract method必须以分号结尾,且不带花括号. 2. public class Something { void doSomething () { private String s = ""; int l = s.length(); } }…
1.温度转换 t=input() if t[-1]=="J": t=int(t[:-1]) t1=t/4.186 print("%.3fcal"%t1) else: t=int(t[0:-3]) t2=t*4.186 print("%.3fcal"%t2) #这一题不难,但要注意input()里面不要加提示语句,会报错的. 2.快乐的数字 n=input() h=0 i=0 while i<100: for x in n: h+=int(x…