摘要: 样例输入 张三 19 样例输出 张三明年20岁 解题代码 a,b=map(str,input().split()) print(a,"明年",(int(b)+1),"岁",sep='') 阅读全文
posted @ 2022-09-20 22:45 淡淡的晓山横雾 阅读(81) 评论(0) 推荐(0)
摘要: 样例输入 2+4j 1+2j 样例输出 (-6+8j) 解题代码 a=complex(input()) b=complex(input()) print(a*b) 阅读全文
posted @ 2022-09-20 22:43 淡淡的晓山横雾 阅读(86) 评论(0) 推荐(0)
摘要: 样例输入 2 41 样例输出 02:41 样例输入 12 2 样例输出 12:02 解题代码 a,b=map(int,input().split()) print('{:0>2}:{:0>2}'.format(a,b)) 阅读全文
posted @ 2022-09-20 22:41 淡淡的晓山横雾 阅读(94) 评论(0) 推荐(0)
摘要: 提示: 三角形三边(a,b,c)用海伦公式求面积公式如下:L=(a+b+c)/2面积area=(L(L-a)(L-b)(L-c))**0.5 样例输入 3 4 5 样例输出 6.0 样例输入 6 8 10 样例输出 24.0 解题代码 a,b,c=map(int,input().split(" ") 阅读全文
posted @ 2022-09-20 22:38 淡淡的晓山横雾 阅读(773) 评论(0) 推荐(0)
摘要: 提示: 计算圆面积公式为area=π*radius*radius,其中π取3.14。 样例输入 2 样例输出 12.56 解题代码 r=float(input()) pi=3.14 k=pi*r*r print('%.2f'%(k)) 阅读全文
posted @ 2022-09-20 22:26 淡淡的晓山横雾 阅读(597) 评论(0) 推荐(0)