Python实现,用到循环、表、if语句 摘要:解题思路:for循环参数控制注意事项:无则为0参考代码:a_li=list(map(int,input().split()))c=d=0for n in a_li[0:2]: …… 题解列表 2026年04月22日 0 点赞 0 评论 29 浏览 评分:0.0
Py2787-有一门课不及格的学生-步骤清晰 摘要:解题思路:先求出小于60分的数量,数量为1输出1,否则0参考代码:arr=list(map(int,input().split()))num=&nb…… 题解列表 2025年11月06日 0 点赞 0 评论 251 浏览 评分:0.0
2025/7/24刷题记录 摘要:解题思路:if...elseif 如果前面的if成功匹配后面的elseif不管匹配成功不成功都不会执行了 但是if...if前面的if匹配执行后后面的if如果也匹配还会继续执行注意事项:参考代码:#i…… 题解列表 2025年07月24日 0 点赞 0 评论 386 浏览 评分:0.0
C++简单解法 摘要:解题思路:属于基础题目注意事项:注意不能写if (a<60||b<60),这样写不仅仅有一科不及格时会输出1,两科都不及格时也会输出1.参考代码:#include<iostream&…… 题解列表 2025年03月05日 0 点赞 0 评论 682 浏览 评分:0.0
很容易理解的一种做法 摘要:解题思路:注意事项:注意“==”和“=”参考代码:a,b = map(int,input().split())if a >= 60: a = 1else: …… 题解列表 2025年02月23日 0 点赞 0 评论 412 浏览 评分:0.0
编写题解 2787: 有一门课不及格的学生 摘要:解题思路:两个恰好有一个,联想到异或门,当两变量不同时为一,相同时为零注意事项:参考代码:a,b=map(int,input().strip().split())if (a>=60)^(b>=60)=…… 题解列表 2024年12月22日 0 点赞 0 评论 412 浏览 评分:0.0
编写题解 2787: 有一门课不及格的学生 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int a,b; scanf("%d %d",&a,&b); if((a<60&&b>60)…… 题解列表 2024年12月06日 2 点赞 0 评论 473 浏览 评分:0.0
2787普普通通的解题方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,a; scanf("%d%d",&n,&a); if (n<60 && a<60) printf(…… 题解列表 2024年11月23日 0 点赞 0 评论 396 浏览 评分:0.0
最普通的解题方法 摘要:解题思路:注意事项:注意将条件考虑完整参考代码:#include<stdio.h>int main(){ int a,b; scanf("%d %d",&a,&b); if(0<=a…… 题解列表 2024年11月11日 0 点赞 0 评论 298 浏览 评分:0.0
编写题解 2787: 有一门课不及格的学生 摘要:解题思路:判断语句注意事项:判断他是否恰好有一门课不及格参考代码:ch, ma = map(int, input().split()) if ch < 60 and ma >= 60 : …… 题解列表 2024年03月06日 1 点赞 0 评论 771 浏览 评分:4.0