题解 2787: 有一门课不及格的学生

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

java--study||O.o

摘要:参考代码:import java.util.Scanner;   public class Main {   public static void main(String[] args)   ……

有一门课不及格的学生

摘要:解题思路:注意事项:当且仅当两门中只有一门不及格时输出为1参考代码:#include <stdio.h>#include <stdlib.h>#include <string.h>#include <……

编写题解 2787: 有一门课不及格的学生

摘要:解题思路:两个恰好有一个,联想到异或门,当两变量不同时为一,相同时为零注意事项:参考代码:a,b=map(int,input().strip().split())if (a>=60)^(b>=60)=……

很容易理解的一种做法

摘要:解题思路:注意事项:注意“==”和“=”参考代码:a,b = map(int,input().split())if a >= 60: a = 1else: ……