题解 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: 有一门课不及格的学生

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() {     int a,b;     cin>>a>>b;……

C++简单解法

摘要:解题思路:属于基础题目注意事项:注意不能写if (a<60||b<60),这样写不仅仅有一科不及格时会输出1,两科都不及格时也会输出1.参考代码:#include<iostream&……

很容易理解的一种做法

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