7 条题解
-
3
#include <bits/stdc++.h> using namespace std; int main() { int chinese, math; // 输入语文和数学成绩 cin >> chinese >> math; // 判断:恰好一门不及格 输出1,否则0 // 不及格 <60,恰好一门就是 一门<60、另一门>=60 if ((chinese < 60 && math >= 60) || (math < 60 && chinese >= 60)) { cout << 1 << endl; } else { cout << 0 << endl; } return 0; }可直接运行。 点点赞吧! 我会继续发题解的。
- 1
信息
- ID
- 30938
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 7
- 标签
- (无)
- 递交数
- 101
- 已通过
- 25
- 上传者