1 条题解
-
0stupefy LV 7 @ 2020-06-08 12:27:56
a=int(input()) def tri_num(n): tri = set() for i in range(1,n-1): for j in range(i,n-1): for k in range(j,n-1): if i+j>k and i+k>j and j+k>i and i+j+k==n: tri.add(tuple(sorted([i,j,n-i-j]))) return len(tri) print(tri_num(a))
- 1
信息
- 难度
- 6
- 分类
- (无)
- 标签
- (无)
- 递交数
- 16
- 已通过
- 11
- 通过率
- 69%
- 上传者