Community courses and other training courses

Community courses and other training courses

Title Description

观成中学终于迎来了第二轮社团选拔赛了。经过暑假的自学,有一部分同学已经有了长足的进步,也有一部分同学
已经跟着帅哥老师在校外学习了一段时间。
社团课很好的给大家提供了信奥学习的机会。但如果要想参加信奥,仅仅靠社团课的时间是远远不能取得好成绩的。
所以建议大家
(1)在社团外,有足够的时间练习
(2)必要的时候参加帅哥老师在校外的竞赛辅导。对于上面的2个条件,我们用1代表符合,0代表不符合,那么你
帮帅哥老师初步判断下一个同学能取得的成绩有多大?

 

Entry

输入2个整数,分别为2个条件的满足情况

 

Export

如果2个条件都符合,输出Great;
符合1个条件输出Ok;
一个条件也不符合输出Sorry.

 

Sample input

1 1

 

Sample Output

Great

answer:

This question is really simple, this "male teacher" in the title is really simple ah!

if

else if

else

Once every three KO direct this question! o (* ¯)¯ *) o

Source:

#include<bits/stdc++.h>
using namespace std;
int main() {
	int a,b;
	cin>>a>>b;
	if(a==1&&b==1) cout<<"Great"<<endl;
	else if((a==0&&b==1)||(a==1&&b==0)) cout<<"Ok"<<endl;
	else cout<<"Sorry"<<endl;
	return 0;
}

AC

Published 71 original articles · won praise 75 · views 10000 +

Guess you like

Origin blog.csdn.net/m0_45682806/article/details/105009374