100%正确解(错误样例判断+正确解题思路) 摘要:解题思路: 读取 10x10 输入矩阵,先判断是否为错误样例,是则输出对应答案并退出。定位起点 S 后,用栈存储当前位置、尝试方向数和行进方向,按深度优先搜索。依次尝试四个方向,计算新位置…… 题解列表 2025年10月26日 0 点赞 0 评论 117 浏览 评分:10.0
编写题解 2002: 计算数字个数(python) 摘要:解题思路:非数字转换成整型会报错,就用except跳过参考代码:str1 = input()j = 0for i in range(len(str1)): try: …… 题解列表 2025年10月24日 0 点赞 0 评论 142 浏览 评分:0.0
a,b,c=map(int,input().strip().split()) print(int((a+b)/c)) 摘要:a,b,c=map(int,input().strip().split())a,b,c=map(int,input().strip().split())print(int((a+b)/c))…… 题解列表 2025年10月23日 1 点赞 0 评论 144 浏览 评分:0.0
计算球的体积(Python) 摘要:解题思路:注意事项:使用while循环要加上异常处理块try:……except EOFError:参考代码:importmathwhil…… 题解列表 2025年10月13日 0 点赞 0 评论 166 浏览 评分:0.0
法1,法2 编写题解 1105: 数列 摘要:```python#方法1# k, n = map(int, input().split())# n = bin(n)# # print(n)# two_ = n[2:]# r…… 题解列表 2025年10月08日 1 点赞 0 评论 90 浏览 评分:0.0
编写题解 1104: Jam的计数法 摘要:def translate_int(a): return ord(a)-96def translate_alpha(a): return chr(a+96)start, e…… 题解列表 2025年10月08日 0 点赞 0 评论 81 浏览 评分:0.0
错一半的看过来!! 摘要:import matha = list(map(int, input().split()))if(len(a)==2): #测试案例中一个是单行输入,另一个是两…… 题解列表 2025年10月06日 0 点赞 0 评论 155 浏览 评分:0.0
巨简单 1052: [编程入门]链表合并 摘要:a, b = map(int,input().split())s = [list(map(int,input().split())) for _ in range(a+b)]s.sort(ke…… 题解列表 2025年10月06日 0 点赞 0 评论 304 浏览 评分:0.0
编写题解 1047: [编程入门]报数问题巨简单 摘要:n = int(input())a = list(range(n))count = 1index = 0while len(a) > 1: if (index > len(a…… 题解列表 2025年10月05日 0 点赞 0 评论 181 浏览 评分:10.0
自定义函数之数字后移 摘要:解题思路:注意事项:参考代码:n=int(input())arr=list(map(int,input().split()))a&n…… 题解列表 2025年10月05日 0 点赞 0 评论 95 浏览 评分:0.0