1055: 二级C语言-进制转换 摘要:解题思路:注意事项:参考代码:def to_octal(num): if num == 0: return '0' octal_digits = [] …… 题解列表 2024年01月24日 0 点赞 0 评论 382 浏览 评分:9.9
2853: 字符替换 摘要:解题思路:注意事项:参考代码:a,b,c=input().split()d=a.replace(b,c)print(d)…… 题解列表 2024年01月24日 0 点赞 0 评论 151 浏览 评分:0.0
python解答,内容简洁易读 摘要:解题思路:根据题目要求一步一步来。注意事项:python中index(value)只能得到第一个重复元素的位置,需要翻转一下。参考代码:s = list(input().strip())command…… 题解列表 2024年01月24日 0 点赞 0 评论 156 浏览 评分:9.9
2770: 计算浮点数相除的余数 摘要:解题思路:注意事项:参考代码:a,b=map(float,input().split())c=a%bprint("%g"%c)…… 题解列表 2024年01月23日 0 点赞 0 评论 654 浏览 评分:8.3
这个代码有点麻烦!!! 摘要:解题思路:1、本题如何用数字表达石头剪刀布之间的获胜规则:如石头对剪刀 石头胜,剪刀对布 剪刀胜,布对石头 布获胜。(本题采用数值小的一方获胜)2、如何运用循环将出拳的规律表达出来。3、石头对布的取胜…… 题解列表 2024年01月23日 0 点赞 3 评论 298 浏览 评分:9.9
1013: [编程入门]Sn的公式求和 摘要:解题思路:注意事项:参考代码:n=int(input())k=0s=0sum=0while True: m=2*(10**k) s=s+m sum=sum+s if n!=k+…… 题解列表 2024年01月23日 0 点赞 0 评论 297 浏览 评分:0.0
统计数字字符 摘要:解题思路:0-9 10个数注意事项:参考代码:s=input()b=0for i in range(0,10): cn=s.count(str(i)) b+=cnprint(b)…… 题解列表 2024年01月23日 0 点赞 0 评论 217 浏览 评分:0.0
2824: 求出e的值 摘要:解题思路:注意事项:参考代码:n=int(input())a=0b=1for i in range(1,n+1): b=b*i a=a+1/bs=a+1print("%.10f"%s)…… 题解列表 2024年01月23日 0 点赞 0 评论 324 浏览 评分:9.9
将棋盘扩大一圈 摘要:解题思路:将棋盘扩大一圈,扩大的一圈都为“.”,对棋盘上每个位置进行遍历,对棋子的八个方向进行判断是否有雷注意事项:参考代码:N=0while True: N=N+1 n,m=map(in…… 题解列表 2024年01月23日 0 点赞 0 评论 220 浏览 评分:9.9
两行解决字符替换 摘要:解题思路:0.0注意事项:奥利给加油!参考代码:n,a,b=map(str,input().split())print(n.replace(a,b))…… 题解列表 2024年01月22日 0 点赞 0 评论 288 浏览 评分:0.0